What You Need to Know About Google Tag Manager Version 2.0 and How to Set It Up
What is Google Tag Manager (GTM)?
Google Tag Manager is a free tool which allows you to manage all of your website’s tracking codes in one place via one code. You need to implement the tag on your website and then everything can be managed from the user interface.
Why Should You Use it?
You can implement a lot of advanced configurations without involving a team of web developers, which cuts web development cost and saves a ton of time. Also, by only having one code installed on the website you are minimising the risk of errors whilst simplifying the installation process.
What’s new in Version 2
Google announced version 2 on October 15th 2014, currently it is in beta. The old interface will remain active until April 1st 2015.
- New API
- New interface
- Macros are now called Variables
- Rules are now called Triggers
- Auto event tracking
I’ll be using various technical terms in this article, so it’s best if you take a second to read what the meanings:
Tracking Code – The tracking code which is placed on all pages of the website
Tag – Code which fires when a condition is met
Trigger – Defines a condition for when a Tag should fire
Variable – Stores data which you can use to define Triggers
Now that you know what Google Tag Manager is, here is how to set it up, implement Google Analytics through it, set up event tracking for a contact form and check to see if both are working correctly.
How to setup Google Tag Manager
1. Follow this link (https://tagmanager.google.com) and login to your Google account if you need to.
2. Type your company name into the ‘Account Name’ field.
3. Give your container a name, we usually use the website’s URL (if we’re setting it up for a website, which, in this case, we are).
4. If you’re happy with the terms and conditions, agree and proceed to the next step.
5. Copy the code that’s popped up on your screen and install it on your website immediately after the body tag.
6. In the left navigation, click on tags and then new tag.
How to setup Google Analytics via Google Tag Manager
The setup should be as follows:
- Choose Product: Google Analytics
- Choose a tag type: Universal Analytics (unless you are using the old version of Google Analytics)
- Configure tag: Include your unique tracking id (you can get this from your Google Analytics account
- Track Type: Pageview
- Fire on: All Pages
- Click ‘Create Tag’
- Finally, give your tag a name – ‘Google Analytics’ should be fine and click
How to check if it is working correctly
1. In the top right hand corner of the screen click on the drop down arrow next to ‘Publish’ and then preview – preview mode allows you to check if the code is firing correctly
2. Navigate to your website and you’ll see a small box at the bottom of the web page – look underneath the heading ‘Tags Fired On This Page:’ and you should see the tag you just setup ‘Google Analytics’ (or whatever you named it – I decided to label mine ‘Universal Analytics’). The tag should only fire 1 time.
3. Re-check all other pages to make sure it is firing correctly, if this is not possible just check a handful of pages from different sections of the website.
4. Another way to check if it is working is by analysing the real time reports in Google Analytics.
How to setup event tracking for contact forms in Google Tag Manager
Create a new tag – the setup should be as follows:
1. Choose Product: Google Analytics
2. Choose a tag type: Universal Analytics (unless you are using the old version of Google Analytics)
3. Configure tag: Include your unique tracking ID (you can get this from your Google Analytics account
4. Track Type: Event
5. Category: Contact Form (a name to group objects that you want to track, generally speaking, all contact form events should be under ‘Contact Form’, you can differentiate them via the ‘Label’ parameter)
6. Action: Submit (the action parameter names the type of event or interaction you want to track, for example, in this scenario the user is ‘submitting’ the form)
7. Label: Footer (provides additional information for events, for example if your contact form is in the footer and on the contact page you can create two separate events for both with the same ‘Category’ and ‘Action’ but different ‘Labels’)
8. Non-Interaction Hit: True (by setting this to true you are ensuring that bounce rate calculations are not affected by events)
9. Fire on: Form
10. Click +New
11. Now we need to create a trigger, firstly, give it a name – ‘Contact Form Event’ should be fine
12. Wait for Tags: (check this – 2000 milliseconds is fine)
13. Check Validation – (check this)
14. Enable When:
- If you want your contact form event to trigger on any page that has a contact form, enter the following: Page URL > matches RegEx > .*
- If you want this event to trigger for a specific page only you can set it to trigger on that page, you’d normally do this if you want to track various contact forms separately
15. Fire On: All Forms
16. Click ‘Save Trigger
17. You should now be back at the Tag you were creating, click ‘Save Tag’ and you’re done!
How to check if it’s working
1. Go into preview mode again
2. Navigate to the web page your contact form is on and you’ll see a small box at the bottom of the page (again).
3. Fill out the form, click submit and the tag should appear under the ‘Tags Fired On This Page:’ header, if you are redirected after clicking submit the tag will only appear for a split second.
4. Finally, check the Events report under Real-Time in Google Analytics to make sure the data is coming in how you like.
The Google Tag Manager will take some time to get accustomed to but is a very powerful tool for marketers. Features like auto event tracking, enhanced link attribution, demographic and interest reports for Google Analytics can all be switched on without editing the code. However, for certain types of reports, e-commerce for example, you will still need some involvement from your development team, so it isn’t exactly a 100% developer free solution yet. If you’d like some help with your website tracking, Ricemedia is on hand to help in any way we can. Get in touch with us today.