Google Tag Manager – Track clicks & Engagement on your web pages

Google Analytics is excellent for tracking activity between pages. What happens if you want to track activity ON your pages? Here are some cases:

1. track clicks to external sites
2. track downloads of your ebook
3. track clicks of buttons used for a form submit
4. track engagement on a single page micro site

Case (4) is a particular case because Google Analytics only track activity across pages. So if your ads land on a single page micro site, in Google Analytics, you will see zero duration on pages and you will not be able to guage how engaged your visitors are on the page.

Google Tag manager allows you to do all the above, even install Google Analytics by just a single installation of Google Tag manager codes. This is so useful because by just asking the website development team to install once, we can manage all the tags ourselves. This becomes especially important when the development team is either external vendor (hence needs to pay) or isnt exactly responsive (delay marketing timelines).

Heres what you need to do to set up Google Tag manager:

Sign up for Google Tag manager account

Go to to sign up for an account. similar to Google Analytics, you will need to put the codes on the website before you can use Google Tag manager.

Typically for an agency, you will be managing multiple websites. You can create several website accounts in one Google Tag manager account. It is recommended to use the website as the container (contain tags) name.

Ask Google Tag manager to listen to clicks

Create a tag of type “Event listener” to ask Google Tag manager to listen for clicks, of the following:
– Link clicks (to external sites)
– Forms submits
– All clicks

For the above, a Google Tag manager event ( will be generated when a click occurs:
Link clicks: gtm.linkClick
Form submits: gtm.formSubmit
All click:

Create a rule to fire the above tag

Now we want to filter all irrelevant clicks and only fire the existing tag when conditions are met. If there is only 1 submit button for form on the page, we can simply listen for gtm.formSubmit (described above) by specifying “Form submit listener” in the step above.

However if it is a javascript function, Google tag manager cannot identify that is a form and gtm.formSubmit is not generated.  In this case, we have to listen to the clicks only from the submit button id e.g. contactSubmit

This will mean the tag in step 2 will fire only when there is a click on the submit button.  Do remember to specify the click event too.


Create a Google Analytics event

Now we want Google Tag manager to fire a standard Google Analytics event when it finds a click that satisfies the rules above.

Here you will need to find your Google Analytics Property ID to let Google Tag manager know where to fire this event to.

The above shows how to create a tag and specifying the kind of event parameters we see in Google Analytics. This helps us to segregate the different types of events when analyzing in Google Analytics Events tabs.

For case 4 “track engagement on a single page micro site” above, we need Google Tag manager to create Google Analytics events so that Google Analytics will track time on page (remember Google Analytics only tracks time BETWEEN one page to another).  More of this in another article.


Create a version and publish!

Whew! Now that was tough, these are the easy bits. Simply create a version for the above and publish it!

Now you can happily track the metrices you need, be it clicks to external sites or engagement, without having to contact your IT team, hurray!

Please share your experience on using Google Tag manager, I will be glad to learn from what other uses you have of this wonderful tool!