Google Tag Manager V2 Tutorial: Setting Up and Adding Analytics

Project Inquiry

The more information you provide, the better we’ll understand your project and find the right solutions for you. Or if you’d like to talk to a live person give us a call at 888.217.9502. Talk to you soon!

Google Tag manager was created to make it easier for marketers and their teams to add/edit/remove website tags without the help of a web developer. This includes conversion tracking, site analytics, re-marketing, event tracking, and more. While it isn’t a new feature from Google, it is something you should learn to use.

Setting up Google Tag Manager V2 is fairly simple and will only require the addition of one script to your site. After adding that script, you should be able to add tags and other tracking scripts all within Google Tag Manager V2, test and debug them, and then publish through an easy-to-use interface.

When your site is loaded, tag manager will send the most up-to-date configurations to the end-user’s browser with instructions for which tags to fire. Tags are the scripts or tracking codes you want to add to the site and triggers are basically the settings you set up for Google Tag manager to follow.

How To Set up Google Tag Manager V2

Best practices would be for each business to have their own account, one business per account

Name the account, most likely after the business name

After creating the account, you will need to create a container

A container is for your website/app or multiple websites/apps. For example, if your website has two different domains, you would create a container for each domain

Name your container after the domain

Add the domains, this is optional but advised as you can add the actual domain here and a test or developers domain on it to test the tags on

Click Create Container and Accept terms

After creating the container, you will see two Google Tags that will need to be added to all pages on your site, on as high in the <head> of the page as possible and one immediately after the opening <body> tag.

If your site is a wordpress site the <body> tag is generally in the header file.

After adding the tag to your site, you will need to create tags and rules.

Creating a Tag and a Trigger: Adding Analytics through Google Tag Manager

To add an analytics tag through Google Tag Manager you will want to know a few things. One is that you want to have your UA number from your Universal/Google Analytics account and you want analytics to fire on all pages. To add analytics with Tag Manger:

Configure your tag by entering the UA number from your tracking script

You will need to add your UA number to multiple tags, so it would be easier to create a variable that includes your UA number so you don’t have to remember your UA number each time. I’ll walk you through this below.

Select “Page View” for tracking type

Enable Display Advertising Features

Set this to Fire on “All Pages”

Click save to save tag

To publish a tag to your site, begin by clicking the down arrow in the top right of the screen and select “create version” to create your first version. After creating a version, click on the down arrow again and select”preview” to view the tags on your site and I suggest clicking on “debug” so you can test each tag to ensure they are firing. This will open up your site with a window at the bottom showing what tags have been fired and what ones haven’t (see photo below). This is an amazing feature and I suggest using it before publishing any tags to your site just to ensure your tags are all firing.

How To Add your UA Number as a Variable in Google Tag Manager

Setting up your UA number as a variable will help you reduce the margin for errors when creating new tags. To add your UA number as a variable in Google Tag Manager do the following:

Click on “Variable” in the left navigation

Scroll down below the “Enabled Built-In Variables” to the “User-Defined Variables” and select “New”