Video tutorial · Click IDs, UTMs and first-party data

Decorate outbound links with cookie or Local Storage values

7 minOctober 2025By John BernalWatch on YouTube
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

Steps covered in the video

  1. Copy the template script from GitHub.
  2. Paste it in a GTM Custom HTML tag.
  3. Edit it to target your cookies, Local Storage items and destination domains.
  4. Fire it on DOM Ready, on all pages or only key pages.
  5. Test the links.

Resources

Recorded in October 2025. Some screens may look different today.

JB
John Bernal

Tracking and analytics consultant with 10+ years setting up GA4, Google Tag Manager, server-side tracking and ad platform conversions. Stape partner, Top Rated Plus on Upwork. About AnalyticsEngine

Related videos

Rather have someone set it up and keep it working?

Tracking & Analytics Ops is $500 a month per website. I set up your tracking, check it every day, fix what breaks and answer your analytics questions. AI does the daily checks; I make every decision.