How to track clicks using Google Tag Manager (GTM)

Google Tag Manager (GTM) is a tool which helps in tracing all digital tags across multiple websites. The tool was created to help keep track of your various digital efforts using tracking codes. There are different choices of tag managers on the market such as Adobe, Ensighten and others. GTM not only streamlines tagging procedure by eliminating numerous tags for different website implementation but also is totally free.

In this post, we will walk you through on how to set up GTM and track a sample event

Google Tag Manager Installation

If you have never used Google Tag Manager then the first step is to integrate Google Tag Manager into your website.

If You are already logged in to Google, then you will be logged in by a default. This is a free tool

If this is your first account , then Click on Admin -> Add a New Account

If this a second account, then Click on ‘Create Account’.

Create a new Account by entering Account and Container Name , choosing appropriate options and then finally clicking on ‘Create’ button at end

After entering Container Name, you have three options to choose from: web, iOS, or Android. I clicked “Web” for this example account

Accept Terms of Agreement and you should get a pop-up box like below to ‘Install Google Tag Manager’

GTM Installation Code

After Tag Manager is installed, we are good to start with the next phase of tracking a click

Tracking an Event

Let’s assume you wish to track, the clicks on phone number highlighted in below screenshot. Also, the assumption is that GTM is set up for this account using the steps described above

Log in to GTM account and click on ‘Preview button’ on the top right hand side

In the Tag Manager, Click on Variables, Go to Built-in Variables and finally click on Configure

Select all the variables and finally click Ok. We are just enabling GTM to track all the built-in variables.

Now go to the browser and open the page that you wish to track the event. You will see at the bottom that there will be two windows. The first window will be your website and the second window will be the GTM window

Now hold the ‘Ctrl’ key of your keyboard and click on the event you wish to track

GTM window at the bottom will get refreshed with this click. In the summary button, variable gtm.Click will be populated

Click on gtm.Click and then go to Variables in the next window. The population of data in this variables is important to track this event

Now go to GTM account and first set up a trigger. Click on Trigger option available on the left Pane and select ‘New’. Give a name to the trigger. Then In Trigger Configuration choose ‘Click – Element as Event’ and other options can be set up as given in the below screenshot. Click Ok and let’s move to the next step

No Go to Tags option on the left and select ‘New’. Give a name to the tag.

In Tag configuration Choose ‘Universal Analytics’ and other options as given in the screenshot

In the triggering option, choose the trigger that is set up in earlier setup

Leave the Preview mode of GTM and start the preview mode again. Reload the website.

Press the Ctrl key and click on the event. In the Tag manager window at bottom, you will be able to see the new tag that is fire for the event you are tracking.