Informatics

Information about various topics

Ads Here

17.10.17

Understanding Google Tag manager as a Beginner

The Google Analytics can track user interactions 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 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. A good examples of tag would be Google Analytics tracking code, Google Analytics event codes, Adwords 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 Adwords), 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:
  • Google Adwords Conversion Tag.
  • Google Adwords Remarketing Tag.
  • Facebook Pixel code.
  • Crazyegg tracking code.
  • Inspectlet tracking code.
  • Any other custom HTML/Javascript code.

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:

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 tracking ID (you can find it in your GA tracking code – it starts with UA-XXXXXXX. I highly recommend adding that tracking ID as Constant variable (learn more about it).
  • 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).

No comments:

Post a Comment