Skip to Content
  • Development

Google Tag Manager - A powerful JavaScript Injection Tool

software developing on Apple desktop image description

Google Tag Manager (GTM) has been around for a while. In fact, I remember writing an article some time back about its entrance onto the scene.

It's come a long way since then. and now if you are an online marketer and haven't got your head around this thing START NOW! Put simply, Google Tag Manager is a digital marketer's best friend.

To describe its functionality briefly, it basically creates a window (or container as they call it) onto a site that allows anyone within the designated Tag Manager account to insert ANY CODE THEY WANT. Scary? A little, I suppose. However the ability to unobtrusively manage "tags" in a portal away for the site - is very powerful.

Below are the 3 main aspects that make up Google Tag Manager.

A tag manager Tag

Here you define what tag you want to add into your site's GTM container.

There are a series of built-in ones like Google Analytics, Adwords conversion tracking, retargeting. The one I have used the most would have to be the HTML tag which is basically a tag which allows you to insert anything on to the page through the container.

Examples of this may be a tracking code from another piece of software, chat software etc. If you know JavaScript, the possibilities are endless here - you can simply write scripts to manipulate the page completely. Crazy!


A tag manager Rule

As the name suggests, the rule concept determines where the tag itself is allowed to fire on site.

For example, you may have installed a tag with live chat code, however, you only want that live chat code to appear on product landing pages and not the checkout. You simply create a rule that prevents the tag from being fired on these pages.

You can use Regex (regular expressions) or simply leverage their string filters e.g url: contains, equals etc.



Macros are little programmable snippets within GTM that allow you to create more advanced rules. These rules generally involve dynamic data that needs to be passed from an element or variable with the page's DOM.

Other important features to note is the version system that allows you to backtrack tag changes as well as live debug tags before you publish them live - really handy if you're knee-deep in Javascript code!

In conclusion, I've always been a fan of this tool, and being a developer at heart I understand how powerful this thing really is when you're looking to leverage it in the online marketing space. 

Sign up, get around it and get tagging. Have fun!



Need help with your digital strategy? Contact us today.