Introduction to Google Tag Manager
November 30, 2012
Ever had issues keeping track of which tracking codes go where? Whether it’s Google Analytics, Bing, AdWords or remarketing, the simple truth is that there are a lot of different snippets you need to keep track of these days. That’s where Google Tag Manager comes to help out!
What’s the scoop?
Google Tag Manager was launched back in October as a way to keep all of your tags in one place. Not only does this help keep source code cleaner (by being placed in the correct place), and theoretically speed up website loading times, it also means that multiple users can make remote changes to website codes without needing the help of a developer.
This is great if you work with particularly unresponsive developers – it means you can handle all code changes quickly and easily without having to wait for a new release. It also means you can have different teams making changes remotely – such as your PPC agency, your in house content team, and your developer team, without having to go through complicated channels.
Once you sign up for Google Tag Manager you have the option to create new or see your existing accounts. If you work for an agency, you should have an account for each client whose GTM you manage.
Within each account you have buckets that Google calls ‘Containers’ – these are where you group similar sections of code. In the example shown below – we have an account for Hanapin Marketing, but separate containers for PPC Hero and for Hanapinmarketing.com. The reason for this is because we have separate Analytics codes for those two sites, and separate AdWords accounts and tracking codes, hence they need to be kept in separate buckets. If we had a subdomain such as blog.hanapinmarketing.com, we would keep that within the Hanapinmarketing.com container as some of our codes will still apply to that part of the site.
Once you have your containers set up, you might want to give access to other users. This is very straightforward and you can control permissions at the account and container level.
Assuming you’ve set up your account and containers and added relevant users, you’ll want to start building out your list of tags. In our case that meant adding Google Analytics, Google AdWords conversion tracking, Google AdWords remarketing and Bing conversion tracking. This is actually pretty straightforward to do. Go into one of your containers and in the top right corner select ‘New Tag’.
From here you will see a drop down list of the tags Google is able to implement for you:
Select Google Analytics from the drop down and name your Tag something obvious like ‘Google Analytics’. Here is what you should see:
You’ll need to find your Analytics ID – you can find this by going into the Analytics admin tab and selecting the web property associated with your site. You’ll then need to set up a rule for when this code shows – in my case I’ve used the generic ‘all pages’ rule, but you might only want this particular code to show in a certain subdomain or on certain pages. To do that you simply need to create a new rule:
You can also add rules to block showing your code for – e.g. test areas of your site. In the ‘more settings’ drop down you have the option to block specific referrers or organic keywords from triggering your tag as well as a number of other features.
The next tag I want to create is the Google AdWords conversion code. Again, Tag Manager has a default option to make this easier for you:
You can get your Conversion ID and Conversion Label by going into you AdWords account and looking at your existing code. As you can see, I’ve set up a rule for my AdWords code that it only appears on our ‘/thankyou’ confirmation page. If I were to add another conversion path in future with a new thank you page, it would be really easy to make this code fire there, simply by adding a new rule with my new URL.
For Bing, things aren’t handed to you as prepackaged as they are for Google products, but it’s pretty simple to add your code in. Simply select custom HTML code and paste in your Bing conversion code.
Again, I’ve set this to only fire on the ‘/thankyou’ page.
That’s the basics of adding tags sorted. Let’s talk a little bit more about rules and macros! As mentioned above, rules tell your tags when to fire. In Hanapin’s PPC Hero container you will see something like this:
The PPC Services Remarketing rule means that our remarketing tag will only fire on our PPC Services page. Pretty straightforward right?
The default Macros available are:
- URL – let’s you set rules depending on the URL of the page.
- Referrer – rules based upon the referring site (show specific remarketing codes to users who visited PPC Hero before visiting Hanapin Marketing etc)
- Event – rules based upon users who performed a specific on site event such as watching a video.
Here’s how our list looks:
I recommend you check out the Google Tag Manager support section on Macros if you’re thinking of using them as they aren’t for beginner users.
Once you’re happy that you’ve got all the tags you need with the correct rules to show them – you can switch over to using Tag Manager. First, check that all your account settings are correct:
If you’re happy that’s all good, you’ll need to remove all your old tags (that you now have in GTM) and replace them with the Tag Manager code snippet.
You can find this in your settings menu, and you’ll have a different snippet per container in your account. You want to place this code immediately following the opening <body> tag.
And that’s it! Pretty straightforward really and should make things much easier for you in the long run. If any of you have positive or negative experiences with the Google Tag Manager let us know in the comments below!
Discover 3 Levels Of Geo Targeting For Beginners, Intermediates, & Experts
Setting geographic targets is day one. Whether it’s to exclude places you cannot sell or serve or to specifically target your primary customer base, the implementation of geo-targets is on the must-do list.
[New Webinar!] What You Need To Know About New AdWords Features
In this new live webinar, Hanapin Associate Director of Services Jeff Baum and Optmyzr’s CEO Frederick Vallaeys will walk you through the new AdWords tools and show how you can use them to optimize your accounts.
The Social Strategies You Need To Know For App Promotion
Create social strategies to promote app awareness and leverage geographic and demographic data reported by these platforms to refine audiences.
A bi-weekly newsletter packed full of resources and strategies that will help make you a better PPC expert.
Hanapin Marketing | The PPC Agency of Experts Behind PPC Hero
Guide the Industry and Take the 2016 State of PPC Survey!
Each year, Hanapin Marketing manages extensive research into the State of PPC Report, which provides a statistical breakdown of the digital ad industry and guides expectations.
What's In A Name? Building Powerful Product Titles For Ecommerce
Over the years, we've tested a variety of different product title alterations in hopes of finding the perfect title. Did we? Yes, and no. The fact of the matter is, it depends.
What Upgraded Bing URLs Mean For You
Bing is continuing its effort to catch up with Adwords. Upgraded URLs, which isolate tracking parameters from final URLs, are now available to Bing advertisers.
Where Does Your Hero Conf Dollar (or Pound) Go?
5 Common Excel Issues And How To Fix
Excel, while a fabulous tool for PPC, is not without its occasional hang-ups. In this post, we’ll go through some common problems, and how to fix them.
[New Whitepaper!] Guide to Google AdWords: Advanced Edition
In this whitepaper, you will gain a greater understanding of the distinction between e-commerce and lead generation PPC strategies, learn the effective use of Remarketing, how to utilize advanced segmentation for improved targeting, cross-device attribution, and how to use automated rules in your accounts.
Google Announces Controversial Updates To The Keyword Planner Tool
Google updated the AdWords Community on the state of the Keyword Planner tool and the response from several advertisers was quite dramatic.
7 Overlooked Facebook Power Editor Features That Will Save You Time
I will be sharing often overlooked time-saving features for Facebook Power Editor so you can spend more energy on the tactics and strategy.
Ecommerce Secrets with Google, Bing, & Hanapin - New Webinar Panel!
This Thursday, August 18th at noon EST, we'll be hosting a webinar called "Supercharge Holiday Sales With These Must-Have PPC Tactics." Presenters include Carrie Albright, Jose Rodriguez, Purna Virji, and Matt Umbro.
Coming Soon - New Cross-Device Reports And Benchmarks
The traditional marketing funnel that used to be awareness, consideration, and then purchase has almost become obsolete. No longer is the buying cycle a linear path. In fact, it's become necessary to identify the right attribution model for your business.