Whether you’re optimizing your campaigns or simply trying to better understand user engagement, Google Tag Manager (GTM) can be a game-changer for marketers. Custom variables are one of the most valuable features of GTM, helping you track interactions with a high level of precision. In this post, we’ll walk through five custom variables that will give you a clearer picture of user behavior and actionable insights—all without requiring heavy technical skills.
1. Button Click Tracking: Zero In on Key CTAs
Every marketer knows the importance of a strong call-to-action (CTA), but how often are these CTAs actually clicked? With GTM, you can set up a custom variable to track clicks on high-priority buttons, like “Sign Up,” “Contact Us,” or “Request a Demo.”
Practical Application: By tracking your key CTAs, you’ll get data that reveals which button designs, colors, and placements work best. Over time, you can A/B test your buttons based on this data, refining their performance for better engagement.
How to Set It Up:
Identify the button’s CSS selector or ID.
Create a custom variable in GTM targeting this specific selector.
Use the variable in a tag to trigger each time a user clicks that button.
Why It’s Valuable: Tracking CTA clicks gives you direct feedback on the appeal and effectiveness of your CTAs, allowing for more data-backed design choices and messaging refinements.
2. Scroll Depth Tracking: Find Out How Far Users Really Go
Understanding how far users scroll gives you insight into engagement levels on content-heavy pages, like blog posts and landing pages. GTM’s Scroll Depth variable lets you track the percentage of the page a user has viewed, helping you know if they’re sticking around or just bouncing after the headline.
Practical Application: Say you notice many users drop off around the 50% mark on your product pages. This insight could indicate a need for more compelling content or an earlier CTA to capture those visitors before they leave.
How to Set It Up:
Go to GTM’s built-in Scroll Depth variable.
Set thresholds (e.g., 25%, 50%, 75%, 100%) to trigger a tag.
Use these scroll triggers to fire events in Google Analytics or other tools, tracking specific page engagement.
Why It’s Valuable: Knowing how far visitors scroll helps you optimize content placement, adjust CTA positioning, and ultimately make pages more engaging.
3. Video Engagement Tracking: See Who’s Watching and How Much
Embedded videos are a powerful tool, but are they effective on your site? Video engagement tracking allows you to know exactly how users interact with videos—whether they press play, pause halfway, or watch until the end.
Practical Application: If your brand invests in video, tracking views can help you measure ROI. For example, if most users only watch the first 25% of a video, you might need to shorten it or add more engaging content upfront.
How to Set It Up:
Set up triggers in GTM for video events (play, pause, complete).
Create a Custom JavaScript Variable to capture video interaction data.
Link these triggers to events in Google Analytics, letting you track watch percentage.
Why It’s Valuable: This level of detail helps you optimize video content, ensuring it captures attention and communicates key messages early.
4. Time on Page Tracking: Capture Engagement Beyond Clicks
How long are users actually spending on your pages? Time on Page tracking captures visitor engagement beyond clicks or scrolls, helping you understand which pages hold attention and which may need improvement.
Practical Application: Imagine seeing that users spend an average of three minutes on your pricing page but only 30 seconds on your product page. You may decide to revamp the product page’s messaging to be more engaging or add more information.
How to Set It Up:
Create a Custom JavaScript Variable that starts a timer when the page loads.
Use a GTM trigger to end the timer when the user leaves the page or moves to another page.
Send the calculated time data to Google Analytics for analysis.
Why It’s Valuable: Time on Page data offers insight into how effectively each page holds users’ attention, highlighting areas for improvement in content or layout.
5. Form Completion Tracking: Understand Every Stage of Form Interaction
Forms are critical for lead generation, but understanding how users interact with them goes beyond just tracking submissions. Custom variables allow you to capture details on each form field interaction, showing you where users drop off or hesitate.
Practical Application: Say a multi-step form shows a high drop-off at Step 3. This could signal that Step 3 is too complicated or confusing, allowing you to make changes that increase form completions.
How to Set It Up:
Use GTM to create custom variables for each field or step of the form.
Create triggers that fire when a user interacts with specific fields, capturing partial form completion data.
Review this data to optimize each step of your form.
Why It’s Valuable: Tracking every form interaction allows you to pinpoint exactly where users abandon the form, enabling targeted improvements to increase completions and, ultimately, lead conversions.
Final Thoughts: Building a Data-Driven Marketing Strategy with GTM
Using these custom variables in GTM empowers marketers to go beyond basic metrics, digging into the details of user behavior and engagement. By setting up Button Click, Scroll Depth, Video Engagement, Time on Page, and Form Completion tracking, you’ll gain insights that help tailor content, boost engagement, and drive conversions—all without needing to lean heavily on your tech team. If you’re ready to go beyond “bounce rates” and “page views,” dive into these custom variables and start getting richer, actionable data.
- Stephen Quinn
- 20 December 2024
Why Bookmarklets Are a Great Tool for Quick SEO Tasks
As an SEO professional, you likely find yourself performing repetitive tasks like checking page...
- Stephen Quinn
- 13 December 2024
Digital Marketing: A Comprehensive Overview
In today's digital age, the way businesses reach and engage with their target audience has...
- Stephen Quinn
- 13 December 2024
Google Tag Manager Triggers and Variables A Marketer's Guide to Better Tracking 2024
Ever wondered how some marketers seem to track everything on their website with pinpoint accuracy?...