Skip to content

Commit 8e9a846

Browse files
committed
clarification to the Ajs 2.0 migration doc [netlify-build]
1 parent fb5bcc0 commit 8e9a846

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/connections/sources/catalog/libraries/website/javascript/upgrade-to-ajs2.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,14 @@ If the source you intend to upgrade uses the in-domain instrumentation as well a
5252

5353
### Using a mix of Analytics.js Classic and 2.0 sources
5454

55-
If you're using a mix of Analytics.js Classic and 2.0 sources, the classic source won't be able to use the anonymous ID set by Analytics.js 2.0. In order to fix this, update all sources to 2.0.
55+
If you're using a mix of Analytics.js Classic and 2.0 sources, the classic source won't be able to use the `anonymousId` set by Analytics.js 2.0. In order to fix this, update all sources to 2.0.
56+
57+
Segment won't change the `anonymousId` value when a source is upgraded from Analytics.js Classic to Analytics.js 2.0. The previous `anonymousId` will still be used by the new library. The only exception is for the scenario below:
58+
* The user initiates the visit on the Analytics.js 2.0 subdomain (for example: `account.yourwebsite.com`), and Analytics.js 2.0 creates the `anonymousId`. When users visit another domain (for example: `yourwebsite.com`) where Analytics.js Classic is still being loaded, Analytics.js Classic can't read the Analytics.js 2.0 `anonymousId` and therefore recreates its own `anonymousId`.
59+
60+
> success ""
61+
> Segment recommends all subdomains to use the same version of Analytics.js for compatibility between `anonymousId`s.
62+
5663

5764
### Relying on Analytics.js Classic's `ajs_anonymous_id` cookie format
5865

0 commit comments

Comments
 (0)