Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ strat: ajs
Analytics.js, Segment's JavaScript source, makes it simple to send your data to any tool without having to learn, test or implement a new API every time.

> warning "Deprecation of Analytics.js Classic"
> On August 31, 2022, Segment will end support and maintenance for Analytics.js Classic, and on February 28, 2023, Segment will remove access to Analytics.js Classic.
> Segment ended support and maintenance for Analytics.js Classic on August 31, 2022. On February 28, 2023, Segment will remove access to Analytics.js Classic.
> <br><br>[Upgrade to Analytics.js 2.0](/docs/connections/sources/catalog/libraries/website/javascript/upgrade-to-ajs2) before access ends for Analytics.js Classic. See the [Analytics.js 2.0 docs](/docs/connections/sources/catalog/libraries/website/javascript/) to learn more about the new source.

## Getting Started
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ strat: ajs
Analytics.js 2.0 is fully backward compatible with Analytics.js Classic when you use the default Segment snippet in a standard implementation. To upgrade your sources, follow the manual upgrade steps below, or see the schedule for automatic migration. As with all upgrades, Segment recommends that you start development on a non-production source to test the upgrade process and outcome, prior to upgrading your production sources.

> warning "Deprecation of Analytics.js Classic"
> On August 31, 2022, Segment will end support and maintenance for Analytics.js Classic, and on February 28, 2023, Segment will remove access to Analytics.js Classic.
> Segment ended support and maintenance for Analytics.js Classic on August 31, 2022. On February 28, 2023, Segment will remove access to Analytics.js Classic.
> <br><br>Upgrade to Analytics.js 2.0 before access ends for Analytics.js Classic. See the [Analytics.js 2.0 docs](/docs/connections/sources/catalog/libraries/website/javascript/) to learn more about the new source.

## Manual upgrade
Expand Down Expand Up @@ -52,14 +52,7 @@ If the source you intend to upgrade uses the in-domain instrumentation as well a

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

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.

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:
* 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`.

> success ""
> Segment recommends all subdomains to use the same version of Analytics.js for compatibility between `anonymousId`s.

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.

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

Expand Down