What is the Difference between Google Tag Manager (GTM) and Google Analytics (GA)?

Posted

05-09-2016 10:09:06

What is the Difference between Google Tag Manager (GTM) and Google Analytics (GA)?

Figuring out why Google has decided to release another free tool - which seems to essentially do the same thing as Google Analytics - has got a lot of web developers stumped, so much so that it has led to a relatively slow uptake for the new technology. 

With this article, our Digital Project Manager Aidan McNally will explain the difference between the two platforms, and why you should ideally be using both. 

If you’re not familiar with Google Analytics, let’s start off with a brief introduction. Otherwise, you can skip ahead to “What is Google Tag Manager?” 

What is Google Analytics?

In a nutshell, setting up a Google Analytics account and installing the Google Analytics tracking code on your website allows you to track who your visitors are, how they reach your site and how they use your site when they get there. 

You can install Google Analytics by setting up an account at https://analytics.google.com. If you already have a Google account (e.g. a Gmail account), you can use this to log into Google Analytics, along with all other Google services.
 
Typical questions that will be answered by Google Analytics are: 

    • How many people visited my site this month (or during any specified date range)?
    • What was the most popular page on my site (i.e. the page with the most visits)?
    • How many people visited my site and left directly after viewing only one page (i.e. what is my bounce rate)?
    • What devices and browsers do my visitors use (e.g. mobile, desktop, Chrome, Firefox)?

In order for Google to start tracking data on your website, you have to configure the Analytics tracking on your account; it is not enough to set up a Google Analytics account, because Google still needs to know which website (in Google Analytics parlance, “property”) you want to track, and they need to be sure that you own the website and have authority to track its use. 

In order to tell Google which site to track, and verify site ownership, you need to insert a small piece of JavaScript code on every page of the website that you want to track. This code can be found in your Google Analytics account by clicking on Admin, then selecting the Property you wish to track (usually the name of the property is your website’s URL), and clicking on Tracking code, found beneath Tracking info. 

Once you have added this code to the pages you wish to track (typically, all pages), and waited roughly 24 hours, your Google Analytics account will start to provide you with data. 

The tracking code that you find in your Google Analytics account is code that tracks all of the generic data Google presumes will be useful to you. 

Should you wish to track custom data, such as when a form has been submitted on your site, or a link has been clicked, you would normally need to edit your website’s code, adding in custom code that you create based on Google’s standards – e.g. you can add code that will fire off events to be captured by Google Analytics using this code: https://developers.google.com/analytics/devguides/collection/analyticsjs/events

Aside: If you are using a CMS (Content Management System) like WordPress, you will only need to insert the code into one file – in the case of WordPress, that would be the header.php file, found by going to your admin area, and clicking Appearance -> Editor and then the filename (located on the right). WordPress makes this possible by including the header file automatically on every page of your website. 

What is Google Tag Manager (GTM)?

To define Google Tag Manager, we must first establish what “Tag” refers to.

Most webmasters or web users define a tag as a word, or collection of words, that helps to categorise a Blog article.
 
When we read a blog article, we often see a group of words or phrases beneath it. These words and phrases are connected to the article so that when we search for one of the words or phrases, the article will show up in the search results. 

Adding these words or phrases to an article is known as “tagging” the article and helps to identify themes or subject matter within a particular article. 

In the case of Google Tag Manager, however, a Tag has a completely different meaning, and that in itself has been the source of a lot of confusion regarding the new service. 

The Tag in the GTM sense is a piece of code that will be added to your site in order to track something; yes, that’s right, it is a piece of code, and nothing whatsoever to do with the traditional definition of a tag, as stated above.
 
Now, “a piece of code that will be added to your site in order to track something” - sounds a bit vague, but a great example of this piece of code is what we’ve just talked about above; a Google Analytics tracking code!

Please note that you can add the generic Google Analytics code (or in Tag Manager we would call it a “Tag”) that you get via your Google Analytics dashboard via Google Tag Manager. However, this is not the only Google Analytics code (or Tag), you can add, as we’ll see in a moment. 

Another example of a tag is the Google AdWords code or Google DoubleClick code. 

So, as you can already see, Google Tag Manager helps us to organise and insert a number of different codes (or Tags) into your website, all at once, from one location. 

To create a Tag Manager account, just go to https://tagmanager.google.com, and like all other Google services, you can log in with your existing Google account. You are then given a piece of JavaScript code (just like the tracking code from your Google Analytics account) which you then insert on each page of the website you want to add tags to. 

Within Google Tag Manager, we can create new tags, edit their settings, and deploy them on our site automatically. For instance, we can create a new Google Analytics Tag that tracks when a visitor submits a form on our website (to those of you experienced with Google Analytics, this is done via an “Event”). In order to do this in the past, we would have had to insert a custom piece of code directly into the webpage that contained the form.If we wanted to track all of the form submissions on the entire website, we would have had to do this for every form on the site. With Google Tag Manager, however, we can create one tag that will track all form submissions on the entire website through a Google Analytics tag. 

Are you beginning to see why Google Tag Manager might be useful? 

Is Google Analytics now obsolete? 

To clarify, Google Analytics is only one of the multitudes of tags you can insert into your website with Tag Manager. Your Google Analytics account is still the place where you view all of your analytics data; Tag Manager just affords you an easy way to send more custom data to your Analytics account.  

Google Tag Manager makes it much easier to add new tracking code (or Tags) to your website to capture data, so that you don’t have to edit your code every time you want to start tracking something new!

If you’d like assistance setting up or configuring your Google Tag Manager or Google Analytics account, please contact Mach Media and our Digital Project Manager Aidan McNally will get back to you.

By Aidan McNally, Digital Project Manager



<BACK