GTM audit checklist

Google Tag Manger Best Practices: 10 tips

created on: 20/08/2020

Google Tag Manager (GTM) can be difficult to master, especially if you are managing a large website or if you are working as part of a team. Understanding if what you’re doing is actually the right thing to do can be also frustrating, but with the following tips, we hope you can hone your skills and get better at using this fantastic tool. Let’s have a look at them:

Let’s have a look at them:

  1. Use workspaces as your own sandbox
  2. Create a new workspace every time you need to implement new components and treat it as your own development environment. It is best practice to avoid using the default workspace, especially if working in a large team. The default container is useful for some quick testing of the most up to date version of your project, but not for creating new tags or triggers.

  3. Use RegEx tables
  4. Regular expressions, a.k.a. RegEx, are a series of characters that allows you to create patterns that help match, locate, and manage text. GTM offers a very helpful variable called RegEx table that takes another variable as input and if it matches a pattern, it returns a much better formatted text that, for example, can be used in your Google Analytics events by providing much neater data. There are many online tools for regex such as regex101.com that allows you to test and find patterns that work for you. An example will be this expression ^a...s$ which means it will match any strings that starts with ‘a’, finishes in ‘s’ and has a total of five characters. So, that will match text like ‘alias’ or ‘abyss’ but won’t match ‘abs’, be aware that it is case sensitive.

  5. Avoid using constant variables instead of Google Analytics (GA) settings variables
  6. Using a constant variable instead of overwriting GA settings is not a bad practice per se, as it allows you to quickly manage different GA accounts, but you are missing out on many other functionalities. Using a GA settings variable provides you with more data to be used consistently across many GA tags and ultimately, saves you time!

  7. Regularly audit your container
  8. Looking for unused tags, triggers and variables is one of the many tasks you should tick off your Google Tag Manager audit checklist and it should be performed regularly. Thanks to Taggernauta, you can do just that in an automated fashion, which speeds up your audit massively.

  9. Use folders to categorise your tags
  10. Using folders in GTM is a lifesaver when your container has grown quickly. Useful examples can be to create folders for third party vendors or different parts of your website.

  11. Use vendor specific templates and avoid using HTML
  12. Whenever you can, it is better to use a tag coming from an existing template for third party vendors rather than using HTML tags. That is primarily because they provide a better understanding of what information is leaving your business and they are less likely to include corrupted code.

  13. Check HTML tags before publishing
  14. As mentioned earlier, Javascript code inside HTML tags can be difficult to decipher and it might contain malicious content or expose personal identifiable information (PII). Also, developers are not always readily available to check if your code is safe and important information might be leaving your business without your knowledge or approval. That’s why Taggernauta next piece of development is aimed at offering users just that: underpinned by machine learning, Taggernauta will be able to flag if any malicious code is being injected in your website or PII are leaving your business.

  15. Set a default value in Lookup and RegEx tables to avoid ‘(not set)’
  16. When working with these types of variables it is necessary not to forget to tick the checkbox ‘Set Default Value’ and assign either a variable or text of your choice. That small tweak will make your data cleaner and easier to use as you will avoid ‘(not set)’ or empty parameters in your reports.

  17. Use good and consistent naming convention in GA event tags
  18. This is as straightforward as it sounds, but often overlooked. Especially when working in a team, it can be hard to maintain consistency across your set up. Decide what makes sense for your team and for your business and decide on a universal naming convention that will massively help you in the long term.

  19. Check if events are pulling through in GA correctly
  20. Testing, testing and testing are key here. Make sure tags are firing correctly and sending the right information. Taggernauta is currently developing a new feature that will allow you to automatically check if tags are firing or not and be alerted if they are not collecting any info. Stay tuned!

What are your top tips for GTM? This blog post described just 10 ways to improve how you manage your GTM containers and implementation, but there will surely be more! Let us know your thoughts about the new development pieces in the pipeline or any questions you might have – we will be glad to help. If you want to know more about Taggernauta or want a free demo, contact us.

Sign up for a FREE trial!