Google Tag Manager Best Practices (Part 3 of 3)
These best practices fall into four main buckets.
These best practices fall into four main buckets.
In my first and second articles, I covered getting started with Google Tag Manager and coming to grips with its advanced features. In this final part, we will cover a series of best practices to ensure that you start using Google Tag Manager correctly from day one. Following these best practices will save you from many headaches in the future.
These best practices fall into four main buckets:
1. Naming conventions
2. User management
3. Maintaining extensive history notes
4. Staying up to date
1. Naming conventions
As you create tags, rules, and macros, you are allowed to name them however you wish. While this flexibility is great, the list can get unwieldy as many users start creating tags, rules, and macros in the same account. By implementing a standardized naming convention, however, you can ensure three things:
Tag naming conventions
Tag names should be a combination of what the tag is, its purpose, and where the tag is being fired. The naming format should be:
{Tag type} – {Purpose} – {Firing locations}
Let’s take a look at a few examples.
Scenario: Facebook conversion pixels for your sales confirmation page and newsletter subscription confirmation page
Let’s say you have an e-commerce website that fires two different Facebook conversion pixels when a sale is completed and when a visitor signs up to your newsletter. You may wish to name your tags like so:
Scenario: Standard Google Analytics tag across all pages
This is an easy one – name your tag:
Scenario: Google Analytics event tracking tag for when a user clicks on a photo in a gallery
Let’s assume you have a photo gallery on all your product pages and want to use Google Analytics event tracking to identify which photos are clicked on. We can define and fire an event tracking tag for that. The tag could be named:
Rule naming conventions
Rule names should reflect what the rule conditions are. Names should be of the form:
{Rule dimension} – {Match type} – {Condition}
Again, let’s take a look at a few examples.
Scenario: All pages under the /productX folder
Scenario: Data layer event equal to “photo_clicked”
Macro naming conventions
Macro names should reflect where the macro is originating from (i.e., macro type) and the role that it plays. At the same time, however, you want to keep the names short so that you can easily reference them in your tags. Names should be in the form:
{Macro type}_{purpose}
Scenario: Data layer variable “conversionValue”
Scenario: JavaScript variable “s.prop4” (reading an Adobe SiteCatalyst variable on the page)
2. User management
Users of Google Tag Manager hold great power by possessing the ability to manipulate tags on a site. A robust user management scheme must be in place to ensure that tags are deployed in a consistent and safe manner.
To achieve this, user roles must be tightly enforced. Google Tag Manager provides four levels of container level permissions.
The recommended approach for handling user permissions is:
3. Maintaining extensive history notes
Whenever a new container version is published, you are given the opportunity to name the container version and add notes. You should take advantage of this facility to leave full notes for someone who may be auditing your site’s tagging or troubleshooting your changes at a later date.
It is recommended that you:
Here is an example:
4. Staying up to date
Google Tag Manager is still in beta, and many changes roll out on a regular basis as Google strives to make it a more flexible solution. Thus it’s important to keep track of what’s new so that you can take advantage of the latest features as they come out. Keep an eye on these resources to stay informed:
Google Tag Manager is a powerful solution, and as you start to use it, your list of tags, rules, and macros will grow. The proliferation of new marketing and tracking tags almost guarantees this. Following these best practices will ensure that you are able to maintain a manageable set of Google Tag Manager accounts and containers as your usage develops.