One of the most common questions we get from our clients is ‘what is the difference between GA (Google Analytics) and GTM (Google Tag Manager)?’ as well as ‘how can we get reports from GTM directly?’
This blog post answers these questions as well as looking at the different ways you can set up Google Analytics if you want to collect some custom dimensions and track events completed on your website, for comparison purposes.
The simple answer to the above question is no, we can’t pull reports from GTM as it doesn’t store any of the data whereas GA collects, stores and processes the data for analysis.
'Then why do you need it?' you ask…
Google Tag Manager acts as the middleman between your site and the tracking scripts. All the tracking code including GA sits within GTM tag and then you can decide which tag to fire on which page and what data to pass via each tag. This data is collected from the site using built-in variables and event listeners or by implementing a custom data layer. Below you can see a couple of points comparing the differences between implementing GA code directly on site versus implementation using GTM.
Google Analytics: GA code needs to be implemented on every page of the site in the head <head> section.
Google Tag Manager: GTM code needs to be implemented on every page of the site right after the opening body (<body>) tag. This can be accomplished by editing the page templates or page header template, as this method ensures future pages are automatically tagged with the GTM container when created.
This is what the GTM container code looks like:
Google Analytics: In addition to the dimensions and metrics that are automatically tracked in GA, you can also set up your own ‘custom dimensions’ to track activity that is specific to your business. In this case, GA code needs to be manually amended for collecting custom dimensions and metrics on all pages where the additional data can be obtained.
If you are planning to track events then the track event code needs to be implemented manually on all the events that require tracking. To track a simple PDF download event via traditional tracking methods could take hours for a developer as they will need to amend code on all pages where the code is required but GTM simplifies this work.
Google Tag Manager:With GTM you can use a data layer (more on data layer below) for collecting custom dimensions and metrics. Tracking events is both a dynamic and more accurate method within GTM, which uses built-in event listeners, triggers and variables. For example implementing GA event tracking for PDF downloads could take as little as 15 minutes through GTM and it is dynamic, meaning all PDF downloads on the site will be tracked using a single tag and trigger, saving hours of development time.
shortcut CTRL + U(when using chrome) or by right clicking and selecting ‘view source’ and then search (using the shortcut CTRL + F) for “dataLayer”.
Here is an example of a data layer we have in place for capturing information from all of our blog posts:
To summarise, GA is great at data collection, processing and analysis, but collecting various bits of data from the site without using GTM would add significant development time and cost especially if the majority of the data is custom. Using GTM we can collect all the required data for GA dynamically and with relative ease whilst using minimum IT resources, saving on cost and time.
If you would like to know more about how we can improve your data collection and the information you can get from your Google Analytics through custom reports, and how we could help you to consolidate your tags using Google Tag Manager, please
get in touch.