Friday, July 26

Google Tag Manager vs Google Analytics: What’s the difference?

Updated: August 2nd, 2018. When I first heard about Google Tag Manager (GTM) in early 2013, I felt a bit confused. At that time I had no idea that tag management was a thing at all, so naturally, I found myself questioning what Google Tag Manager was anyway? What’s the difference between Google Analytics events and GTM events?

And nowadays I actually still notice this trend of confusion among many beginners. In this blog post, I’ll compare Google Tag Manager vs Google Analytics and show you the main differences.

 

Google Analytics In a Nutshell

Google Analytics

Google Analytics’ main purpose is generating reports and statistics about your website, for example:

  • how many people visited your website yesterday.
  • what country are they from.
  • how many pages they visited per session.
  • how many visitors bounced off your website (without performing any action).
  • which pages were the most popular, etc.

The only way Google Analytics can track these user interactions is with the help of marketing tag. Usually, it’s called GA Tracking Code or GA Javascript code snippet which must be placed on every page of your website.

Once an interaction occurs on a site (e.g. pageview), a Javascript snippet sends the corresponding data to Google Analytics’ servers.

There’s no problem if you just want to put the GA tag on all websites and track general information like pageviews, bounce rate, session duration, referrals, etc.

However, you may want to track how many people use a specific feature on your website/app. Or maybe you are interested in tracking sales, huh? In this case, you’ll need to add custom tags – Google Analytics events which send the data only when a visitor completes a particular action on your website. A good example here could be a form submission.

So what do you do here? Ask the developer to add that form submission tracking tag to a website, right? But what happens when there are tens or hundreds of interactions you are willing to track with Google Analytics?

Unfortunately, it will require a lot of developer’s time (and they are always very busy!). It might take weeks or even months until you can get your marketing tags up and running, which is a real bummer.

 

Google Tag Manager to the Rescue!

Google Tag Manager

Google Tag Manager makes it easier to manage this mess of tags by letting you define the rules of when certain tags should fire, but first, let’s take a quick overview of GTM.

Google Tag Manager is a free software from Google that allows you to deploy various types of code (tags) to your website. Some good examples of a tag would be Google Analytics tracking code, Google Analytics event codes, Google Ads conversion script and remarketing tags. There are many more types of code that can be added to your website using GTM, including custom codes.

Google Tag Manager does not replace Google Analytics. Instead, it helps users to easily add Google Analytics tracking code (tag) to your website, deploy GA event code snippets and define rules, when each GA event must fire.

Prior to GTM, GA tracking codes had to be hard-coded, usually by a web developer on each individual page. Having hundreds of events is very difficult when it comes to maintaining/updating them. But Google Tag Manager solves this problem because all your tags are stored in one place – your GTM account.

Imagine that Google Tag Manager is a Toolbox, where you keep all your tools: a ruler (Google Analytics), a hammer (Google Ads), etc.

Google Tag Manager also lets you test your tags to make sure they are triggered when you load the right page or click a particular button. Another great benefit: you can change your tags and the way they work without actually changing the source code of your website (which you may not be able to do because of slow release cycles or busy schedule of developers) – instead you just edit tags in GTM user interface and publish changes with a click of a button.

Google Analytics is not the only tag compatible with Google Tag Manager. Other examples include:

 

To sum up, Google Tag Manager lets you manage various Javascript tracking codes (a.k.a. Tags) on your website. Google Analytics tracking code is one of those tags.

 

Example

As I have previously pointed out, Google Analytics is a Tag itself. According to GA instructions, you need to place GA tracking code on every page of your website. A sample tracking code should look like this:

<script>
 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
 })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-XXXXXXXX-1', 'auto');
ga('send', 'pageview');

</script>

Google Tag Manager offers a default Google Analytics tag template, so setting it up is fairly easy. After you installed GTM on your website, go to Tags.

  • Click New
  • Click Tag Configuration block and choose tag template – Universal analytics
  • Add Google Analytics Settings Variable. If you’re new to it, here’s a guide.
  • Keep Track Type as Pageview and click Triggering section.
  • Choose All pages.

Google Analytics Pageview Tag

Congratulations! You just created a Google Analytics Pageview tag in Google Tag Manager. It will track pageviews on all pages which have GTM container snippet installed. All pageviews will be sent to Google Analytics property UA-XXXXXXX).
Google Tag Manager Course - Learn More

 

Google Tag Manager vs Google Analytics: Events

In Google Analytics all events are displayed in the event report (Behavior → Events). They often represent interactions that happened on your webpage. The data for this report is populated from Event hits which are sent from your website to Google Analytics’ servers. Prior to the birth of Tag Management systems (like GTM) Event hits had to be initiated by small Javascript codes placed in your website. Here’s an example:

ga('send', 'event', [eventCategory], [eventAction], [eventLabel], [eventValue]);

As you can see, this snippet of code contains eventCategory, eventAction, eventLabel and eventValue (optional). After a particular action occurs on your website (e.g. user submits “Contact us” form), the Google Analytics Event will be fired and the corresponding data will be passed onto Google Analytics, for example:

ga('send', 'event', 'Form submission', 'Contact form', 'https://www.example.com/contact-us');

You can track those events in GA Real-time GA reports.

Now let’s talk about Google Tag Manager events. In order to see them enable GTM’s Preview and Debug mode by clicking the Preview button in the top right corner of Google Tag Manager interface.

GTM Preview button

After you enable Preview and Debug mode, a large orange notification banner will appear in GTM user interface.

Preview and Debug mode

Once the preview mode is enabled, navigate to the site where Google Tag Manager Container code is placed and you will see a debug console window at the bottom of browser showing detailed information about your tags, including their firing status and what data is being processed. If it didn’t appear, read the guide explaining how to fix GTM preview mode.

On the left side of Preview and Debug console, you should see a list of some vague definitions. These, my friend, are Google Tag Manager Events.

new subscriber event

They actually play a very important role within GTM –  you can fire your Tags (scripts from various marketing tools) based on these Google Tag Manager events. Here are few examples to make it easier to comprehend:

  • A Pageview Google Tag Manager Event can be used as a trigger to fire Google Analytics Pageview Tag.
  • A gtm.linkClick GTM event (which happens when a visitor clicks any link on your website) can trigger a Google Analytics Event Tag (which sends a particular event to GA event reports).
  • A gtm.formSubmit GTM event (which happens when a visitor submits a form) can trigger another Google Analytics Event Tag (which sends an event with the data of submitted form to GA event reports). gtm.formSubmit event can also be used as a trigger to fire a Google Ads Conversion Tag.
  • Since all Google Tag Manager events are populated in Data Layer, you can also ask your developer to fire custom Google Tag Manager events (a.k.a. “Data Layer Events”).

To sum up, Google Tag Manager event is an interaction on your website that is spotted by GTM and then placed in the Data Layer (p.s. Data Layer is automatically created on your website when GTM container code is implemented and published). That interaction on your website can be used as a trigger (condition) to fire your marketing tags (scripts), e.g. Facebook Pixel, Google Analytics Events, Mixpanel Events, Google AdsTags, etc.

How data layer works - scheme

So as you can see, Google Tag Manager is the middleman in your Digital Analytics implementation. It observes interactions that occur on your website, creates GTM events and then uses them to fire tags (e.g. Google Analytics Event). Although the term Event is the same in both Google products, in Google Tag Manager a GTM Event is a trigger, while GA Event is a Tag.

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x