Google Tag Manager - Digital Marketing using Google Services (2015)

Digital Marketing using Google Services

9 Google Tag Manager

Now that you have your website ready with the required components, it is important to track and analyse the behaviour of your website visitors to improve your website. In order to achieve this, you need to paste multiple setup codes (Also called as Tags) in your website. Google Tag Manager makes it easy to handle such setup codes by adding one time simple setup.

How is this going to help me?
Maintaining and updating multiple setup codes in your website could be a tedious task. For example, in this book, you will be asked to setup Google Analytics tracking code and Google AdWords Conversion code. You will have to open your website’s coding and update the code setup twice. Instead, using the Google Tag Manager will minimize the task of rambling through a bunch of codes and perform the rest on its own.

Snapshot 9.1: Sample Tags in Tag Manager

Note: Before we get started, please note it is advisable to use one Gmail ID for signing up all Google Services like Google Tag Manager, Google Analytics, Google AdWords, Google MyBusiness, YouTube and Google +. If you use different Gmail IDs to sign up for each service, it will be difficult to link these services to share data with each other. So, please strict with one Gmail ID. Also, please do not use your personal Gmail ID. I would suggest you to create new Gmail ID especially for your business usage.

We have this Chapter here because we want you to understand that Google Tag Manager is an easy way to update all your setup codes using one time setup code. If you feel difficult to follow this chapter, please move on to other chapters and when it comes to setting up tracking code, please come back to this chapter. Let’s get started.

Google Tag Manager Setup

Step 1: Go to and Click on “Sign up now” to register. Use your Gmail ID and Password to sign up. As we mentioned, please use one Gmail ID for all your Google Accounts sign up.

Snapshot 9.2: Sign up now

Snapshot 9.3 Setup an account

Step2: You can name the account as you would prefer, like “LocSea” or even you can have your site name as an Account Name as shown in Snapshot 9.3.

If you are fine with the option of“Share data
anonymously with Google and others”,
keep it selected.

Step 3: Set up a container name of your choice, for instance: Choose “Web Pages” option in ‘Where to Use Container section’. Enter your domain URL, set a time zone according to the desired country (Snapshot 9.4).

Step 4: Once you click on “Create Account and Container”, you get a container code (Snapshot 9.5), which is the snippet code you need to paste it in your website. Please paste it in to every webpage of your website. Paste it immediately after the opening <body> tag.

Snapshot 9.4 Setup a Container

Snapshot 9.5 Container Code (This is theGoogle Tag Manager Setup Codeto be pasted in every webpage)

Step 5: Click “Add Tags Later”. It opens up the Container Draft Home Screen (Snapshot 9.6). That’s all you have to do for now in this chapter. You need to create Tags at a later point as you go through other chapters. Now move on to theChapter 10and come back to this section later.

Container Draft

Snapshot 9.6 Container Draft -> Tags

In this overview menu (Snapshot 9.6), you can see Tags, Rules, and Macros.

Click on New->Tag to create new tag.

Google Analytics Tag Setup

We need to create a new Tag in Google Tag Manager to enable Google Analytics tracking feature for your website. (Please first referChapter 10to setup Google Analytics Account to create Analytics Tracking ID for your website)

Step 1: To create Google Analytics Tag, click on New -> Tag (Snapshot 9.6). Provide a name for this Tag “Google Analytics Page View” and choose Tag Type as Google Analytics -> Universal Analytics (Snapshot 9.7)

Snapshot 9.7 Create New Tag and Select Tag Type

Step 2: Get your Google Analytics Tracking ID by logging into Google Analytics Account -> Admin->Property->Tracking Info->Tracking Code. Copy the Analytics Tracking ID “UAXXXXXXX-X” and insert it as shown in Snapshot 9.8.

Snapshot 9.8 Tracking ID

Step 3:If you want to enable Demographics Tracking through Google Analytics, you may enable the check box “Enable Display Advertising Features” shown in Snapshot 9.9

Snapshot 9.9 Display Advertising Features

Step 4:Leave default track type as “Page View” in order to track the website page views.

Step 5:Click on Save to create this Google Analytics Page View Tag (Snapshot 9.10).

Snapshot 9.10 Google Analytics Tag Created

We need to fire/deploy this Google Analytics Tag in to all webpages of your website to track. To do this, we should create a firingruletargeting all webpages of your website and apply it to this Tag.

By default, “All Pages” rule will be available under Rules menu (Snapshot 9.9). All Pages rule matches all webpages in your website. Refer Snapshot 9.11. We can make use of this existing rule and apply it for Google Analytics Page View Tag as we need to fire Google Analytics Tag to all webpages.

Snapshot 9.11 Rules

Step 6:Go to Tags Menu (Snapshot 9.10) and click on the “Google Analytics Page View” Tag. It opens up the “Edit Tag” window (Snapshot 9.12).

Snapshot 9.12 Edit Tag

Step 7: Click on “+Add” and Choose the existing “All Page” rules. Click on Save to apply this rule to your Tag (Snapshot 9.13).

Snapshot 9.13 Add Rules

Step 8:It is time to publish your Container and make your Tags live on your website. Click on Publish (Snapshot 9.14).

Snapshot 9.14 Publish your Container

It opens up the “Create Version and Publish” dialog box. Click on it to create a version and publish (Snapshot 9.15). Whenever you publish your Container, it creates a new Version (Snapshot 9.15). Versions help you to maintain and track your container changes.

Snapshot 9.15 Container Published and created a Version 1. It is live now.

We have successfully published this Container with Google Analytics Tag to all our Pages.

Google AdWords Conversion Code Tag Setup
AdWords Conversion Code Tag is used to track Sales/Leads/Inquiries/Goals. It should be fired only when someone reaches Thank You page or Order Successful Page. This Tag should not be fired in All Pages. Let’s create this Tag.

Note: Please referChapter 8AdWords before you create this Tag as you need to have your Conversion ID and Label ready.

Step 1: Create a New Tag and Name it as “AdWords Conversion LocSea Thank You Page” (Snapshot 9.16). Choose the Tag Type as AdWords Conversion Tracking. Enter the Conversion ID and Label. Click on +Add under Firing Rules Section. It opens up the “Add Rule” Dialog Box (Snapshot 9.17).

Snapshot 9.16 AdWords Conversion Tag

Step 2: Choose “Create new rule” as we need to fire this tag only in “thankyou” page. Let’s name this rule as ‘LocSea Thank You Page”. Enter the Condition as shown in Snapshot 9.17. Click on Save to apply this rule to AdWords Conversion LocSea Thank You Page Tag. This Tag will now be fired only in “thankyou” page.

Snapshot 9.17 New Rule (URL equals

Step 3: Click on Save to save your Tag.
Step 4: Click on Publish to publish your new Container. This creates another Version for your container and goes live.