in Tutorials, Web Analytics

What is a tag after all? A snippet of JavaScript which allows you to get additional user behavioural and campaign data or other user interactions detected on your web pages. This data can be valuable for the marketing team to better understand their users and what changes should be made to reach higher engagements and better meet your business goals.

It is very common among marketing specialists that they usually struggle with IT or development team to get their tags embedded in the source code of web pages. Whenever it comes to marketing decisions, time plays a crucial role, that’s why a solution must be found, a solution which offers marketers free hands. Google came up with a very handy solution, a tag management interface called Google Tag Manager or GTM with which marketers can create and deploy their tags without the need of a developer or webmaster (not quite, in my opinion).

Although GTM can be used for both websites as well as mobile apps, in my post I’ll be mainly focusing on the main implementation phases for websites.

Some of the main advantages of using Google’s GTM

  • it’s free
  • no need to disturb your IT or tech department
  • no more missing opportunities, usually thanks to lack of prompt IT cooperation which always leads to delaying your marketing campaigns
  • a quick way of deploying your tags
  • you have a preview & debugging mode for testing purposes (again, there is no need to repeatedly bother IT department till your desired tag functions properly)
  • you have full control, once again, no need for IT, webmaster or tech team
  • GTM offers multi-account support a huge advantage for agencies working with several clients
  • user permissions (enable your vendors to edit, create & modify data)
  • GTM can be used for both Google and non-Google tracking systems alike
  • most common tags are already built in and ready to use (no need for coding experience)
  • it offers a high level of manageability thanks to custom rules and macros
  • assures much quicker future upgrades and without the need of direct page level tagging

Though there are many advantages of using GTM, in my opinion many marketers would still find it difficult to handle and still need IT or data analyst support. So in case you have no above average web knowledge, GTM might still not solve your problems.

Important considerations prior switching to GTM

  • you’ll need a GTM account, create on at google.com/tagmanager/web/ by using your Gmail account or simply go through the sign up process
  • if possible make sure to have separate accounts for each individual company (in case of an agency, your clients should have their own GTM account under which they add you as new user with administrative permissions)
  • important: in case of mobile apps, it is advisable to have new containers at each major version upgrade
  • prior switching to GTM, you must gather all current tracking events, tracking codes that gather data from your pages (you can use Ghostery, check your Google Analytics account manually both in admin and reporting or simply in your source code areas like header, footer, buttons thankyou pages and so on)
  • prior switching to GTM, make sure you remove all current tags from your pages like your regular Analytics tracking code (usually in the header part of your pages), AdWords conversion tracking as well as click event tracking codes

    Universal tracking code sample

    Universal tracking code in header of your HTML pages (should be removed after switching to GTM)

  • while setting up your account, ticking sharing anonymous data is up to you but you can consider it as a win-for-all feature

    GTM setting up your account

    GTM setting up your account

  • a container will contain all the tags used on a particular site (your domain)

    GTM setup container

    GTM setup container

  • GTM will generate a container snippet to add to your site (should be added to every page on your site right after the <body> HTML opening tag, only this would guarantee accurate data collection)

    GTM container code snippet

    GTM container code snippet

  • start with a predefined tag type

    GTM tag types

    GTM tag types

  • you can add as many tags as you need to a container
  • you can preview or debug the draft version (or snapshot) prior creating a final version then publish it to the live site – this allows you to rollback to any previous versions

What the hack are Rules, Macros and a Data layer?

We already covered what roles a tag actually fills but as soon as you access your newly created GTM account you will notice two additional and uncommon navigation items on both left side and horizontal tab navigation areas. I bet most of you won’t have any clues what roles they have, at least at your first login attempt.

GTM Navigation

GTM Navigation

As we know, tags are usually being fired or executed while pages are getting loaded (ex. Google Analytics, AdWords conversion track) or some interactions are being executed (ex. clicks on a button) while on the other hand rules can be attached to your tags telling them when or in what circumstances a particular tag shall be executed. One of the most common rules being used is the match all pages rule meaning the tag associated with this rule is being fired on all pages of a domain.

