Google Tag Manager – How to track events on your site
by Bharat Arora · Updated on December 13, 2025
Tracking user actions on your website should feel simple. But when you deal with different scripts, codes, and tools, things get messy fast.
That’s where Google Tag Manager comes in, making tracking effortless.
With GTM event tracking, you can track clicks, form submissions, video views, button taps, and many other actions. You don’t have to update your website’s code every time. GTM gives you control, saves time, and improves the accuracy of your marketing data.
Whether you run an e-commerce store, a service website, or a blog, website event tracking helps you understand what your audience does—and what stops them from taking action. The best part? GTM setup is smooth, fast, and perfect for beginners.
Why Event Tracking Matters
Event tracking lets you study users who perform a specific action on your site.
It could be users who click your Signup button, watch a video, or submit a form.
Once you track these actions, you learn who they are, where they come from, and what interests them.
Some may come from LinkedIn. Others may share similar hobbies.
This insight helps you create more innovative digital marketing campaigns and target only the people who matter.
How Event Tracking Helps Your Growth
When you track user actions, you understand who is serious and who is just browsing. This clarity helps you put your energy exactly where it matters.
Here’s how event tracking supports your website growth strategy:
You separate real prospects from casual visitors.
You target your content better and reduce wasted marketing effort.
You focus your digital marketing efforts on people who actually engage.
You improve your site with insights from website analytics.
You make decisions based on data-driven marketing, not guesses.
Examples of Events You Can Track With GTM
With Google Tag Manager, you can track almost any action, including:
Click tracking for buttons or CTAs
Form submission tracking to measure signups
Video view tracking for engagement
Button click tracking for downloads or purchases
Audience segmentation based on behaviour
User engagement tracking for deeper insights
Conversion tracking for outcomes
Google Analytics tracking for complete reporting
Track signup clicks to boost conversions
Each event helps you understand user behaviour and uncover trends.
These insights let you optimise content strategy, improve performance, and increase conversions.
How to do it:
Step 1: Add Google Analytics 4 to Your Site
Event tracking works through Google Tag Manager. A tag is simply a small piece of tracking code. GTM installs this code on your website so you can access all your data in one place. This is the foundation for tracking events in your project.
Before you set up event tracking, you must install Google Analytics 4 on your site. GA4 is free, simple, and powerful. It gives you one place to view your analytics, event data, and traffic details.
Start by creating your Google Analytics account. Then open the Admin section. Look for Data Streams. If you don’t have a data stream yet, make one. Choose a Web data stream and copy your Measurement ID. It usually looks like this: G-123456789.
Save this ID. You will need it to link Google Analytics tracking to Google Tag Manager. This step is essential because GA4 uses the Measurement ID to read events and respond to them correctly. Without this ID, your GA4 setup will not communicate with GTM.
This completes Step 1 of your website tracking setup.
Step 2: Create Your Google Tag Manager Account
Next, you need to set up a GTM account. Think of GTM as the cousin of GA4. GA4 shows you the data, while GTM controls how that data is captured.
Go to Google Tag Manager. Set up an account. Then create a container. The container will hold all your GTM tags, GTM triggers, and event settings.
When you create a container, GTM will generate a small snippet of code. You must add this code to your website. Most platforms make this simple. Webflow, Squarespace, and Shopify all have built-in settings to add the GTM container.
Instructions for Webflow
Instructions for Squarespace
Instructions for Shopify
This code allows GTM to load on every page. Once it loads, you can track click tracking, button click tracking, form submission tracking, video view tracking, and any other vital actions. This step is essential for tracking user interactions and user behaviour.
Step 3: Create a Google Analytics Tag Inside Google Tag Manager
Now it’s time to connect GA4 to GTM. You do this by creating a tag in GTM. A tag tells the system exactly what to track. It’s the bridge between your site and your GA4 account.
Here’s what to do:
Go to Tags on the left menu in GTM.
Click New and name it something like “Analytics Tag.”
Under Tag Configuration, click the pencil icon.
Choose Google Analytics, then choose Google Tag.
In the Tag ID field, paste the Measurement ID you copied earlier.
Scroll down to Triggering.
Choose the All Pages trigger. This ensures GA4 loads on every page view.
Click Save.
This connects your site to GA4. It also ensures you collect data the moment someone visits your pages. This is how GA4 begins recording page view triggers and essential analytics.
This step completes your GTM setup for installing GA4.
Step 4: Add Your GA4 Event Tag in Google Tag Manager
You’ve now installed Google Analytics. Great job. The next step is the exciting part—creating your first event.
Event tracking helps you monitor conversions, clicks, and other user actions. This is important for conversion tracking, ecommerce tracking, marketing analytics, and website growth strategy.
Follow these steps:
Click Tags in the left menu.
Select New.
Name the tag something simple, like “Buy Event.”
Choose Tag Configuration.
Pick Google Analytics and then GA4 Event.
Paste your Measurement ID again.
In the event name, type a clean event name. Lowercase. Use underscores. Example: click_book_a_call.
Google recommends using standard event names, such as generate_lead or purchase. These names help GA4 organise your data into reports, such as the Purchase Journey report under Monetisation or Sales. These reports rely on recommended events to work correctly.
Then scroll to More Settings. Enable Ecommerce > Send Ecommerce Data. This is important for tracking transaction values, product values, and purchase details. It helps you build stronger ecommerce data tracking and improve website analytics.
You have now created your first GA4 event tag.
Step 5: Set Up the Trigger
You now need to tell GTM when to fire your event. This is where the GTM trigger setup comes in. A trigger tells GTM exactly when the tag should run.
Do this:
Click Save for now.
Open the Triggers section in GTM.
Click New.
Name the trigger something like “Click Signup Button Trigger.”
Click the pencil under Trigger Type.
Choose the trigger type that fits your action.
If you want to track clicks, choose Click — All Elements.
To track page loads, select View Page.
Since we want to track clicks on the Buy button, choose Click — All Elements.
Then change This Trigger Fires On to Some Clicks.
Set the conditions:
Page Path — contains — /bunny-slippers
Add another condition: Click Text — contains — SIGN UP
Make sure the Text matches exactly. It’s case-sensitive. You may inspect the button in your site code to confirm the exact Text. If you want, you can track using Click ID or Click Class instead of button text.Click Save.
Then go back to Tags, open your Buy Event tag, and attach your new trigger.
This completes your click-trigger and page-view trigger settings.
Step 6: Test Your Tag
Before you publish anything, test your setup. GTM offers GTM preview mode, also known as GTM debug mode. This is a powerful way to see whether your tags fire correctly.
Click Preview in GTM. It will open a debug window. Now visit your website. Click your button. Perform the action you’re tracking.
Watch the debug panel and confirm that your tag fires.
If everything works:
Click Submit in GTM.
Add a quick description like “Set up GA tag and event tag for Buy button.”
Click Publish.
GTM stores your version history. You can undo your changes anytime. This makes publishing GTM tags safe and easy.
Step 7: Check Event Data in GA4
Now visit your site and act once again. Go back to GA4 and check whether your event appears in the Events section under Reports > Engagement > Events.
You may need to wait up to 24 hours for data to show.
Once your events appear, you can start analysing what’s working. You can see which users click buttons, which pages convert better, and which actions guide people toward becoming paying customers.
This is the core of tracking signup clicks, tracking user interactions, and understanding your audience through custom events in GA4.
This completes your setup. You now have a clean structure for event tracking, website analytics, and digital marketing success.
Wrapping It Up
With event tracking, you stop guessing and start knowing. You see who interacts with your product and what pulls them in. This is where Google Tag Manager shines. It gives you precise, simple data so you can focus on the right people.
When you connect Google Analytics 4 (GA4) and build smart GTM triggers, you understand real user behaviour. You track clicks, views, and conversions with ease. This helps you plan better digital marketing strategies that actually move the needle. Once you know who’s interested, you tailor your message. You reach the people who matter. And you spend your time wisely with accurate website tracking, strong GA4 event tracking, and clean insights from GA4 data streams.
That’s the power of smart tracking. It guides your content, your campaigns, and your growth.