Skip to content

Commit 922b37f

Browse files
authored
Merge pull request #4508 from segmentio/ashton-huxtable-patch-2
Add section on ISO date conversion
2 parents bc0d064 + 9e5c0af commit 922b37f

File tree

1 file changed

+12
-3
lines changed
  • src/connections/sources/catalog/libraries/website/javascript

1 file changed

+12
-3
lines changed

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ For example, you can use Analytics.js 2.0 to build features that:
3737
- Enrich events with customer or page context while in-flight with middleware
3838
- Check an event for errors after the event is sent to Segment
3939

40-
## Getting Started
40+
## Getting started
4141

4242
Use the [Analytics.js QuickStart Guide](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/) to learn how to add Analytics.js to your site. Once you've installed the library, read on for the detailed API reference.
4343

@@ -544,6 +544,15 @@ analytics.load('writekey', { obfuscate: true })
544544

545545
The `obfuscate` value is `false` by default.
546546

547+
#### ISO string conversion
548+
By default, the Analytics.js library will convert ISO8061 strings to a Date object before passing it to downstream device-mode integrations. If you would like to disable this functionality and send those strings as they are passed to the event, you can use the load method to pass in the `disableAutoISOConversion` option.
549+
550+
For example:
551+
552+
```js
553+
analytics.load('writekey', { disableAutoISOConversion: true })
554+
```
555+
547556

548557
## Retries
549558

@@ -760,7 +769,7 @@ Analytics.js tracks across subdomains out of the box. All Segment destinations f
760769

761770
To track activity on your subdomains, include the Segment Analytics.js snippet on each subdomain. Segment sets users' `anonymousId` on the top-level domain, so that users are tracked across any subdomain.
762771

763-
Because Segment tracks across subdomains, you can either use the same Segment source, or use separate sources for each subdomain. What you decide depends on your team's goals for tracking each subdomain.
772+
Because Segment tracks across subdomains, you can either use the same Segment source, or use separate sources for each subdomain. What you decide depends on your team's goals for tracking each subdomain.
764773

765774
## UTM Tracking
766775

@@ -777,7 +786,7 @@ So, for example, if somebody follows the link with above query string to your si
777786
"name": "mytestcampaign",
778787
"source": "mysource",
779788
},
780-
789+
781790

782791
Whenever the UTM parameters are no longer a part of the URL, Segment no longer includes them. For example, if the user goes to a new page within your website which does not contain these parameters, they will not be included in subsequent events. UTM parameters are non-persistent by default as they could potentially cause data accuracy problems. Here's an example of why: Say a user clicks on an ad and lands on your site. He navigates around and bookmarks an internal page - or maybe shares a link with a friend, who shares it with another friend. All those links would then point back to the same test utm_source as the initial referrer for any purchase.
783792

0 commit comments

Comments
 (0)