Skip to content

Commit 9960338

Browse files
authored
Merge pull request #4648 from segmentio/jfoskin-patch-4
Tracking UTMs on SPAs
2 parents 2e908e1 + 9bb2813 commit 9960338

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,7 @@ To track more than the page field, pass those fields in as additional properties
4545
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.
48+
49+
## How can I track UTMs on a single-page application?
50+
51+
Segment automatically captures UTMs that you pass in URLs. You can also [manually pass UTMs](/docs/connections/sources/catalog/libraries/website/javascript/#default-page-properties) into the context campaign fields.

0 commit comments

Comments
 (0)