Skip to content

Commit 4128f96

Browse files
authored
Add info on how to manually pass UTMs to subsequent calls
1 parent 2b548b7 commit 4128f96

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/guides/how-to-guides/cross-channel-tracking.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,20 @@ With these being optional:
108108

109109
* **utm\_term**: this is the parameter suggested for paid search to identify keywords for your ad. If you're using Google Adwords and have enabled "autotagging", then you don't need to worry about this. Otherwise, you can manually pass the keywords from your search terms through this parameter so that you can see which keywords convert the most. Note that this parameter is reserved explicitly for search. (Examples: "toast", "butter", "jam")
110110

111+
If you'd like UTM parameters to persist in subsequent calls, you will need to manually add those fields in the context.campaign object of your event call. For example:
112+
113+
```js
114+
analytics.page("97980cfea0067", {}, {  campaign: {
115+
name: "TPS Innovation Newsletter",
116+
source: "Newsletter",
117+
medium: "email",
118+
term: "tps reports",
119+
content: "image link"
120+
},
121+
});
122+
```
123+
124+
You could also store the values in cookies and/or localStorage and use [Analytics.js Middleware](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/middleware/){:target="_blank"} to enrich the payload for subsequent calls.
111125

112126
[Learn more about the semantics with each UTM parameter.](https://docs.google.com/file/d/0By71e2L6SonANjViYWUyOTktOGQ2Ny00NWJmLThlY2MtMDU3MzJhNWU0MDg1/edit?hl=en){:target="_blank"} _The key isn't to stick with the definitions that closely, but to be consistent within your own analytics system._
113127

0 commit comments

Comments
 (0)