Mudbath Blog

5 August 2014

Google Tag Manager - A powerful JavaScript Injection Tool

Google Tag manager has been around for while in fact I remember writing an article some time back about its entrance onto the scene. Well! its come a long way since then and now if you are an online marketer and haven't got your head around this thing - hint: START NOW! Put simply, Google tag manager is a digital marketers best friend. To describe it's 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 SOOOOO powerful. Below are 3 main aspects that make up google tag manager.

A tag manager tag

Here you define what tag you want to add into your sites GTM container. There are a series of built in ones like Google analytics, Adwords conversion tracking, re targeting. The one I have used the most would have to be the HTML tag which is basically a tag which allows you insert anything on to the page through the container. Example of this may be 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!!!

google-tag-manager-tag.png

A tag manager Rule

As the name suggests, the rule concept determines where the tag itself is aloud to fire on site. An example of this might be you 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 you Regex (regular expressions) or simply leverage their string filters e.g url: contains, equals etc

google-tag-manager-rule.png

 

Macro

Macros are little programmable snippets within GTM that allow you 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.

Google Tag manager Macro

Other important features to note is the version system that allows you to back track tag changes as well as live debug tags before you publish them live - really handy if your knees 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 your looking to leverage it in the online marketing space. Sign up, get around it and get tagging.

Have fun.

JD