You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/config-api/index.md
+5
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,11 @@
2
2
title: Config API Overview
3
3
---
4
4
5
+
> info "The Segment Public API: Beta Release"
6
+
> The Segment Public API is available in Public Beta. This new API features more consistent endpoints, improved error handling and reporting, support for pagination, and more.
7
+
>
8
+
> See the [Segment Public API documentation](https://api.segmentapis.com/docs/){:target="_blank"} for more information.
9
+
5
10
The Config API enables you to programmatically manage Segment workspaces, sources, destinations and more. With the API you can:
6
11
7
12
* List all your workspace Sources and Destinations to see how data flows through Segment
Copy file name to clipboardExpand all lines: src/connections/spec/best-practices-identify.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ When you use the Segment Identify call with the Track call, you can start to bui
12
12
13
13
The Segment libraries generate an `anonymousId` for each user, even before you Identify them.
14
14
15
-
An `anonymousId` is a randomly generated 36 character string automatically assigned to a user on their first visit to your website or mobile application. You can use the `anonymousId` to link events performed by the user as they navigate around your website. When you track the `anonymousId`, you can attribute activities over multiple days to the same user by collecting all of the activities with that ID. If a user chooses to register for your site, or log in to your app, you can Identify them, and still include their `anonymousId` in the event payload along with the new `userId`.
15
+
An `anonymousId` is a randomly generated 36 character string automatically assigned to a user on their first visit to your website or mobile application. You can use the `anonymousId` to link events performed by the user as they navigate around your website. When you track the `anonymousId`, you can attribute activities over multiple days to the same user by collecting all of the activities with that ID. If a user chooses to register for your site, or log in to your app, you can Identify them, and still include their `anonymousId` in the event payload along with the new `userId`.
16
16
17
17
> success ""
18
18
> **Tip!** Only the Segment mobile and website libraries automatically generate an `anonymousId`. If you use Segment’s Server libraries, you must generate an `anonymousId` manually. It can be any pseudo-unique identifier, for example you might use a `sessionId` from a backend server.
@@ -23,7 +23,7 @@ Segment’s Identify method lets you link a user to their actions and record tra
23
23
24
24
Segment recommends that you use a unique user identifier that won’t change for your `userId`, for example a database ID from your organization’s internal systems. (See below)
25
25
26
-
When you make an [Identify call](/docs/connections/spec/identify) using Analytics.js, Segment saves the `userId` to the browser cookie, and writes all the user traits in local storage. If you’re using one of the Segment mobile libraries, the `userId` and and traits are stored in the device’s memory. This makes it possible to append the user’s data to all subsequent [Page calls](/docs/connections/sources/catalog/libraries/website/javascript#page) or [Track calls](/docs/connections/sources/catalog/libraries/website/javascript#track) for the user, so you can properly attribute those actions.
26
+
When you make an [Identify call](/docs/connections/spec/identify) using Analytics.js, Segment saves the `userId` to the browser cookie, and writes all the user traits in local storage. If you’re using one of the Segment mobile libraries, the `userId` and traits are stored in the device’s memory. This makes it possible to append the user’s data to all subsequent [Page calls](/docs/connections/sources/catalog/libraries/website/javascript#page) or [Track calls](/docs/connections/sources/catalog/libraries/website/javascript#track) for the user, so you can properly attribute those actions.
27
27
28
28
If a user returns to your site after the [cookie expires](#id-expiration-and-overwriting), Analytics.js looks for an old ID in the user’s `localStorage`, and if one is found, sets it as the user’s ID again in a new cookie. If the user clears their cookies *and*`localStorage`, all of the IDs are removed. The user gets a completely new `anonymousId` when they next visit the page.
29
29
@@ -34,7 +34,7 @@ A User ID should be a robust, static, unique identifier that you recognize a use
34
34
35
35
Ideally, the User ID could be a database ID. For example, if you’re using MongoDB it might be a row identifier and look something like `507f191e810c19729de860ea`. These can also be [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier)s that you generate somewhere in your application. You can also use identifiers that you get from other tools - such as Shopify or Braze - however this approach can lead to extra complexity in your systems.
36
36
37
-
Segment does **not** recommend using simple email addresses or usernames as as a User ID, as these can change over time. Segment recommends that you use static IDs instead, so the IDs *never* change. When you use a static ID, you can still recognize the user in your analytics tools, even if the user changes their email address. And even better, you can link your analytics data with your own internal database.
37
+
Segment does **not** recommend using simple email addresses or usernames as a User ID, as these can change over time. Segment recommends that you use static IDs instead, so the IDs *never* change. When you use a static ID, you can still recognize the user in your analytics tools, even if the user changes their email address. And even better, you can link your analytics data with your own internal database.
38
38
39
39
> success ""
40
40
> **Tip!** Even if you don't use an email address or a username as a User ID, you should still send them in the analytics payload as [traits](/docs/connections/spec/identify#traits).
@@ -130,7 +130,7 @@ The Segment ID cookie is set with a one year expiration. However, there are some
130
130
- If you invoke any call before you set an `anonymousId`, Segment automatically sets the `anonymousId` first. This means if you explicitly set an `anonymousId`, you might give the user two `anonymousId`s or overwrite an existing one.
131
131
- If you fetch the `anonymousId` using `analytics.user().anonymousId()` before one is set, Segment generates and sets an `anonymousId` rather than returning `null`.
132
132
- If you call `analytics.identify()` with a `userId` that is different from the currently cached `userId`, this can overwrite the existing one and cause attribution problems.
133
-
- If you generate a new `anonymousId` on a server library, and passing it from the server to the browser, this could overwrite the user's existing `anonymousId`.
133
+
- If you generate a new `anonymousId` on a server library, and pass it from the server to the browser, this could overwrite the user's existing `anonymousId`.
134
134
135
135
> info ""
136
136
> Remember, if a user has multiple devices, they can have different `anonymousId`s on each different device.
0 commit comments