How to pass UTM parameters from the landing page to other pages?
This is question and answer is part of the GA, GTM, GA4 FAQ series
Question:
Every time somebody arrives on our landing page, we collect their gclid, utm_campaign, and utm_term. However, when they go on another page, this information gets lost and when they submit the Typeform on the other pages, all of these parameters are blank.
How can I fix that in order to get all of the UTMs on each and every page?
Answer:
- Grab the UTM or any other query parameter you need from the landing pages using URL variable or custom JavaScript in Google Tag Manager.
- Store these variables in first-party cookies or local storage, again using Google Tag Manager, built-in variables it custom JavaScript code.
- Now, these parameters will be available on any page, tag, or trigger that you need them on.
The complete solution is covered in https://academy.optizent.com/courses/google-tag-manager-mastery course.
Check these videos
Custom JavaScript Variables in Google Tag Manager
Cookies v/s Local Storage v/s Session Storage
Learn and Master JavaScript, Google Tag Manager, and Google Analytics 4
- Get your team ready for GA4 with this online self-paced course - Google Analytics 4 Masterclass
- Optizent Academy Membership - Learn GA, GA4, GTM, BigQuery, etc. and get support from fellow members
Learn JavaScript for Google Tag Manager
If you want to master JavaScript for Google Tag Manager then check out the complete course for Marketers and Marketing Analysts to learn JavaScript. This course is focused on teaching you the fundamentals and applications in Google Tag Manager. Even though examples are in Google Tag Manager (GTM), you can use them for Adobe Analytics using Adobe Launch as well or any other marketing analytics tools.
Other Google Tag Manager posts that might like
- How to Add JavaScript to Google Tag Manager (GTM)
- Google Tag Manager Preview and Debug Mode
- How to Track Events in Facebook using Google Tag Manager
Where to get more help with JavaScript, Google Analytics 4, and Google Tag Manager?
- Workshop - We offer onsite customized workshops. Reach out to us for more details.
- Consulting - We can get you up and running with Google Analytics 4 as well as train your and your team to use it effectively. Reach out to us for more details.
- Freelancers - Join our network and get support to help your clients with JavaScript, Google Tag Manager, and more.