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:
1) Sign up for Google Tag manager account
Go to www.google.com/tagmanager 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.
setup google tag manager account
2) 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
Event listeners in Google tag manager
For the above, a Google Tag manager event (gtm.xxx) will be generated when a click occurs:
Link clicks: gtm.linkClick
Form submits: gtm.formSubmit
All click: gtm.click
3) 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.
Google Tag Manager, Specify a rule element id to fire on
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 gtm.click too.
4) 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.
Google tag manager fire Google Analytics event
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.
5) 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!
Google tag manager create version and publish
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!