How to Use Google Tag Manager to Track User Behaviour on Your Site

How to Use Google Tag Manager to Track User Behaviour on Your Site

March 7, 2025

Understanding how visitors engage with your website can transform the way you design and optimise it—whether that's tweaking a button to boost clicks or refining a form to increase submissions. For DIY site owners, Google Tag Manager (GTM) is a game-changer. It lets you track user interactions—like button clicks, form submissions, and scroll depth—without needing to dive into your site's code. This practical, beginner-friendly tutorial will guide you through setting up GTM in UK English, empowering you to gather insights with ease. While GTM handles most tracking brilliantly, we'll also hint at when a developer might step in for trickier setups, like e-commerce or custom features.

What Is Google Tag Manager?

Google Tag Manager is a free tool straight from Google, designed to show you how your site performs in search results. It tracks which keywords people use to find you, flags technical glitches (like broken links), and helps Google index your pages properly.

Why It's Perfect for DIY Site Owners:

- Update tracking without editing your site's code directly.

- Centralise all your tags in one place.

- Get started quickly, even if you're new to analytics.

Let's get you set up and tracking in no time.

Step 1: Set Up Your GTM Account

Before you can track anything, you'll need a GTM account and a snippet of code added to your site. Don't worry—it's a one-time job.

1. **Head to GTM**: Visit tagmanager.google.com and log in with your Google account.

2. **Create Account**: Click "Create Account," add your business name, and select your country (e.g., United Kingdom).

3. **Add a Container**: This holds your tags. Name it after your site (e.g., "MyDIYSite.co.uk") and choose Web as the platform.

4. **Install the Code**: GTM provides two snippets—one for the section and one for the . Paste these into your site's HTML or use a plugin if you're on WordPress, Wix, or similar.

**Quick Tip**: After this initial setup, you won't need to touch the code again—everything else happens in GTM.

Step 2: Track Button Clicks

Ever wondered how many people click your "Contact Us" or "Shop Now" button? Let's set that up.

1. **Start a New Tag**: In GTM, go to Tags > New and pick Google Analytics: Universal Analytics (or GA4 Event if you use Google Analytics 4).

2. **Choose Event Tracking**: Set the Track Type to Event.

3. **Fill in the Details**:

- Category: "Button Click" (keeps it organised).

- Action: "Click."

- Label: Name the button, e.g., "Shop Now."

4. **Add a Trigger**: Click Triggering > New, select Click - All Elements, and narrow it to your button using its CSS selector or ID.

5. **Save and Publish**: Name it (e.g., "Track Shop Now Clicks"), save, and hit Submit to go live.

6. **Test It**: Use GTM's Preview Mode to click the button and confirm it's tracked.

Step 3: Track Form Submissions

Forms are vital for conversions—think newsletter sign-ups or quote requests. Here's how to track when they're submitted.

1. **New Tag**: Choose Google Analytics: Universal Analytics or GA4 Event.

2. **Set as an Event**: Pick Event as the Track Type.

3. **Configure It**:

- Category: "Form Submission."

- Action: "Submit."

- Label: Identify the form, e.g., "Newsletter Form."

4. **Create a Trigger**: Select Form Submission and specify the form by its ID or class if needed.

5. **Save and Publish**: Name it (e.g., "Track Newsletter Sign-Ups") and submit.

**Alternative**: If your form leads to a "Thank You" page, track that page view instead—simpler and just as effective.

Step 4: Track Scroll Depth

How far down a page do users scroll? This tells you if they're engaging with your content. Let's set it up.

1. **Activate Scroll Variables**: In GTM, go to Variables > Configure and check Scroll Depth Threshold.

2. **New Tag**: Pick Google Analytics: Universal Analytics or GA4 Event.

3. **Make It an Event**: Set Track Type to Event.

4. **Set the Details**:

- Category: "Scroll Depth."

- Action: "Percentage."

- Label: Use "{{Page Path}}" to track the specific page.

5. **Add a Trigger**: Choose Scroll Depth and pick percentages—25%, 50%, 75%, 100%.

6. **Save and Publish**: Name it (e.g., "Track Scroll Depth") and submit.

**Next Step**: Check your analytics to see if users are reaching the good stuff—like your call-to-action.

When Might You Need a Developer?

GTM is brilliant for straightforward tracking, but if your site involves complex setups—like e-commerce checkouts with multiple steps or custom events—a developer can streamline things. They'll ensure your tracking is precise and doesn't slow your site down. For now, though, you're well-equipped to get started.

Get Started and Understand Your Audience

With Google Tag Manager, you're ready to uncover how users interact with your site—no coding skills needed beyond the initial setup. Track button clicks, form submissions, and scroll depth to make smarter, data-driven decisions. As your needs evolve, a developer can help with advanced tracking, but today, you're in the driver's seat.

Head to tagmanager.google.com, set up your account, and start exploring your audience's behaviour. Your website—and your visitors—will thank you!