Skip to content

Commit 74a1573

Browse files
author
markzegarelli
authored
Merge pull request #1454 from segmentio/DOC-136_ajs-next-launch
DOC 136 ajs next launch
2 parents 40d04a9 + 6e4bb6d commit 74a1573

File tree

4 files changed

+30
-7
lines changed

4 files changed

+30
-7
lines changed

src/_data/sidenav/strat.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ sections:
8383
section:
8484
- path: /connections/sources/catalog/libraries/website/javascript
8585
title: Analytics.js (Javascript) Source
86-
# - path: /connections/sources/catalog/libraries/website/javascript/analytics-js-2
87-
# title: Analytics.js 2.0 (Beta)
86+
- path: /connections/sources/catalog/libraries/website/javascript/analytics-js-2
87+
title: Analytics.js 2.0 (Beta)
8888
- path: /connections/sources/catalog/libraries/website/javascript/supported-browsers
8989
title: Analytics.js supported browsers
9090
- path: /connections/sources/catalog/libraries/website/javascript/quickstart
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: Analytics.js 2.0
3+
description: |
4+
Analytics.js is Segment’s most popular library source. This new major version has been re-engineered to be more performant and provide greater extensibility. It is fully backwards compatible with the previous version of Analytics.js.
5+
release_type: beta
6+
product_area: sources
7+
business: false
8+
team: false
9+
doc_links:
10+
-
11+
title: Analytics.js 2.0 (Beta)
12+
url: "/docs/connections/sources/catalog/libraries/website/javascript/analytics-js-2/"
13+
# images:
14+
# -
15+
# path: /images/release-notes/ui-update-1.png
16+
# desc: The navigation was redesigned to better reflect how users navigate through the product.
17+
# -
18+
# path: /images/release-notes/ui-update-2.gif
19+
# desc: A new workspace switcher provides an easier way to navigate between workspaces.
20+
---

src/connections/sources/catalog/libraries/website/javascript/analytics-js-2.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: Analytics.js 2.0 (Beta)
33
strat: ajs
4-
hidden: true
54
---
65
> warning "Analytics.js 2.0 is recommended for use in staging"
76
> Analytics.js 2.0 was built with backwards compatibility in mind. However, Segment recommends thorough testing in a Staging environment before you upgrade your production source.
@@ -43,14 +42,15 @@ Once enabled, after 5 minutes or less, the updated code is delivered.
4342
To revert back to the previous version of Analytics.js, disable the Analytics 2.0 toggle on any source you've enabled it.
4443

4544
## Cases that require manual upgrade
46-
We identified the following two cases where upgrading Analytics 2.0 requires manual effort beyond just enabling the Analytics 2.0 toggle.
45+
There are two cases where upgrading to Analytics.js 2.0 requires manual effort beyond enabling the Analytics.js 2.0 toggle.
4746

4847
### When using in-domain instrumentation CDN aliasing
49-
If your source uses the in-domain instrumentation as well as a custom "Alias for analytics.js", then you should update the AJS snippet to the latest version (4.13.2
50-
or higher) before toggling Analytics 2.0 on.
48+
49+
If the source you intend to upgrade uses the in-domain instrumentation as well as a custom "Alias for analytics.js", then you should update the AJS snippet to the latest version (4.13.2 or higher) before you toggle on Analytics.js 2.0.
5150

5251
### When using a strict content security policy on the page
53-
Analytics 2.0 asynchronously loads different pieces of the library as needed, and therefore, if your source uses a strict Content Security Policy (CSP) that allows Javascript to be downloaded from specific locations, then you need to update the CSP to account for all the pieces used for Analytics 2.0. Therefore, beyond allowing the main analytics.min.js script, you should allow the following paths in your CSP:
52+
53+
Analytics.js 2.0 asynchronously loads different pieces of the library as needed. If the source you're upgrading uses a strict Content Security Policy (CSP) that allows Javascript to be downloaded from specific locations, then you need to update the CSP to account for all the pieces used for Analytics.js 2.0. Therefore, beyond allowing the main analytics.min.js script, you should allow the following paths in your CSP:
5454
- `https://cdn.segment.com/v1/projects/<WRITE_KEY>/settings`
5555
- `https://cdn.segment.com/analytics-next/bundles/*`
5656
- `https://cdn.segment.com/next-integrations/integrations/*`

src/connections/sources/catalog/libraries/website/javascript/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ strat: ajs
99

1010
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.
1111

12+
> info "Analytics.js 2.0 Beta"
13+
> A new version of Analytics.js is available for use in Beta. Click [here](/docs/connections/sources/catalog/libraries/website/javascript/analytics-js-2) for more information.
14+
1215
## Getting Started
1316

1417
Read through the [Analytics.js QuickStart Guide](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/) which explains how to add Analytics.js to your site in just a few minutes. Once you've installed the library, read on for the detailed API reference!

0 commit comments

Comments
 (0)