GTM All Page Rule

GTM All Page Rule

We reached to macros and data layers, the part on which a marketer can easily get stuck. This is not the first nor the last time I’m emphasizing the fake assumption that GTM is supposed to solve marketers daily challenges, no it won’t or only to a certain level.

Macros are supposed to retrieve runtime information through data layer objects (preferred option) and occasionally through direct JavaScript variables or DOM. A data layer object (usually set up by development team) contains all the information needed to feed your macros. Thankfully GTM offers ready to use predefined macros. Since proper use of macros can cover a wide range of guidelines and case studies, I’m not covering it in details in my post, instead I’d rather share with you some additional resources I’m sure you’ll find very informative:

Want to learn more about proper use of tags, rules and macros? Feel free to follow Google’s guidelines on GTM’s help section (Tags, Rules & Macros).

Risks to avoid

There are cases when implementation of GTM custom code can cause major functionality issues. There would be few rules you should definitely take in account while implementing the GTM tracking.

  • sometimes you might need to create a separate test container
  • avoid providing access to multiple users without a proper implementation strategy with strict rules to follow (members with access to GTM should have certain roles applied, roles like configuring tags, testing, approving and publishing)

    GTM container level permission

    GTM container level permission

  • marketers should use only template tags (check drop-down list for available tags)
  • always test (debug) prior publishing a version

Additional helping tools and similar tag management systems

There are several other more robust ways of managing your tags, taking control of your analytics tools or measure your marketing activities with other tag-based technologies than Google Tag Manager. I’ve just gathered few of the most renowned ones. If you happen to use one of these, I’d be more than grateful to share your experience lower in the comment section.

For WordPress users I found two ready to use plugins for an even easier way of managing your tags, rules and macros under WordPress admin. The one is WP Google Tag Manager and the other, with more robust features and regular updates is Google Tag Manager for WordPress developed by a top Google AdWords Help Forum contributor Geiger Tamás.

Though a WordPress plugin could be much of helpful to better manage your tags, I strongly advise to stick to GTM interface and get used to it first, learn how tags, rules and macros actually work, only after go for an automation solution like one of the plugins mentioned above.

There is also Google Tag Assistant Chrome Extension an easy way to validate your tracking scripts.

Further setup guides

Conclusions

I’ll be frank and honest. Despite the emphasis I read everywhere about the advantages of switching to GTM which I admit is pretty obvious, still it’s far from being accepted as a user friendly approach for marketers. In my opinion GTM should be handled by Analytics professionals (not marketers) and the only real advantage it can offer is that you won’t need direct access to source code or Analytics admin. Collaboration between marketing team members and data analyst professionals will still be strongly needed.

Did you already make the move? What strategy did you use or what was your experience with GTM or other tag management systems? Let all of us know just below the comment section.

  • Can you tell us more about this? I’d love to find out more details.

    • hi Aaron,

      thanks for your comment
      probably I’ve not covered this topic so much in detail however I also added few additional resources you might also find valuable
      let me know what’s in particular are you interested in finding out more details about and I1ll do my best to assist you

  • Lucas Long

    Another useful tool when implementing a TMS is Tag Inspector (Tag Inspector). It will show you what tags are firing on each page, like Ghostery, but allows you to run larger scans (scan the whole site and have a nice report detailing what tags are where) instead of plodding through page by page. It also gives a nice visual of how the tags are firing, through the TMS or from the page source. That’s a nice feature to check your implementation on the tail end. I hope this can help simplify the process a bit!

    • thanks Lucas
      I checked it myself and indeed, this tool proves to belong in a must have for a marketer or analyst who need a more robust and automated way to visualise all the tags used on domain and page level
      thanks again for suggesting this tool, I really appreciate