11 Steps to Setting up Google Tag Manager [GTM] V2 to Track Clicks

By August 24, 2015web analytics
Beginner's Tactics for Conversion Optimization

[Updated April 2018]

Google Analytics is a great product, but just out of the box, it has a major limitation.

If a person visits a page or several pages on your website, Google Analytics can tell you the page they visited, roughly how long they stayed and if they went to another page after that.

But that is about it.  Bummer.

How do we track what a visitor clicked on so that we can improve conversion rates of the website?

Or what if your website has windows that popup or your site is a single page?

How do you track interactions as opposed to page views?

Fortunately, Google has recognized that the web has dramatically changed over the last few years and has given us tools to really customize the interactions we can track on our website.

11 Steps to Track Clicks in Google Analytics

Google has provided us with a tool called Google Tag Manager (GTM) V2.

GTM is meant to provide us with the ability to track interactions across all of the various devices out there for websites, apps and anything else that comes down the road.

NOTE: If you really hate anything technical, then you’ll want to forward this article to the person you usually send this stuff to because GTM is not something you simply “turn on” but takes a little tech knowledge.

Step 1 – Setup an Account

If you’ve never setup GTM, head over and setup an account.

Follow the instructions they give you for publishing the GTM javascript code to your website.

Step 2 – Enable Variables for Tracking Clicks

One thing they won’t tell you in the setup is that you need to select some additional things in GTM to track different types of clicks on your website.

Click on Variables on the left hand menu then select all items under Clicks and Forms.

Don’t worry about what they mean for now, we are only going to use one of them, but as you gain more understanding of how GTM works, you’ll want to use more of these.

Step 3 – Create a Tag

Once you’ve created an account and enabled Click Variables, then we want to setup something Google calls a Tag.

A Tag defines the rules (Naming, Triggers, Events) of things we want to report on and how they will be reported.

So lets say we want to track when someone clicks on a button on our website.

From the GTM home screen, click on Add a New Tag.

Google Tag Manager 1

Step 4 and 5 – Set Tag Title and Type of Tag

There are many tags you can create, but for tracking an event, we need to choose the product Universal Analytics if you use Universal and Classic Analytics if you do not (I strongly recommend you change if you’re using Classic).  Enter a tag name that is meaningful.  Its only used her in GTM to help you know what it does.

Step 6 – Get Your GA Number

If you don’t know your Google Analytics ID off the top of your head, switch over to the homepage screen of Google Analytics, login and grab the ID of the Google Analytics account you want to send event data to.

Google-Tag-Manager-4

Now enter the ID as the variable for your Tag.

Step 7 – Configuring the Google Tag

After you enter your Google Analytics ID into the Tracking ID field, then change the Track Type to Event.  Your Tracking Parameters are completely up to you.  You can give them a custom name or select the little lego icon and you can insert any number of variables.  This information is sent over to Google Analytics so that you can see what you want to track.

The Category is usually the high-level grouping you want to use.  It could be things like form submissions, button clicks, menu clicks, just about anything.  The Action should make sense for you to start telling a difference between the Events you are setting up.  Give it meaning you will understand.  The Label is optional and you may not have to use it, but it further helps you segment the action. Value is also optional but I recommend using a value, especially if you are e-commerce based.

Step 8 – Choosing a Type of  Trigger

After you complete the above step, Google wants to know where you want to track this event.  You have many Trigger options.  For tracking a Click Event, you will want to use a Click Trigger (Click, All Elements).  Sometimes you may need to use more than just one in case you may have the same button all over your site, but only want to track it on one page.

Step 9 – Setting up the Trigger

Now we need to create the Trigger that will fire when someone clicks on your button.  First, give your Trigger a meaningful name. The target can be specific items or you can have Google monitor them all (it already does this, but you have to tell it what you want).

Next, you will tell Google what the Trigger should fire on.  This is where you may need a little technical support.  In the example below I am telling Google to listen whenever someone clicks on a CSS class that contains “mybutton” in the HTML of the button users are going to click on.  There are many, many different ways of telling Google what to listen for to fire a trigger, but I like using the element ID or class when they are unique at least.

So in this example, Google is going to listen on all pages on my site whenever someone clicks on a button that has the CSS class mybutton and store that click event in Google Analytics for me.  Woohoo!

Step 10 – Save the Trigger

Don’t forget to save the Trigger!

Step 11 – Test and Publish

After you’ve tested to make sure this works, when you are ready to begin tracking clicks, publish your new Tag and you can start monitoring the results.

Google Tag Manager 9

Analyze Your Click Events in Google Analytics

If you have enough traffic, go ahead and switch over now to Google Analytics and open the report for Real Time for Events and you should see shortly your new click event popping up.  You’ll see the new Category you created and the Action taken.  If you click on the Category or the Action, you’ll see more detail about the given event.

Google Tag Manager 10

Congratulations!  You have just set up your first click event tracking and now you no longer have to rely on just page views anymore but you can tell that VP of Marketing how much new revenue you generated by creating the new big button you just published on the homepage.

 

2 Comments

  • yasmin says:

    Hello,
    Thanks for the tutorial. I followed the steps but cant make it work.
    when i try to make a new tag it doesn’t ask for my tracking ID at all.
    Can you help me with that

Leave a Reply

Share This
Open Popup