
In shortThis tutorial adds values you've stored in cookies or Local Storage (click IDs, attribution data) to outbound links using a Custom HTML tag in Google Tag Manager. Use it for cross-domain tracking of click IDs, attribution and data enrichment.
Chapters
What you need before you start
- Publisher access in Google Tag Manager
- The cookie or Local Storage values you want to pass
Steps covered in the video
- Copy the template script from GitHub.
- Paste it in a GTM Custom HTML tag.
- Edit it to target your cookies, Local Storage items and destination domains.
- Fire it on DOM Ready, on all pages or only key pages.
- Test the links.
Resources
Recorded in October 2025. Some screens may look different today.
Related videos
3:06Capture the Google Ads gclid in a first-party session cookie
Save the gclid on the first page so you can use it later.
August 2024
4:28Add the Google Ads gclid to outbound links
Pass the gclid to the next domain through your links.
August 2024
12:31Store UTM parameters in first-party cookies with Google Tag Manager
Keep UTMs after the first page, for your CRM and GA4.
February 2024