Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ce923d3

Browse files
authoredJun 20, 2025
Merge pull request #7700 from segmentio/develop
Release 25.25.1
2 parents f5ac8cc + 1c18558 commit ce923d3

File tree

23 files changed

+626
-587
lines changed

23 files changed

+626
-587
lines changed
 

‎src/_data/catalog/destination_categories.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT
2-
# destination categories last updated 2025-06-12
2+
# destination categories last updated 2025-06-20
33
items:
44
- display_name: A/B Testing
55
slug: a-b-testing

‎src/_data/catalog/destinations.yml

Lines changed: 168 additions & 468 deletions
Large diffs are not rendered by default.

‎src/_data/catalog/destinations_private.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT
2-
# destination data last updated 2025-06-12
2+
# destination data last updated 2025-06-20
33
items:
44
- id: 54521fd925e721e32a72eee1
55
display_name: Pardot

‎src/_data/catalog/source_categories.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT
2-
# source categories last updated 2025-06-12
2+
# source categories last updated 2025-06-20
33
items:
44
- display_name: A/B testing
55
slug: a-b-testing

‎src/_data/catalog/sources.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT
2-
# sources last updated 2025-06-12
2+
# sources last updated 2025-06-20
33
items:
44
- id: 8HWbgPTt3k
55
display_name: .NET
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
---
2+
title: Amazon Conversions API (Actions) Destination
3+
id: 683ef14a3f9aac157e3a3446
4+
hide-personas-partial: true
5+
hide-boilerplate: false
6+
hide-dossier: true
7+
private: true
8+
hidden: true
9+
beta: true
10+
11+
---
12+
The Amazon Conversions API (Actions) destination is a server-to-server integration with the Amazon Events API. This destination allows advertisers to send real-time or offline conversion events data from Segment directly to Amazon without needing Amazon Ad Tag (AAT) setup.
13+
14+
This enables advertisers to evaluate the effectiveness of their Amazon marketing campaigns regardless of the location of the conversion and utilize this information to drive campaign optimization. The Events API can help strengthen performance and decrease cost per action with more complete attribution, improved data reliability, and better optimized delivery.
15+
16+
## Benefits of Amazon Conversions API (Actions)
17+
18+
The Amazon Conversions API destination provides the following benefits:
19+
20+
- **Simplified setup**. Data mapping for actions-based destinations happens during configuration, which eliminates the need for most settings.
21+
- **Clearer data mapping**. Actions-based destinations enable you to define the mapping between the data Segment receives from your source and the data Segment sends to the Amazon Conversions API.
22+
- **Prebuilt event mappings**. Standard events like `Add to Shopping Cart` and `Checkout` come preconfigured with recommended parameters.
23+
- **Multiple event types**. Support for various conversion event types including purchases, sign-ups, leads, and more.
24+
- **Multi-platform support**. Send events from websites, Android apps, iOS apps, Fire TV, or offline sources.
25+
- **Comprehensive user matching**. Multiple matching keys are available including email, phone, name, address, and mobile advertising IDs.
26+
- **Data normalization**. Data is normalized before it's hashed to send to Amazon Conversions.
27+
- **Custom attributes**. Includes additional context with event-specific attributes.
28+
- **Consent management**. Built-in support for various privacy frameworks including Amazon consent options, TCF, and GPP.
29+
30+
## Getting started
31+
32+
Before connecting to the Amazon Conversions API destination, you must have an [Amazon Advertising account](https://advertising.amazon.com/API/docs/en-us/guides/onboarding/overview){:target="_blank"} and an Advertiser ID.
33+
34+
To connect the Amazon Conversions API Destination:
35+
36+
1. From the Segment web app, go to **Connections > Catalog**.
37+
2. Search for **Amazon Conversions Api** in the top right corner.
38+
3. From the search results under **Destinations**, select the **Amazon Conversions Api** destination and then click **Add destination**
39+
4. Select the source that will send data to the Amazon Conversions API destination and follow the prompts to name your destination.
40+
5. On the **Basic Settings** page, enter:
41+
- Destination name
42+
- **Region:** - Select North America (NA), Europe (EU), or Far East (FE) based on your Amazon Advertising account
43+
- **Amazon Advertiser ID:** - Your Amazon Advertising Account ID
44+
6. Authenticate using OAuth when prompted.
45+
7. Go to the **Mappings** tab. Prebuilt mappings, like `Checkout`, `Search`, and `Add to Shopping Cart`, include predefined parameters.
46+
8. To create a new mapping:
47+
- Click **New Mapping** and select **Track Conversion**.
48+
- Configure and enable the mapping.
49+
9. Follow the steps in [Customizing mappings](/docs/connections/destinations/actions/#customize-mappings).
50+
10. Toggle **Enable Destination** on, then click **Save Changes**.
51+
52+
{% include components/actions-fields.html settings="true"%}
53+
54+
> info "Event Action Source"
55+
> By default, Segment sends all mappings as `website` conversions. To send events from mobile apps, Fire TV, or offline sources, set the Event Action Source in each mapping to the appropriate value: `android`, `ios`, `fire_tv`, or `offline`.
56+
57+
## Supported event types
58+
59+
Amazon Conversions API supports the following standard event types:
60+
61+
| Event Type | Description |
62+
| ---------- | ----------- |
63+
| ADD_TO_SHOPPING_CART | When a user adds an item to their shopping cart |
64+
| APPLICATION | When a user submits an application |
65+
| CHECKOUT | When a user initiates a checkout process |
66+
| CONTACT | When a user submits contact information |
67+
| LEAD | When a user perform an action that initiates a sales lead |
68+
| OFF_AMAZON_PURCHASES | When a user completes a purchase |
69+
| MOBILE_APP_FIRST_START | When a user opens a mobile app for the first time |
70+
| PAGE_VIEW | When a user views a page |
71+
| SEARCH | When a user performs a search |
72+
| SIGN_UP | When a user creates an account |
73+
| SUBSCRIBE | When a user subscribes to a service |
74+
| OTHER | For custom events that don't fit into the standard types |
75+
76+
## Match keys for user identification
77+
78+
Amazon requires at least one match key to identify the user associated with each conversion event. Amazon Conversions API supports the following match keys:
79+
80+
| Match Key | Description |
81+
| --------- | ----------- |
82+
| email | User's email address (is hashed) |
83+
| phone | User's phone number (is hashed) |
84+
| firstName | User's first name (is hashed) |
85+
| lastName | User's last name (is hashed) |
86+
| address | User's street address (is hashed) |
87+
| city | User's city (is hashed) |
88+
| state | User's state (is hashed) |
89+
| postalCode | User's postal code (is hashed) |
90+
| maid | Mobile advertising ID (ADID, IDFA, or FIREADID) |
91+
| rampId | RAMP ID for attribution to traffic events |
92+
| matchId | Custom match ID for the user |
93+
94+
Segment automatically maps these fields from standard identity traits when available.
95+
96+
## Consent management
97+
98+
For EU advertisers and users, Amazon requires consent information to be included with conversion events. The Amazon Conversions API supports several consent mechanisms.
99+
100+
### Geographic consent (IP Address)
101+
102+
For basic consent management, include the user's IP address. Segment automatically maps this from the context.ip field when available.
103+
104+
### Amazon consent format
105+
106+
Amazon-specific consent format with two primary fields:
107+
108+
| Consent Field | Description | Values |
109+
| ------------- | ----------- | ------ |
110+
| amznAdStorage | Whether the user has consented to cookie-based tracking | GRANTED, DENIED |
111+
| amznUserData | Whether the user has consented to use personal data for advertising | GRANTED, DENIED |
112+
113+
### Industry standard consent
114+
115+
For more comprehensive consent management:
116+
117+
| Consent Field | Description |
118+
| ------------- | ----------- |
119+
| tcf | Transparency and Consent Framework (TCF) encoded string |
120+
| gpp | Global Privacy Platform (GPP) encoded string |
121+
122+
## Data processing options
123+
124+
The Amazon Conversions API supports data processing options to control how events are processed:
125+
126+
| Option | Description |
127+
| ------ | ----------- |
128+
| LIMITED_DATA_USE | Signals that an event should be processed with limited data use restrictions. Events marked with this option won't be used for advertising purposes. |
129+
130+
## Custom attributes
131+
132+
You can include custom attributes with your events to provide additional context. Each custom attribute has:
133+
134+
- **Name**: Identifier for the attribute (only letters, numbers, and underscores allowed)
135+
- **Data Type**: STRING, NUMBER, or BOOLEAN
136+
- **Value**: The attribute value (maximum 256 characters)
137+
138+
## FAQ
139+
140+
#### How does deduplication work?
141+
142+
Amazon Conversions API uses the `clientDedupeId` field to prevent duplicate events. By default, Segment maps the messageId to this field. For events with the same clientDedupeId, only the latest event will be processed.
143+
144+
#### What regions are supported?
145+
146+
Amazon Conversions API supports three regions:
147+
- North America (NA)
148+
- Europe (EU)
149+
- Far East (FE)
150+
151+
Select the region that corresponds to your Amazon Advertising account.
152+
153+
#### What are the requirements for OFF_AMAZON_PURCHASES events?
154+
155+
OFF_AMAZON_PURCHASES events have additional optional fields:
156+
- `currencyCode`: The currency of the purchase in ISO-4217 format (e.g., USD, EUR)
157+
- `unitsSold`: The number of items purchased (defaults to 1 if not provided)
158+
159+
#### How are PII fields handled?
160+
161+
Personally identifiable information (PII) fields like email, phone, name, and address are automatically hashed before sending to Amazon.
162+
163+
#### How can I verify events in Amazon?
164+
165+
After you start sending events, you should see them in your Amazon Advertising dashboard under conversion tracking reports. Allow some time for the events to be processed and attributed.

‎src/connections/destinations/catalog/actions-intercom-cloud/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,8 @@ If a company is created without an attached user, the company does not appear on
4747

4848
### Why isn’t a user getting attached to a company?
4949
When you use the Identify Company action, Segment creates or updates a company's information. In the same action, Segment also attaches the user in your group call to that company. If the user doesn't exist in Intercom when the action runs, Segment creates or updates the company but can't attach the user. Ensure the user is created in Intercom first.
50+
51+
### Why do I get a 404 Not Found error when sending Track events to Intercom?
52+
A `404 Not Found` error typically occurs when attempting to update a user in Intercom who does not yet exist in the system. This can happen if an Identify event, which includes the corresponding `userId`, was not sent before the Track event that resulted in the `404` error.
53+
54+
To resolve this, ensure that Identify events are sent **before** Track events to ensure proper processing and avoid errors.

‎src/connections/destinations/catalog/actions-reddit-audiences/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Reddit Audiences
33
id: 66f2b0f961bb2128729079bb
4+
redirect_from: '/connections/destinations/catalog/reddit-audiences/'
45
---
56

67
{% include content/plan-grid.md name="actions" %}

‎src/connections/destinations/catalog/actions-reddit-conversions-api/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Reddit Conversions API
33
id: 66cc766ef4b1c152177239a0
4+
redirect_from: '/connections/destinations/catalog/reddit-conversions-api/'
45
---
56

67
{% include content/plan-grid.md name="actions" %}

‎src/connections/functions/insert-functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ You can manually test your code from the functions editor:
239239
- Error messages display errors surfaced from your function.
240240
- Logs display any messages to console.log() from the function.
241241

242-
> warning ""
243-
> The Event Tester and Mapping Tester don't support Insert Functions. They won't apply an Insert Function, show its impact on your data, or send data through the Insert Function pipeline. Use the Function Tester instead to evaluate how your Insert Function affects your data.
242+
> success ""
243+
> Segment supports Insert Functions in both the Event Tester and Mapping Tester.
244244
245245
## Save and deploy the destination insert function
246246

‎src/connections/sources/catalog/libraries/website/javascript/faq.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ Analytics.js doesn't automatically collect IPv6 addresses. If IPv6 is available
99

1010
## Is there a size limit on requests?
1111

12-
Yes, the limit is 32KB per event message. Events with a payload larger than 32KB are not accepted by Analytics.js. Segment servers return a 400 response with the error message: `Exceed payload limit`.
12+
Yes, the limit is 32 KB per event message. Events with a payload larger than 32 KB are not accepted by Analytics.js. Segment servers return a 400 response with the error message: `Exceed payload limit`.
1313

1414
## If Analytics.js fails to load, are callbacks not fired?
1515

16-
In the event that Analytics.js does not load, callbacks passed into your API calls do not fire. This is as designed, because the purpose of callbacks are to provide an estimate that the event was delivered and if the library never loads, the events won't be delivered.
16+
In the event that Analytics.js does not load, callbacks passed into your API calls do not fire. This is by design, because the purpose of a callback is to provide an indication that the event was delivered. If the library never loads, the events won't be delivered.
1717

1818
## Is there an updated version of the Segment snippet?
1919
Segment released an updated version of the Analytics.js snippet, which introduces several enhancements and fixes that might improve your setup. For a full list of version updates, see the Analytics.js snippet's [Releases](https://github.com/segmentio/snippet/releases){:target="_blank”}.
2020

21-
You can find the latest version of the Segment snippet in your JavaScript source's Overview tab or in the [Quickstart: Analytics.js](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2a-add-the-segment-snippet) documentation.
21+
You can find the latest version of the Segment snippet in your JavaScript source's **Overview** tab or in the [Quickstart: Analytics.js](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2a-add-the-segment-snippet) documentation.
2222

2323
While there is no deadline to upgrade your snippet to the latest version, upgrading lets you use the latest improvements in the Segment library.
2424

@@ -27,16 +27,16 @@ While there is no deadline to upgrade your snippet to the latest version, upgrad
2727

2828
In May 2018, Segment began collecting client-side performance metrics in Analytics.js. This includes metrics like:
2929

30-
- When client side integrations are initialized and when they fail
31-
- When messages are sent to client side integrations and when they fail
30+
- When client-side integrations are initialized and when they fail
31+
- When messages are sent to client-side integrations and when they fail
3232

33-
Segment added these metrics to proactively identify and resolve issues with individual client-side integrations. These metrics are connected to alerts that notify Segment's on-call engineers to take action on these quickly.
33+
Segment added these metrics to proactively identify and resolve issues with individual client-side integrations. These metrics trigger alerts that notify Segment's on-call engineers to take action promptly.
3434

3535
There should be no noticeable impact to your data flow. You may notice Analytics.js make an extra network request in the network tab to carry the metrics data to Segment's servers. This extra network request is not made frequently, since the data is sampled and batched every 30 seconds.
3636

3737
## How are properties with `null` and `undefined` values treated?
3838

39-
Segment treats property values set to `null` as null values and drops events set to`undefined`.
39+
Segment treats property values set to `null` as null values and drops events set to `undefined`.
4040

4141
For example:
4242

@@ -48,6 +48,7 @@ console.log(JSON.stringify({ x: undefined, y: 6 }));
4848
// expected output: "{"y":6}"
4949
```
5050
Segment uses the [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify){:target="blank"} method under the hood.
51+
5152
## Can I overwrite the context fields?
5253

5354
Yes. This can be useful if some of these fields contain information you don't want to collect.
@@ -65,7 +66,7 @@ analytics.track("Receipt Viewed", {}, {
6566
```
6667
This works for any [context field](/docs/connections/spec/common/#context) that Segment automatically collects.
6768

68-
When working with Page calls, you can overwrite context fields by following the above instructions. However, because the `context.page` fields are also available in the `properties` parameter for page calls, you must also prevent the same fields in the `properties` parameter from being included in your Page call. Use the code in the following example to overwrite `url` available in context field `page.url` and properties parameter:
69+
When working with Page calls, you can overwrite context fields by following the above instructions. However, because the `context.page` fields are also available in the `properties` parameter for Page calls, you must also prevent the same fields in the `properties` parameter from being included in your Page call. Use the code in the following example to overwrite `url` available in context field `page.url` and properties parameter:
6970

7071
```js
7172
analytics.page("Receipt Page", {
@@ -79,7 +80,7 @@ analytics.page("Receipt Page", {
7980

8081
## Can I add context fields that do not already exist?
8182

82-
Yes. You can add context fields by passing them into the options object as the third argument of the event call. For example, the analytics.js library does not automatically collect location information, but you can add it to the context object. To add location information into the context object, pass it into the third argument as in the following example:
83+
Yes. You can add context fields by passing them into the options object as the third argument of the event call. For example, the Analytics.js library does not automatically collect location information, but you can add it to the context object. To add location information into the context object, pass it into the third argument as in the following example:
8384

8485
```js
8586
analytics.track("Order Completed", {}, {
@@ -97,7 +98,7 @@ Some destinations accept properties only. As a result, custom context fields you
9798

9899
## What is the impact of exposing the source's write keys?
99100

100-
Segment's library architecture requires you to expose the write key for client-side tracking to work. Other major tools, like Google Analytics, Mixpanel, Kissmetrics, Hubspot, and Marketo, also require you to expose your write key.
101+
Segment's library architecture requires you to expose the write key for client-side tracking to work. Other major tools, like Google Analytics, Mixpanel, Kissmetrics, HubSpot, and Marketo, also require you to expose your write key.
101102

102103
If you see any unusual behavior associated with your write key, generate a new key immediately. To generate a new key, navigate to **Connections > Sources** and select your source. On the **Settings** tab, go to the **API Keys** section and click **Generate New Key**.
103104

@@ -126,7 +127,7 @@ You'll also need to modify the Segment script with your `nonce` tag, which shoul
126127
127128
## How is the referrer value set?
128129

129-
The Analytics.js library sets the `context.page.referrer` value from the [`window.document.referrer` property](https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer){:target="_blank"} set in the browser. If you notice unexpected referrer values reaching Segment, check how this value is being set on your website.
130+
The Analytics.js library sets the `context.page.referrer` value from the [`window.document.referrer` property](https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer){:target="_blank"} set in the browser. If you notice unexpected referrer values reaching Segment, check how this value is set on your website.
130131

131132
## Are there any rate limits in place for the CDN settings endpoint?
132133

@@ -142,4 +143,4 @@ If you need this functionality, you have a couple of options:
142143
**Use a third-party API**: Alternatively, you can use third-party services like Geolocation API to convert IP addresses to geolocation data. Afterward, you can pass this information as a trait in Identify calls or as a property in Track calls to Segment. This allows you to manage geolocation data according to your specific needs, though it will likely require engineering resources.
143144

144145
## Why is my payload populating incorrectly?
145-
Payload parameters aren't populated in a guaranteed order. Your payload should still be ingested as long as all necessary parameters are included.
146+
Payload parameters aren't populated in a guaranteed order. Your payload will still be ingested as long as all necessary parameters are included.

‎src/connections/sources/catalog/libraries/website/javascript/identity.md

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ title: Managing identity in Analytics.js
33
strat: ajs
44
---
55

6-
This page explains how Analytics.js identifies users, and passes userID and anonymousID data, and how to override and change this information.
6+
This page explains how Analytics.js identifies users, passes `userID` and `anonymousID` data, and how to override and change this information.
77

8-
## Segment ID Persistence
8+
## Segment ID persistence
99

10-
To ensure high fidelity, first-party customer data, Segment writes the user's IDs to the user's local storage, and uses that as the Segment ID on the cookie whenever possible. Local Storage is meant for storing this type of first-party customer information.
10+
To ensure high fidelity, first-party customer data, Segment writes the user's IDs to the user's local storage, and uses that as the Segment ID on the cookie whenever possible. Local storage is meant for storing this type of first-party customer information.
1111

1212
If a user returns to your site after the cookie expires, 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 the new cookie. If a user clears their cookies _and_ `localstorage`, all of the IDs are removed, and the user gets a completely new `anonymousID` when they next visit the page.
1313

@@ -30,8 +30,8 @@ Example:
3030
ajs_anonymous_id=%2239ee7ea5-b6d8-4174-b612-04e1ef3fa952
3131
```
3232

33-
You can override the default-generated anonymousID in code using the methods described below:
34-
- [Set anonymousId from the Segment snippet](#override-the-anonymous-id-from-the-segment-snippet) (before the `ready` method returns)
33+
You can override the default-generated `anonymousID` in code using the methods described below:
34+
- [Set anonymousId from the Segment snippet](#override-the-anonymous-id-from-the-segment-snippet) (before the Ready method returns)
3535
- [Use a call to override the anonymousID](#override-the-default-anonymous-id-with-a-call)
3636
- [Set `anonymousId` in the `options` object of a call](#override-the-anonymous-id-using-the-options-object)
3737

@@ -43,9 +43,9 @@ You can get the user's current `anonymousId` using the following call:
4343
analytics.user().anonymousId();
4444
```
4545

46-
If the user's `anonymousId` is `null` (meaning not set) when you call this function, Analytics.js automatically generated and sets a new `anonymousId` for the user.
46+
If the user's `anonymousId` is `null` (meaning not set) when you call this function, Analytics.js automatically generates and sets a new `anonymousId` for the user.
4747

48-
If you are using the npm library, the previous call returns a promise for `user()`. As a workaround, you'll need to grab the user's current `anonymousId` in the following way:
48+
If you're using the npm library, the previous call returns a promise for `user()`. As a workaround, you'll need to grab the user's current `anonymousId` in the following way:
4949

5050
```js
5151
analytics.instance?.user().anonymousId()
@@ -57,28 +57,28 @@ A user's `anonymousId` changes when any of the following conditions are met.
5757
5858
- The user clears their cookies _and_ `localstorage`.
5959
- Your site or app calls [`analytics.reset()`](/docs/connections/sources/catalog/libraries/website/javascript/#reset-or-logout) during in the user's browser session.
60-
- Your site or app calls `analytics.identify()` with a userId that is different from the current userId.
61-
- Your site or app is setting `ajs_user_id` to an empty string or calling `analytics.user().id('')` before calling `analytics.identify()`. This sequence of events will result in a new anonymousId being set when `analytics.identify()` is called.
60+
- Your site or app calls `analytics.identify()` with a `userId` that is different from the current `userId`.
61+
- Your site or app is setting `ajs_user_id` to an empty string or calling `analytics.user().id('')` before calling `analytics.identify()`. This sequence of events will result in a new `anonymousId` being set when `analytics.identify()` is called.
6262
6363
6464
### Override the Anonymous ID from the Segment snippet
6565
66-
You can also set the `anonymousId` immediately inside your Segment snippet, even before the `ready` method returns.
66+
You can also set the `anonymousId` immediately inside your Segment snippet, even before the Ready method returns.
6767
6868
```js
6969
analytics.load('writekey');
7070
analytics.page();
7171
analytics.setAnonymousId('ABC-123-XYZ');
7272
```
7373
74-
Use this method if you are queueing calls before `ready` returns and they require a custom `anonymousId`. Keep in mind that setting the `anonymousId` in Analytics.js does not overwrite the anonymous tracking IDs for any destinations you're using.
74+
Use this method if you are queueing calls before Ready returns and they require a custom `anonymousId`. Keep in mind that setting the `anonymousId` in Analytics.js does not overwrite the anonymous tracking IDs for any destinations you're using.
7575
7676
> info ""
77-
> Device-mode destinations that load their code on your site _might_ also set their own anonymous ID for the user that is separate and different from the Segment generated one. Some destinations use the Segment `anonymousId`. Read the documentation for each Destination to find out if a Destination sets its own ID.
77+
> Device-mode destinations that load their code on your site _might_ also set their own anonymous ID for the user that is separate and different from the Segment generated one. Some destinations use the Segment `anonymousId`. Read the documentation for each destination to find out if a destination sets its own ID.
7878
7979
### Override the default Anonymous ID with a call
8080
81-
If the default generated UUID does not meet your needs, you can override it `anonymousId` for the current user using either of the following methods.
81+
If the default generated UUID does not meet your needs, you can override the `anonymousId` for the current user with either of the following methods:
8282
8383
```js
8484
analytics.user().anonymousId('ABC-123-XYZ');
@@ -92,17 +92,19 @@ These methods behave exactly the same.
9292
9393
### Override the Anonymous ID using the options object
9494
95-
Or in the `options` object of [`identify`](/docs/connections/spec/identify/), [`page`](/docs/connections/spec/page/), or [`track`](/docs/connections/spec/track/) calls, like this:
95+
You can override the `anonymousID` in the `options` object of [Identify](/docs/connections/spec/identify/), [Page](/docs/connections/spec/page/), or [Track](/docs/connections/spec/track/) calls, like this:
9696
9797
98-
Set the anonymousId in the Options object using the format in the following examples.
98+
Set the `anonymousId` in the `options` object using the format in the following examples.
9999
100-
The custom anonymousId persists when you use these methods, even if you do not explicitly specify the anonymousId in the calls.
100+
The custom `anonymousId` persists when you use these methods, even if you do not explicitly specify the `anonymousId` in the calls.
101101
102-
For example, after the Track call below sets the anonId, any later track calls from this user will have the anonymousId of `ABC-123-XYZ`, even if it is not explicitly specified in the track call.
102+
For example, after a Track call sets the `anonymousID` to `ABC-123-XYZ`, any additional Track calls from this user will have the same `anonymousId`, even if it's not explicitly specified in the Track call.
103103
104104
#### Override anonymousId in an Identify call
105105
106+
You can override `anonymousID` with an Identify call. For example:
107+
106108
```js
107109
analytics.identify('user_123', {
108110
name: 'Jane Kim'
@@ -113,12 +115,16 @@ analytics.identify('user_123', {
113115
114116
#### Override anonymousId on a Page call
115117
118+
You can override `anonymousID` with a Page call. For example:
119+
116120
```js
117121
analytics.page({}, { anonymousId: 'ABC-123-XYZ' });
118122
```
119123
120124
#### Override anonymousId on a Track call
121125
126+
You can override `anonymousID` with a Track call. For example:
127+
122128
```js
123129
analytics.track('Email Clicked', {
124130
callToAction: 'Signup'
@@ -146,7 +152,7 @@ Consider this Identify event:
146152
```js
147153
analytics.identify('12091906-01011992', {
148154
plan_id: 'Paid, Tier 2',
149-
email: 'grace@usnavy.gov'
155+
email: 'grace@example.com'
150156
});
151157
```
152158
@@ -166,7 +172,7 @@ analytics.track('Clicked Email', {
166172
);
167173
```
168174
169-
This appends the `plan_id` trait to this Track event. This does _not_ add the name or email, since those traits were not added to the `context` object. You must do this for every following event you want these traits to appear on, as the `traits` object does not persist between calls.
175+
This appends the `plan_id` trait to the Track event. This does _not_ add the name or email, since those traits were not added to the `context` object. You must do this for every following event you want these traits to appear on, as the `traits` object does not persist between calls.
170176
171177
By default, non-Identify events (like Track or Page) **don't automatically collect user traits** from previous Identify calls. To include traits from an `identify()` event in later events, you'll need to add them manually to the `context.traits` object within the `options` parameter.
172178
@@ -180,9 +186,9 @@ Each Analytics.js method has an `options` parameter where you can pass the `cont
180186
Adding traits to events is especially useful if you're using [Actions destinations](/docs/connections/destinations/actions/), since it makes those traits available for mapping in the destination’s configuration.
181187
182188
183-
## Clearing Traits
189+
## Clearing traits
184190
185-
You can pass an empty object to the `traits` object to clear _all_ cached traits for a User or Group.
191+
You can pass an empty object to the `traits` object to clear _all_ cached traits for a user or group.
186192
187193
Traits are cached by default when you call the Identify and Group methods. You can clear the `traits` object for the user or group by passing `traits` an empty object:
188194
@@ -195,13 +201,13 @@ analytics.group().traits({});
195201
196202
## Using analytics.user() and analytics.group()
197203
198-
You can use the `user` or `group` method as soon as the Analytics.js library loads, to return information about the currently identified user or group. This information is retrieved from the user's cookie.
204+
You can use the User or Group method as soon as the Analytics.js library loads, to return information about the currently identified user or group. This information is retrieved from the user's cookie.
199205
200206
<!-- TODO: retrieves info from cookie, if they have any info - maybe link to the top section-->
201207
202208
203209
> success ""
204-
> **Tip:** You can wrap any reference to `user()` or `group()` in a [ready function block](/docs/connections/sources/catalog/libraries/website/javascript#ready) to ensure that Analytics.js has fully loaded so these methods are available.
210+
> You can wrap any reference to `user()` or `group()` in a [ready function block](/docs/connections/sources/catalog/libraries/website/javascript#ready) to ensure that Analytics.js has fully loaded so these methods are available.
205211
206212
Examples:
207213
@@ -228,7 +234,7 @@ analytics.ready(function() {
228234
229235
## Anonymizing IP
230236
231-
Segment automatically collects the user's IP address for device-based (iOS, Android, Analytics.js and Xamarin) events.
237+
Segment automatically collects the user's IP address for device-based (iOS, Android, Analytics.js, and Xamarin) events.
232238
233239
> info "IPv6"
234240
> At the moment, Segment doesn't support automatically collecting IPv6 addresses.

‎src/connections/sources/catalog/libraries/website/javascript/middleware.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,33 @@ strat: ajs
44
---
55

66

7-
Middlewares allow developers to extend Analytics.js with custom code which runs on every event. This code has full access to the DOM and Browser API, and helps customers enrich and transform event payloads. Source Middlewares and Destination Middlewares are available on the Analytics.js snippet version `4.12.0` and later.
7+
Middlewares allow developers to extend Analytics.js with custom code that runs on every event. This code has full access to the DOM and Browser API, and helps customers enrich and transform event payloads. Source and destination middlewares are available on the Analytics.js snippet version `4.12.0` and later.
88

9-
Analytics.js can be extended using two functions:
9+
Analytics.js can be extended using 2 functions:
1010

1111
```js
1212
addSourceMiddleware(middleware)
1313
addDestinationMiddleware(targetIntegration, middleware1, middleware2, ...)
1414
```
1515

16-
The first function (Source Middleware) allows you to manipulate the payload and filter events on a per-source basis, while the second function (Destination Middleware) allows this on a per destination basis. Middlewares run in the browser.
16+
The first function (source middleware) allows you to manipulate the payload and filter events on a per-source basis, while the second function (destination middleware) allows this on a per destination basis. Middlewares run in the browser.
1717

1818
> info ""
19-
> **Note**: Destination-middleware only act on [data sent to destinations in device-mode](/docs/connections/destinations#connection-modes). Since the destination middleware code exists in your app or project, it cannot transform the data sent from the Segment servers to the destination endpoint.
19+
> Destination-middleware only act on [data sent to destinations in device-mode](/docs/connections/destinations#connection-modes). Since the destination middleware code exists in your app or project, it cannot transform the data sent from the Segment servers to the destination endpoint.
2020
21-
## Using Source Middlewares
21+
## Using source middlewares
2222

2323
To add source middleware, use the following API:
2424

2525
```js
2626
analytics.addSourceMiddleware(({ payload, next, integrations }) => .... )
2727
```
2828

29-
- `payload` represents the event payload sent by Analytics.js. To change the value of the `payload`, mutate the `payload.obj` object. (See the example below.)
29+
- `payload` represents the event payload sent by Analytics.js. To change the value of the `payload`, mutate the `payload.obj` object, as in the example below.
3030
- `next` represents the next function to be called in the source middleware chain. If the middleware provided does not call this function, the event is dropped on the client and is not delivered to Segment or any destinations.
31-
- `integrations` is an array of objects representing all the integrations that the payload is sent to. If an integration in this array is set to a ‘falsey' value then the event is not be sent to the Integration.
31+
- `integrations` is an array of objects representing all the integrations that the payload is sent to. If an integration in this array is set to a falsy value, then the event is not sent to the integration.
3232

33-
### Examples
34-
#### Modifying an event
33+
#### Example: Modifying an event
3534
```js
3635
analytics.addSourceMiddleware(({ payload, next }) => {
3736
const { event } = payload.obj.context
@@ -42,7 +41,7 @@ analytics.addSourceMiddleware(({ payload, next }) => {
4241
});
4342
```
4443

45-
#### Dropping an event
44+
#### Example: Dropping an event
4645
```js
4746
analytics.addSourceMiddleware(({ payload, next }) => {
4847
const { event } = payload.obj.context
@@ -53,7 +52,7 @@ analytics.addSourceMiddleware(({ payload, next }) => {
5352
});
5453
```
5554

56-
## Using Destination Middlewares
55+
## Using destination middlewares
5756

5857

5958
To add destination middleware, use the following API:
@@ -62,7 +61,7 @@ To add destination middleware, use the following API:
6261
analytics.addDestinationMiddleware('integrationA', ({ payload, next, integration }) => .... )
6362
```
6463

65-
- `payload` represents the event payload sent by Analytics.js. To change the value of the `payload`, mutate the `payload.obj` object. (See the example below.)
64+
- `payload` represents the event payload sent by Analytics.js. To change the value of the `payload`, mutate the `payload.obj` object, as in the example below.
6665
- `next` represents the next function to be called in the destination middleware chain. If the middleware provided does not call this function, then the event is dropped completely for the given destination.
6766
- `integration` is a string value representing the integration that this middleware is applied to. To apply middleware to all destinations (excluding Segment.io), you can use the `*` value.
6867

@@ -87,29 +86,29 @@ analytics.addDestinationMiddleware('integrationA', ({ payload, next, integration
8786
8887
8988
> info ""
90-
> **Note**: Destination-middleware only act on [data sent to destinations in device-mode](/docs/connections/destinations#connection-modes). Since the destination middleware code exists in your app or project, it cannot transform the data sent from the Segment servers to the destination endpoint.
89+
> Destination middleware only act on [data sent to destinations in device-mode](/docs/connections/destinations#connection-modes). Since the destination middleware code exists in your app or project, it cannot transform the data sent from the Segment servers to the destination endpoint.
9190
9291
## Adding middlewares to Analytics.js
9392
94-
The above defined Source & Destination Middleware can be added to the Analytics.js execution chain as:
93+
The above defined source and destination middleware can be added to the Analytics.js execution chain as:
9594
9695
```js
9796
analytics.addSourceMiddleware(() => ...);
9897
analytics.addDestinationMiddleware('integrationA', () => ...);
9998
```
10099
101100
102-
You can call the `.addSourceMiddleware(fn)` multiple times, and the order of operations reflects the order in which you register your Source Middleware.
101+
You can call the `.addSourceMiddleware(fn)` multiple times, and the order of operations reflects the order in which you register your source middleware.
103102
104103
Both `.addSourceMiddleware(fn)` and `.addDestinationMiddleware('integration', fn, ...)` can be called before [`.load()`](/docs/connections/sources/catalog/libraries/website/javascript/#load-options).
105104
106-
## Braze Middleware
105+
## Braze middleware
107106
108-
If you use the Braze (Appboy) destination in either [cloud or device mode](/docs/connections/destinations/#connection-modes) you can save Braze costs by "debouncing" duplicate `identify()` calls from Segment by adding our [open-source Middleware tool](https://github.com/segmentio/segment-braze-mobile-middleware) to your implementation.
107+
If you use the Braze (Appboy) destination in either [cloud or device mode](/docs/connections/destinations/#connection-modes) you can reduce Braze costs by debouncing duplicate Identify calls from Segment. You can achieve this by adding Segment's [open-source middleware tool](https://github.com/segmentio/segment-braze-mobile-middleware){:target="_blank"} to your implementation.
109108
This optional middleware is disabled by default. When enabled, it ensures that only events where at least one changed trait value are sent to Braze, and events with duplicate traits are not sent.
110109
111-
To enable this Middleware for a JavaScript or Project source, go to `Analytics.js` in your source settings.
110+
To enable this middleware for a JavaScript or Project source, go to **Analytics.js** in your source settings.
112111
113112
![BrazeMiddleware](images/sources_ajs_brazemiddleware.png)
114113
115-
More information about this tool and how it works [is available in the project's README](https://github.com/segmentio/segment-braze-mobile-middleware/blob/master/README.md#how-does-this-work).
114+
More information about this tool and how it works is available in the project's [README](https://github.com/segmentio/segment-braze-mobile-middleware/blob/master/README.md#how-does-this-work){:target="_blank"}.

‎src/connections/sources/catalog/libraries/website/javascript/querystring.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,20 @@ Here are the *optional* query parameters to use:
1515
| `ajs_prop_<property>` | A property to pass to the Track call. | This won't implicitly trigger an event and is dependent on you also passing `ajs_event`. This property is included in the resulting Track call. |
1616
| `ajs_trait_<trait>` | A trait to pass to the Identify call. | This won't implicitly trigger any call and is dependent on you also passing `ajs_uid`. This trait is included in the resulting Identify call. |
1717

18-
For example, this URL:
18+
For example, this URL creates the following events on the page:
1919

2020
```text
2121
http://segment.com/?ajs_uid=123456789abcd&ajs_event=Clicked%20Email&ajs_aid=abc123&ajs_prop_emailCampaign=First+Touch&ajs_trait_name=Karl+Jr.
2222
```
23-
24-
would create the following events on the page.
23+
Each trigger parameter is optional. You can pass up to **1 of each trigger parameter**, as shown in the following example:
2524

2625
```js
2726
analytics.identify('123456789abcd', { name: 'Karl Jr.' });
2827
analytics.track('Clicked Email', { 'emailCampaign': 'First Touch' });
2928
analytics.user().anonymousId('abc123');
3029
```
3130

32-
Each trigger parameter is optional. You can pass up to **one of each trigger parameter** as shown in the example above.
31+
3332

3433

3534
## How can I control query string processing?
@@ -47,13 +46,13 @@ You can also keep query string processing on, but enforce validation rules. For
4746
```js
4847
analytics.load('<WRITE_KEY>', {
4948
useQueryString: {
50-
// set a pattern for anonymous id
49+
// set a pattern for anonymousId
5150
aid: /([A-Z]{10})/,
52-
// set a pattern for user id
51+
// set a pattern for userId
5352
uid: /([A-Z]{6})/
5453
}
5554
})
5655
```
5756

5857
> info ""
59-
> The `useQueryString` option is **only** available when you load analytics.js through the [NPM package](https://www.npmjs.com/package/@segment/analytics-next){:target="_blank"}.
58+
> The `useQueryString` option is **only** available when you load Analytics.js through the [npm package](https://www.npmjs.com/package/@segment/analytics-next){:target="_blank"}.

‎src/connections/sources/catalog/libraries/website/javascript/single-page-apps.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ title: Single Page Applications
33
strat: ajs
44
---
55

6-
While Single Page Apps (SPAs) are great for many reasons, they do require some extra consideration in order to set up client-side tracking than with a traditional webpage.
6+
While Single Page Apps (SPAs) offer many benefits, setting up client-side tracking requires extra consideration compared to traditional web pages.
77

8-
By default, the Segment analytics.js library doesn’t generate or store the referrer value. Instead, the referrer value you see in the payload is the value returned by `document.referrer` directly from the browser, and the URL value is the canonical URL on the page.
8+
By default, the Segment Analytics.js library doesn’t generate or store the referrer value. Instead, the `referrer` value you see in the payload is the value returned by `document.referrer` directly from the browser, and the `url` value is the canonical URL on the page.
99

10-
When a user navigates between pages on an SPA website, there won’t be a referrer because there is no concept of a new page since it’s all a single page load. This means that the referrer will always be the same as it was on the first page call where someone was first directed to your site. However, in order to circumvent this, you can manually set the referrer and URL in your Segment calls by updating the context object.
10+
When a user navigates between pages on an SPA website, there won’t be a referrer because there is no concept of a new page since it’s all a single page load. This means that the referrer will always be the same as it was on the first page call where someone was first directed to your site. However, in order to circumvent this, you can manually set the `referrer` and `url` values in your Segment calls by updating the context object.
1111

12-
For example, a Page call with the referrer and URL manually set looks like this:
12+
For example, a Page call with the `referrer` and `url` manually set looks like this:
1313

1414
```js
1515
analytics.page({
@@ -29,20 +29,20 @@ analytics.track('Example Event', {}, {page: {
2929

3030
## Tracking emulated page views
3131

32-
Your application should update the URL in the address bar to emulate traditional webpage navigation. Full page requests aren't made in most of these instances since the resources are loaded on initial page load. This means that the Page call in the traditional analytics.js snippet won't fire again as a user navigates around your site.
32+
Your application should update the URL in the address bar to emulate traditional webpage navigation. Full page requests aren't made in most of these instances since the resources are loaded on initial page load. This means that the Page call in the traditional Analytics.js snippet won't fire again as a user navigates around your site.
3333

34-
You should still place the snippet in the head of your site, but you should remove the Page call and fire it whenever you're emulating a page load. Segment recommends that you call [Page](/docs/connections/sources/catalog/libraries/website/javascript/#page) from the same block of logic that updates the view and URL path like below:
34+
You should still place the snippet in the `<head>` of your site, but you should remove the Page call and fire it whenever you're emulating a page load. Segment recommends that you call [Page](/docs/connections/sources/catalog/libraries/website/javascript/#page) from the same block of logic that updates the view and URL path, as shown below:
3535

3636
```js
3737
// The new view has been called to render
3838
analytics.page("Home")
3939
```
4040

41-
To track more than the page field, pass those fields in as additional properties. Segment recommends that you use variables to set information about page properties, rather than hard-coding. In most SPA frameworks, you can automate this by attaching the Page call to the routing service.
41+
To track more than the page field, pass those fields in as additional properties. Segment recommends that you use variables to set information about page properties, rather than hardcoding them. In most SPA frameworks, you can automate this by attaching the Page call to the routing service.
4242

4343
## What to do with code that lives in the analytics.ready() function?
4444

45-
Analytics.js ships with a function called analytics.ready() which lets you make calls to the native integrations that Segment loads for you before they actually initialize. For instance, this is where you could choose to load a live chat widget only for users that you haven't yet identified with a userId.
45+
Analytics.js ships with a function called `analytics.ready()` which lets you make calls to the native integrations that Segment loads for you before they actually initialize. For instance, this is where you could choose to load a live chat widget only for users that you haven't yet identified with a `userId`.
4646

4747
Since the code in the head of your website is executed only on initial page load or a refresh, you can still make calls to those native tools, but they won't run on each emulated page view.
4848

‎src/connections/sources/catalog/libraries/website/javascript/troubleshooting.md

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,28 @@ title: Troubleshooting Analytics.js
33
strat: ajs
44
---
55

6-
The console reveals all. [Learn how to access the JavaScript console in each browser](#how-do-i-open-the-javascript-console-in-your-debugger).
7-
Any Analytics.js methods may be executed manually. Use the Network tab to inspect requests.
6+
To help you troubleshoot common issues when implementing Analytics.js, this page covers steps to verify your implementation, resolve errors, and ensure that data correctly flows to your destinations.
7+
8+
> info ""
9+
> You can manually execute any Analytics.js methods. Use the **Network** tab to inspect requests. [Learn how to access the JavaScript console in each browser](#how-do-i-open-the-javascript-console-in-your-debugger).
810
911
## Are you loading Analytics.js?
1012

11-
Open the JavaScript console and enter `analytics`. Does it return an object, as seen below?
13+
Open the JavaScript console and enter `analytics`. If it returns an object, as shown below, then you're successfully loading Analytics.js onto your website.
1214

1315
![Returning analytics object](images/VOsmoAB.gif)
1416

15-
The object means that you are successfully loading Analytics.js onto your website. If you get an `undefined` error, Analytics.js is not loading successfully:
17+
If you get an `undefined` error, Analytics.js is not loading successfully:
1618

1719
![Returning analytics object error](images/CFsktto.gif)
1820

1921
Segment also provides a Chrome web extension, [Segment Inspector](/docs/connections/sources/catalog/libraries/website/javascript/index.html#segment-inspector), which you can use to validate that you're successfully loading Analytics.js.
2022

21-
Solution: [Follow the Analytics.js Quickstart Guide](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/)
23+
To learn more, follow the [Analytics.js Quickstart Guide](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/).
2224

2325
## Are you loading two instances of Analytics.js?
2426

25-
Note that you *cannot* load Analytics.js twice on the same page, even if you're using different write keys. You might encounter `Uncaught RangeError: Maximum call stack size exceeded`. You can conditionally set the write key based on an environment variable.
27+
Note that you *cannot* load Analytics.js twice on the same page, even if you're using different write keys. If you do, you might encounter `Uncaught RangeError: Maximum call stack size exceeded`. Instead, you can conditionally set the write key based on an environment variable.
2628

2729
Example:
2830
```js
@@ -34,27 +36,27 @@ ENV === 'production' ? writeKey = 'A' : writeKey = 'B';
3436

3537
The error can occur for different reasons:
3638

37-
* Snippet syntax: Ensure you correctly added the Segment snippet to the page. Check for any missing or extra characters. Follow [this guide](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2-install-segment-to-your-site).
39+
- Snippet syntax: Ensure you correctly added the Segment snippet to the page. Check for any missing or extra characters. Follow [this guide](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2-install-segment-to-your-site).
3840

39-
* NPM package: If you're using Segment through NPM, refer to [this guide](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2b-install-segment-as-a-npm-package).
41+
- npm package: If you're using Segment through npm, refer to [this guide](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2b-install-segment-as-a-npm-package).
4042

41-
* Browser cache: Clear the browser cache, as this is a common cause for `ChunkLoadError`.
43+
- Browser cache: Clear the browser cache, as this is a common cause for `ChunkLoadError`.
4244

43-
* Cloudflare caching: If you use Cloudflare to proxy Segment, disable caching for the Segment JS file.
45+
- Cloudflare caching: If you use Cloudflare to proxy Segment, disable caching for the Segment JS file.
4446

4547
## Do you see events appear in your debugger?
4648

47-
When you reload the page, does your debugger show a new [`page`](/docs/connections/spec/page)? You can also check the JavaScript console in the browser and manually fire an event, like an Identify call, which would show up in the debugger.
49+
When you reload the page, does your debugger show a new [Page call](/docs/connections/spec/page)? You can also check the JavaScript console in the browser and manually fire an event, like an Identify call, which would show up in the debugger.
4850

49-
- You can also use [Segment's Chrome extension](/docs/connections/sources/catalog/libraries/website/javascript/index.html#segment-inspector)to inspect events.
51+
- You can use [Segment's Chrome extension](/docs/connections/sources/catalog/libraries/website/javascript/index.html#segment-inspector) to inspect events.
5052

51-
![Making an identify call](images/7Ymnh2S.gif)
53+
![Making an Identify call](images/7Ymnh2S.gif)
5254

53-
If the call doesn't appear in the debugger, open up the JavaScript console and check the Network tab to see if the outbound web services requests are being initiated:
55+
If the call doesn't appear in the debugger, open the JavaScript console and check the **Network** tab to see if the outbound web services requests are being initiated:
5456

5557
![Checking for calls in the network tab](images/d8CmIY2.png)
5658

57-
In the above, the `p` is a [`page`](/docs/connections/spec/page) call and the `i` is an [`identify`](/docs/connections/spec/identify) call. If you don't at least see the `p`, then check if you are loading Analytics.js correctly.
59+
In the above, the `p` is a [Page](/docs/connections/spec/page) call and the `i` is an [Identify](/docs/connections/spec/identify) call. If you don't at least see the `p`, verify that you are loading Analytics.js correctly.
5860

5961
## Using the Segment Chrome extension to validate your implementation
6062

@@ -65,18 +67,18 @@ The [Segment Inspector](/docs/connections/sources/catalog/libraries/website/java
6567

6668
Some destinations send data directly from the website to their servers. You can check the Network tab in your JavaScript console to see the outbound web services requests being initiated.
6769

68-
In the image below, with Google Analytics as an example, the `page` call forms an outbound request that looks like this:
70+
Using Google Analytics as an example, the Page call forms an outbound request that looks like this:
6971

7072
![Google Analytics outbound request](images/CBdS5dO.png)
7173

72-
If this outbound request is not showing up in the network when you fire an `identify` call, then check the following:
74+
If this outbound request is not showing up in the network when you fire an Identify call, then view the following sections for more troubleshooting steps.
7375

7476

75-
## Is your web site deployed under a domain on the Public Suffix List?
77+
## Is your website deployed under a domain on the Public Suffix List?
7678

7779
The [Public Suffix List](https://publicsuffix.org/list/){:target="blank"} is a catalog of certain Internet effective top-level domains, enumerating all domain suffixes controlled by registrars.
7880

79-
The implications of these domain suffixes is that first party cookies cannot be set on them. Meaning, `foo.example.co.uk` can share cookie access with `bar.example.co.uk`, but `example.co.uk` should be walled off from cookies at `example2.co.uk`. The latter two domains could be registered by different owners.
81+
The implications of these domain suffixes are that first party cookies cannot be set on them. Meaning, `foo.example.co.uk` can share cookie access with `bar.example.co.uk`, but `example.co.uk` should be walled off from cookies at `example2.co.uk`. The latter two domains could be registered by different owners.
8082

8183
Examples of domains on the Public Suffix List that are common in troubleshooting include:
8284

@@ -97,32 +99,32 @@ The JavaScript console reveals all requests, outbound and inbound, to your brows
9799
Alternatively, Segment provides the [Segment Inspector](/docs/connections/sources/catalog/libraries/website/javascript/index.html#segment-inspector), a Chrome web extension designed to enable debugging of your Segment integration in web applications that are instrumented with Analytics.js.
98100

99101

100-
## Analytics.js failing to load due to Ad Blockers or Browser Privacy Settings
102+
## Analytics.js failing to load due to ad blockers or browser privacy settings
101103

102104
Segment advises against circumventing tracking blockers or browser privacy settings for client-side tracking. The user has ultimate control as to what gets loaded on the page. Segment acknowledges that this can result in some data loss in client-side tracking and suggests [workarounds](/docs/connections/sources/catalog/libraries/website/javascript/index.html#tracking-blockers-and-browser-privacy-settings) to address this issue.
103105

104-
## Analytics.js and Destinations not tracking query string parameters on certain Safari iOS and MacOS Versions
106+
## Analytics.js and destinations not tracking query string parameters on certain Safari iOS and macOS versions
105107

106-
Due to updates in certain Safari iOS and MacOS versions, Segment's Analytics.js and Destinations tools might experience limitations in capturing query string parameters. As a result, you may notice some events missing campaign information.
108+
Due to updates in certain Safari iOS and macOS versions, Segment's Analytics.js and destinations tools might experience limitations in capturing query string parameters. As a result, you may notice some events missing campaign information.
107109

108110

109111
## Why am I seeing a "SameSite" warning?
110112

111113
If you see a warning like the following, it could have one of several causes:
112114
"A cookie associated with a cross-site resource at http://segment.com/ was set without the `SameSite` attribute [...]"
113115

114-
Segment correctly sets cookies with the 'SameSite' attribute with Analytics.js.
116+
Segment correctly sets cookies with the `SameSite` attribute with Analytics.js.
115117

116-
If you see this warning, it is because you previously visited http://segment.com, and are getting the warning due to unrelated cookies. To verify that this is the issue, visit your page in Incognito Mode and confirm that the warning no longer occurs. Your users won't see this warning unless they _also_ visited http://segment.com.
118+
If you see this warning, it's because you previously visited http://segment.com, and are getting the warning due to unrelated cookies. To verify that this is the issue, visit your page in Incognito Mode and confirm that the warning no longer occurs. Your users won't see this warning unless they _also_ visited http://segment.com.
117119

118120

119121
## Why am I seeing additional cookies on my website?
120122

121-
The AJS cookies being set under segment.com are first-party cookies. They are part of Segment's own implementation as well as the destination Segment uses. These cookies are not related to your implementation of Segment, and you only see them because you've visited Segment's domain using the same browser. They are sent to the writekey connected to Segment's own workspace, and are associated with the events Segment tracks when you visit segment.com.
123+
The Analytics.js cookies being set under segment.com are first-party cookies. They are part of Segment's own implementation as well as the destination Segment uses. These cookies are not related to your implementation of Segment, and you only see them because you've visited Segment's domain using the same browser. They are sent to the writekey connected to Segment's own workspace, and are associated with the events Segment tracks when you visit segment.com.
122124

123-
### Known Incompatibilities with Prototype.js
125+
### Known incompatibilities with Prototype.js
124126

125-
If you're having issues with your destinations loading with Prototype.js, there is a [known issue that was reported](https://github.com/prototypejs/prototype/issues/338){:target="_blank"} regarding this. In order to prevent the issues, you can preserve the original `Array.from` method without letting the prototype override it.
127+
If you're having issues with your destinations loading with Prototype.js, there is a [known issue that was reported](https://github.com/prototypejs/prototype/issues/338){:target="_blank"} regarding this. In order to prevent the issue, you can preserve the original `Array.from` method without letting the prototype override it.
126128

127129

128130
## Why am I getting an empty campaign object in my event payload?
@@ -133,6 +135,8 @@ Analytics.js generates a campaign object inside the context object whenever the
133135

134136
You may see events with timestamp discrepancies due to manual overriding of the timestamp value, mobile apps closed or set in the background, traffic from bots, or inaccurate device or browser time. For more information, see Segment's [Common Fields Spec](/docs/connections/spec/common/#why-are-events-received-with-timestamps-set-in-the-past-or-future).
135137

136-
## Known issues:
138+
## View additional known issues
139+
140+
You can review other known Analytics.js issues on [GitHub](https://github.com/segmentio/analytics.js/issues).
141+
137142

138-
[Review and contribute to these on GitHub](https://github.com/segmentio/analytics.js/issues).

‎src/connections/spec/track.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ _For instructions on how to pass fields to the context object for a specific lib
121121

122122
Segment's Actions destinations allows your team to build individual actions that are triggered based on a set of configured conditions. By adding the user's latest traits to the Track event's `context.traits` object, its possible to build two separate Actions to be triggered by this single event. For example, if your team would like to send an Identify event anytime the specific Track event "Button Clicked" is triggered, simply add the available traits into the Track event's payload, then build a destination Actions for the Track event : `Event Name is Button Clicked`, and a destination Action for the Identify event : `All of the following conditions are true: Event Name is Button Clicked, Event Context traits exists`, and then both Actions will have access to reference the `context.traits` fields within its mappings.
123123

124+
> info "Unify profiles require Identify calls"
125+
> Adding user traits to a Track or Page call using `context.traits` lets you send that data to Actions destinations, but it won’t update the user's profile in Unify. To update traits in Unify, use an Identify call instead.
126+
124127
For more information on the context object, please see the [Spec: Common Fields](https://segment.com/docs/connections/spec/common/#context) documentation.
125128

126129
<table>

‎src/engage/journeys/event-triggered-journeys-steps.md

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ plan: engage-foundations
77

88
Steps are the building blocks of a journey. This page explains the **Hold Until**, **Send to Destination**, and **Data split** steps, which enable precise control over journey progression and data delivery.
99

10-
> info "Public Beta"
11-
> Event-Triggered Journeys is in public beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available.
12-
1310
## Hold Until: smart pauses in journeys
1411

1512
The **Hold Until** step adds a deliberate pause in a journey, waiting for specific user actions or a predefined time limit before progressing. This lets you create highly personalized experiences by responding to user behavior (or the lack thereof) at the right moment.
@@ -176,6 +173,59 @@ You can use a Data split to branch profiles based on traits or audience membersh
176173

177174
This setup helps tailor journey experiences using reliable, preexisting data. Because the Data split step evaluates conditions instantly, it works best with traits or audience membership that Segment has already computed before the profile enters the step.
178175

176+
## Randomized Split (V2)
177+
178+
The **Randomized Split** step lets you experiment with and test the performance of different journey paths. You can add up to five branches, assign each one a percentage, and Segment will randomly send users down one of the branches based on the configured distribution.
179+
180+
This step is useful for A/B testing, holdout groups, and comparing different channels or messaging strategies within a single journey.
181+
182+
For example, you might create a randomized split that sends 40% of users to an email campaign, 40% to an SMS campaign, and 20% to a control group. Once users move through the split, you can evaluate which approach performed best.
183+
184+
### How Randomized Split works
185+
186+
When a profile reaches the Randomized Split step:
187+
188+
1. Segment randomly assigns the profile to one of the branches based on the defined percentages.
189+
2. The profile immediately moves down the assigned path.
190+
3. By default, if a user re-enters the journey later, they’re assigned a new random branch. You can optionally choose to keep them in the same branch each time they re-enter.
191+
192+
Segment evaluates each journey instance independently. This means a user could be assigned to different branches across multiple entries, unless you enable consistent assignment.
193+
194+
### Configuration options
195+
196+
You can configure a Randomized Split step with the following options:
197+
198+
| Setting | Description |
199+
| ---------------------------- | ---------------------------------------------------------------------------- |
200+
| Branches | Add up to five branches. Each branch must be assigned a percentage. |
201+
| Distribution percentages | Define what portion of users should go down each branch. Total must be 100%. |
202+
| Branch naming | Branches are labeled alphabetically (for example, Branch A, Branch B). |
203+
| Consistent branch assignment | Optionally ensure a user always enters the same branch on re-entry. |
204+
205+
Segment won't publish your journey if the percentages don’t add up to 100%, or if any percentage is left blank.
206+
207+
> info "Branch assignment is random"
208+
> The Randomized Split step uses probabilistic logic to assign users to branches. At lower volumes, actual distribution may not exactly match your configured percentages, but it tends to even out at scale.
209+
210+
To add a Randomized Split to your journey:
211+
212+
1. From the journey canvas, click **+** to add a new step.
213+
2. Select **Randomized Split**.
214+
3. Give the step a unique name.
215+
4. Add up to five branches and assign a percentage to each one.
216+
5. (Optional) Enable **Keep branch assignment consistent** if you want users to always go down the same branch on re-entry.
217+
6. Click **Save**.
218+
219+
Once configured, Segment routes profiles through this step based on your distribution settings.
220+
221+
### Analyze performance
222+
223+
After users pass through the Randomized Split step, you can view historical and in-progress counts for each branch in the Journey Overview.
224+
225+
You can measure results by total journey instances, unique profiles, funnel view, and in-progress view.
226+
227+
This helps you evaluate which branch is performing best and informs how you might structure future journeys.
228+
179229
## Send to Destination
180230

181231
The **Send to Destination** step lets you send journey data to one of your [configured Engage destinations](/docs/connections/destinations/), enabling real-time integration with tools like marketing platforms, analytics systems, or custom endpoints.

‎src/engage/journeys/event-triggered-journeys.md

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ Unlike traditional audience-based journeys that rely on pre-defined user segment
99

1010
On this page, you'll learn how to create an event-triggered journey, configure entry conditions, and work with published event-triggered journeys.
1111

12-
> info "Public Beta"
13-
> Event-Triggered Journeys is in public beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available.
14-
1512
## Overview
1613

1714
Event-triggered journeys help you create a responsive approach for time-sensitive use cases, like cart abandonment campaigns and transactional messages.
@@ -123,7 +120,44 @@ Segment built Event-Triggered Journeys to respond instantly to events, offering
123120
- **Editing and versioning**: After you publish an event-triggered journey, you won't be able to edit it. To modify a journey, create a new journey.
124121
- **Real-time delivery**: Event-Triggered Journeys aim for an expected delivery time of under 5 minutes from the moment an event is performed to when the payload reaches the destination, assuming there is no delay step in the journey. However, external factors outside of Segment's control may occasionally introduce latency.
125122

126-
## Use Cases
123+
## Observability
124+
125+
Segment provides built-in tools to help you understand how users move through your journeys. These features let you debug issues, verify behavior, and review step-by-step activity for individual users.
126+
127+
### Profile explorer: Journeys tab
128+
129+
From Profile explorer, you can view the journeys a user entered. For Event-Triggered Journeys (V2), you’ll see the total number of times the user has entered each journey; V1 journeys display only the current step.
130+
131+
To access Profile explorer:
132+
133+
1. From your Segment workspace, go to **Unify > Profile explorer** and open a user profile.
134+
2. Click the **Journeys** tab.
135+
136+
### Journey instance timeline
137+
138+
When you need to understand how a specific user moved through a journey, the Journey Instance Timeline shows a detailed, step-by-step view of the user’s path.
139+
140+
This view is useful for troubleshooting, testing, or verifying behavior after launch. You’ll see the exact sequence of events and timing for a single journey instance. Follow these steps to access the instance timeline:
141+
142+
- **Option 1**:
143+
1. Open a user profile from the Profile explorer.
144+
2. Click the **Journeys** tab, then click the name of the journey.
145+
- **Option 2**:
146+
1. From your Segment workspace, go to **Engage > Journeys**, then open the **Overview** tab.
147+
2. Use the **Search for a profile** field to look up the user by email or ID.
148+
3. Select a journey instance to view its full timeline.
149+
150+
### Profile activity
151+
152+
Use the **Profile activity** tab on the journey overview page to see a high-level log of entries, exits, and transitions across all users. This is helpful for filtering activity by time, user, or step, especially when you want to confirm how different users have moved through a journey.
153+
154+
Follow these steps to access Profile activity:
155+
156+
1. Go to **Engage > Journeys**.
157+
2. Select a journey and click the **Profile activity** tab.
158+
3. Use the filters to narrow down the results by user, time range, event type, or step name.
159+
160+
## Use cases
127161

128162
Event-Triggered Journeys can power a variety of real-time, personalized experiences. This section details some common scenarios to help you see how they might work in practice.
129163

‎src/engage/journeys/exit-rules.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ Journey exit rules automatically remove users from a journey when they meet spec
77

88
This page explains how exit rules work, how to configure them, when to use them, and how to track exits in your journey analytics. You'll also find example use cases, best practices, and key behavior notes to help you get started.
99

10-
> info "Public Beta"
11-
> Event-Triggered Journeys is in public beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available.
12-
1310
## How exit rules work
1411

1512
Segment continuously evaluates exit rules as users move through a journey. If a user performs an event that matches one of the configured rules, they exit immediately from their current step.

‎src/engage/journeys/journey-context.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ plan: engage-foundations
77

88
This page explains Journey context, which can help you dynamically adapt each journey to individual user interactions, creating highly relevant, real-time workflows.
99

10-
> info "Public Beta"
11-
> Event-Triggered Journeys is in public beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available.
12-
1310
## Overview
1411

1512
Unlike traditional audience-based journeys, which rely solely on user progress through predefined steps, event-triggered journeys capture and store the details of user-triggered events. This shift allows you to access the data that caused users to reach a specific step and use it to make more precise decisions throughout the journey.

‎src/engage/journeys/v2/limits.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
title: Journeys (V2) Product Limits
3+
plan: engage-foundations
4+
---
5+
6+
This page outlines product limitations for Event-Triggered (V2) Journeys.
7+
8+
## General limits
9+
10+
| Name | Limit | Description |
11+
| ------------------- | --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
12+
| Steps | 25 | Maximum number of steps per journey. |
13+
| Journey name | 73 characters | Maximum length for Journey names. Names must be unique. |
14+
| Step name | 73 characters | Maximum length for step names. |
15+
| Branch name | 73 characters | Maximum length for branch names within a split step. Branch names must be unique across the journey. |
16+
| Additional branches | 5 | Maximum number of branches supported in a split or Hold Until step. |
17+
| Delay duration | Minimum: 5 minutes<br>Maximum: 6 months | Allowed time range for Delay and Hold Until steps. |
18+
| Unique identifier | 500 characters | For “Re-enter every time event occurs” rules, you must define a unique identifier. The value is limited to 500 characters. |
19+
20+
21+
## Throughput
22+
23+
| Name | Limit | Description |
24+
| ------------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
25+
| Requests per second (RPS) | 25 events/sec/profile | Maximum events per second per Segment ID. Timer events are excluded. Excess events get dropped. |
26+
| Instances per profile | 25 concurrent instances | Maximum concurrent Journey instances per profile. |
27+
| Loop back branch | 100 instances | Maximum instances that can pass through a Wait Until loop-back. |
28+
29+
## Journey context
30+
31+
| Name | Limit | Description |
32+
| ------------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
33+
| Journey context object | No limit (subject to payload size) | No object limit in Journey context, but must remain within the 32 KB payload limit. |
34+
| Event name conflicts | Must be unique unless aliased | Duplicate event names in the Journey context will overwrite each other unless aliased using `[event_name] + [branch_name]`. |
35+
36+
## Send to destination
37+
38+
| Name | Limit | Description |
39+
| ---------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
40+
| Supported destinations | [Action destinations only](/docs/connections/destinations/actions/) | Segment only supports Action Destinations, Action List destinations, and Destination Functions in Journeys 2.0. |
41+
| Activations | 5 per destination step | Maximum number of Activations supported per destination step. |
42+
| Destination key | 31 characters | Segment auto-generates destination keys; they're not editable. |
43+
| Destination event name | 73 characters | Can be customized. Defaults to the destination step name. Event names do not need to be unique. Use the Sync Key (Computation Key) for disambiguation. |
44+
| Payload size | 32 KB (~700 lines) | Maximum allowed size of the payload sent to destinations. |
45+
| Parameter mappings | 100 mappings | Maximum number of field mappings per destination step. |
46+
47+
48+
## Data retention
49+
50+
| Name | Limit | Description |
51+
| ----------------------------------------------- | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
52+
| Journey instance data (while in progress) | 365 days | Maximum duration an instance can remain active before expiring. |
53+
| Journey instance data (after completed or exit) | 90 days | Data retention period after a profile completes or exits the journey. |
54+
| Analytics data | 3 years | Retention period for metrics data. |
55+
| Observability data | 3 years | Retention period for step activity and timeline data. |
56+
57+
## Analytics
58+
59+
| Name | Limit | Description |
60+
| -------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
61+
| Date range | 180 days | Maximum date range allowed for analytics queries. |
62+
| Timeout limit | 10 seconds | Maximum time an analytics query will run. |
63+
| Metric latency | 10 seconds | Expected delay before metrics update. Can increase with large volumes; 95% of events are targeted to appear in your workspace within 30 minutes. |
64+
| Update metrics | Manual browser refresh required | Analytics don't update dynamically. You'll need to refresh to see updates. |
65+
66+
67+
## Privacy and compliance
68+
69+
| Topic | Details |
70+
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
71+
| PII access | See [PII access](docs/segment-app/iam/roles/#pii-access) for more information. |
72+
| HIPAA eligibility | [HIPAA-Eligible Services](https://www.twilio.com/content/dam/twilio-com/global/en/other/hipaa/pdf/HIPAA-Eligible-Services.pdf){:target="_blank"} |
73+
| GDPR & BCR | See [Complying with the GDPR](/docs/privacy/complying-with-the-gdpr/) for more information. |
74+
75+
Segment complies with GDPR through Binding Corporate Rules (BCR). When a customer churns, BCR-initiated deletion removes the customer’s workspace and data. To request access to, correction of, or deletion of personal data, reach out to [Segment support](mailto:friends@segment.com).

‎src/unify/profiles-sync/tables.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ Profile raw tables contain records of changes to your Segment profiles and Ident
105105

106106
With raw tables, you have full control over the materialization of Profiles in your warehouse, as well as increased observibility.
107107

108-
Raw tables contain complete historical data when using historical backfill.
108+
Raw tables contain complete historical data when using historical backfill.
109+
110+
The `Timestamp` column will be empty for backfilled data because, during backfill, historical profile changes are inferred from the current state of the profile and do not reflect the actual change history.
109111

110112
### The id_graph_updates table
111113

0 commit comments

Comments
 (0)
Please sign in to comment.