As a certified partner, Google Tag Manager is a very powerful tool we love here at Marcel. From the hundreds of containers we’ve set up and managed, we’ve learned quite a bit on the correct way to set-up a GTM container. Here are the top 5 tips we have for anyone either setting up a new container or looking to organize their own existing implementation.
1. Verify there is no existing Google Analytics or GTM Container on the Page
The first step before you need to take before you set up GTM is to ensure there is not an existing Google Analytics Tag (Universal or Classic) or an existing GTM container on your website. The reasons for this is that your data could be compromised and ultimately unreliable.
You can do this one of two ways. The first and easiest is to install the free Tag Assistant plugin from Google. This will give you an easy way to see if there are any containers on the page and also what tags they contain. The second way to open the page source (right click on the screen and View Source) and then press ctrl + f to open up the search feature. Type in “GTM-” to make sure there’s no GTM container on the page. You’ll be keeping an eye out for something along the lines of GTM-XXXXX. To look for a Universal Analytics installation, Search “UA-”. This would look similar to the GTM code but instead the numbers would be preceded by UA-.
2. Google has changed where they want the GTM container to be placed.
The <script> portion of the container must be placed in the head-section of your website and the <noscript> potion should be placed immediately after the opening <body> element.
3. Creating a UA Variable & Unlock Built-In Variables
Before you get started creating tags, one of the first steps we suggest you do is create a custom variable that houses your Universal Analytics number. You can find this in the Admin > Tracking Info section in your Google Analytics account.
To start this, navigate to the variable tab within GTM, scroll to the bottom and select “New” under the section titled “User-Defined Variables.” Select the “Constant” Variable type and enter your UA number in the Value field. The format should look like UA-XXXXXX, label your variable UA-Number and hit Save. You can now reference this variable in all of your tags under “Tracking ID.”
The value of setting up this variable is that if you even need to change UA numbers, you need to update in once place and not in every single tag your create. Also, this helps ensure no mistakes are made as you manually type in your UA number on each tag you create.
While you're within the variables tab, enable all of the Built-In Variables by selecting configure and check the boxes next to each.
4. Naming Structure
Creating a consistent naming structure will not affect the actual performance of your GTM Account but it helps keep the account clean, organized and makes it overall easier to manage. While there is no correct way to name your tags, finding a solution that works for you and sticking to it is the best approach. I’ve outlined the way I prefer to manage my tags.
Start By Including Product Name
The most popular tag you will use is likely Google Analytics. I label these tags starting with GA. You may also work with Adwords which I tend to label as AW. If you’re using custom HTML, I label my tags HTML.
Include the Type of Tag (e.g. Track Type)
If using a pageview tag, you may want to consider naming that tag GA Pageview. If an event, I’d suggest you label GA Event.
Include Details on the Trigger Location or Trigger Type
This is subject to the tag at hand. If I’m looking to name a tag that only fires on a certain page, like a Thank You page, I may name this GA Pageview - Thank You - Contact Us Form.
Examples of Tag Names
- GA Event - Email Link Clicks
- GA Pageview - View Cart
- GA Event - CTA - Homepage Clicks
- GA Event - PDF Download
- HTML - Pageview - Heatmapping Software
5. Utilize your Versions
Along with keeping a consistent naming structure, utilizing versions is another great way to keep your tags organized and make it much easier to go back and QA sets of tags in the event something breaks.
Versions allow you specifically name and annotate sets of tags / triggers you publish. By doing so, you can then drill down into specific versions and group your tags together. You can then dig even deeper into a particular version and see all activity of what was changed and by who. This is extremely valuable if you have more than one publisher making changes to your GTM account or something breaks and you need to go back and find out what was recently changed.
Have questions? Need help with your implementation? We have experts at Marcel Digital that are ready to take your questions and learn more about your needs. Feel free to drop us a line or learn more about our analytics services! We're here to help in any way that we can!