Tuesday, May 14, 2019

How to setup account and container in Google Tag Manager

The first step in getting started with Google tag manager is to sign up for Google Tag Manager account.
Go to https://google.com/tagmanager to signup for an account if you already don’t have one.  After you login you will come to an interface where you can set up your Google Tag Manager Account.
Figure: Google Tag Manager Account Setup

Enter a name for your Account in the Account Name field, this is generally the name of your company where you will be using the Google Tag Manager. You can give any name that works for you.
After account name, you can choose if you want to share data anonymously with Google and others are not going to go. I choose yes.
The next step after account information is to create a Google Tag manager container.  In one account you can have multiple Google Tag Manager containers.  Each container contains its own set of rule, triggers and tags.
In the initial setup you will need to create one container, you can add more later.
 
Figure: Google Tag Manager Container Setup

Create your container and give it a name. Your container name can be as simply as the site or the app name where you are going to use this container.
Next, choose where this container is going to be placed whether it's a Website, App (iOS or Android) or accelerated mobile pages (AMP) i.e. Web site for mobile.
I am going to use Web for all my examples, click on Web and click create a container.
If you are prompted for Google Tag Manager terms of services, then go ahead and read them. Once you're satisfied go ahead and click “Yes”. Now your account is crated.
Next you will get the Google Tag Manager container code (also called Google Tag Manager code) that you will need to add to all the pages of your website.


Figure: Google Tag Manager installation code

You have two snippets of code here. One goes into the section of the webpages and the other one goes into the section of your webpages.
Go ahead and copy these and send them to your developer or if you have access to the code then simply take the JavaScript codes and put them on your webpages.
This is the only code your developers will ever need to put on the webpages. Rest of the tags will be deployed via Google Tag Manager interface without ever touching the code on the webpages.
Once you have copy them go ahead and click OK.
Now you will be taken to an Google Tag Manager interface where will add and manage all the tags that you need to place on your website.
Next, we will look at the Google Tag Manager interface.
Enroll in our Google Tag Manages courses
  1. Google Tag Manager (GTM) Online Training Course - From Zero to Hero
  2. Google Tag Manager Advanced Applications

Want to Learn Web & Digital Analytics? Enroll in a Web & Digital Analytics Course

Monday, May 13, 2019

How does Google Tag Manager work?

When you place a Google Tag Manager JavaScript on a web page, it can listen to various user actions happening on the page. Based on the rules (also known as triggers) you define in the Google Tag Manager interface, it activates (also referred as “fire”) appropriate tags, as defined by the rules set in the tag manger.
In a nutshell, the Google Tag Manager code has four main functions
  1. Container of tags
  2. Rules Engine
  3. Event listener – user or page actions
  4. Tag activator.
  1. Tag Container - As mentioned in the “What is a Tag and a Tag Manager” section, all the tags are configured within Google Tag Manager interface and are used as needed. Google Tag Manager code on the page is the container that pulls and uses the tags as needed.
  2. Rules Engine – In Google Tag Manager, you define a set of rules that determine when and which tag(s) to trigger (fire).
  3. Event Listener – Google Tag Manager code on the webpage actively listens to user or page interaction on the site. These interactions are known as events. Almost any user or page interaction on a webpage can be captured by Google Tag Manager. Example of such action are page load, link clicks, button clicks, page scroll, form fill, video play etc. These actions are also called triggers.
  4. Tag Activator – When a condition, as specified in the rules, is met then Google Tag Manager fires the tag that is defined in that rule.
Let’s take an example to see how this works:
  1. Container – Contains Google Analytics Event Tracking tag.
  2. Rule – Fire Google Analytics Event Tracking tag when a button on a page is clicked.
  3. Event Listener – Listens for events on the page and evaluates them based on the rules. In this case, the rule is looking for a button click on a page. When a button is clicked then it trigger Tag Activation.
  4. Tag Activation - Fires Google Analytics event tracking tag
Follow this series of posts and learn Google Tag Manager - step by step.
Enroll in our course
  1. Google Tag Manager (GTM) Online Training Course - From Zero to Hero
  2. Google Tag Manager Advanced Applications

Sunday, May 12, 2019

What is a Tag and a Tag Manager?

Tag is a snippet of code, generally a JavaScript code, that goes on your web pages or apps. This tag collects the information about users and users’ behavior and then send that information to the tool/tag provider.
These tool providers then use the data collected to provide their service such as analytics, targeting, reporting etc.
Some examples of tags are, Google Analytics Tracking tag, Google AdWords tag, Facebook tracking pixel etc.
 Example: Google Analytics Tag
These tags can also be written in HTML (Hyper Text Markup Language) or a clear image file that is invisible to users but can send information to the server.
A website generally has several tags from various tool providers. These tags go directly on the web pages and require implemented by the website developers.



This is where the problem happens.  Anytime you need to change something, you are dependent on the developers to make those changes. You must work with their schedule and wait for them to implement the code that you want.  A lot of times that's too late because they have their own priority list and your needs are generally the last on their priority list.
Changing the tags is also very expensive and time consuming because when developers make a change to a page, it requires quite a few people in the process to make sure that everything is working fine before the code can be made live.
Net result is that making any changes to tags is not an easy process. This is where a Tag Manager helps a marketer. Tag Manager removes the need to put individual tags on the pages and makes it fast and easy to make any changes without any help from a developer.
Tag Manager provides you a single JavaScript code that needs to be placed on your pages. This code needs to be placed on your site only once by your developers on all the pages on your website or app. Once the code is implemented, the job of a developer is done.  Developers won’t need to be involved in anything going forward.
This Tag Manager code acts like a container which then triggers various tags that you define in a separate interface.

Any addition and changes to the various tags are done via Tag Manager interface and do not require a developer.  Someone in marketing team can easily manage all these tags without touching the code on the page.
Any time you need to make a change to any of the tags, instead of making a change in your page you go to the tag manager interface and make changes in that interface. Next time your web page needs a tag it gets new tag from the tag manager. This helps eliminate your need to be dependent on IT or a developer and you can make all your tag changes in a matter of hours or even minutes.
Want to learn Google Tag Manager? Enroll in our course
  1. Google Tag Manager (GTM) Online Training Course - From Zero to Hero
  2. Google Tag Manager Advanced Applications
More to come...

Thursday, March 14, 2019

Context is Critical: Creating a Culture of Web Analytics

Continuing my series on Creating a Culture of Analytics I would like to touch on a very critical aspect of creating a culture of Web Analytics and that is Context.

What is Context

According to Princeton.edu context is
  • Discourse that surrounds a language unit and helps to determine its interpretation
  • the set of facts or circumstances that surround a situation or event

Context takes the ambiguity out of the equation. As an Analyst it is very important that you provide full context when reporting your web analytics data. Context gets everybody on the same page. Do not leave anything for interpretation by the end users of your reports, give them the insights in a simple and easy to understand format.

Let’s look at an example to understand critical context is.

60 Degrees

If I say it is going to be 60 degrees tomorrow. What will be you reaction?
If you are in Minnesota – You will yell “Summer”
If you are in Seattle, you will think – ““Spring”
If you are in Florida, you will say “ Damn… Cold”
If you are in India, you will say “WTF….” (Indians measures temperature in Celsius and 60 degrees Celsius is 140 F)

Some other question that might pop in people’s mind are:
  • What is the temperature today?
  • Is it normal to have 60 degrees this time of the year

Without context 60 degrees does not mean much. Right.
Similarly when you report your numbers and tell report on visits, page views, time on site etc. it does not mean much unless you provide the full context.

Web Analytics & Context

Just saying that Visits are down by 10% from last week is not enough. You have to put that 10% decline in full context. Tell your end users what happened and why they should or should not worry.

So add something like : Visits are down 10% from last week and also 10% lower compared to the same time last year. Prior to this week we saw a 10% year over year growth but last week was abnormally down. Isn’t that getting better now?

You should go even further: Last year we got some free advertising from local newspaper sites that drove 20% additional traffic same time last year. Since we did not have the advertising deal this year, it impacted our visits this year. We noted the potential impact of newspaper site advertising in our last year’s annual recap (here is the link to last year report – people forget so remind them). If we take out the impact of spike from newspaper sites then we have a consistent pattern of 10% year over year increase. As noted in last few reports, that increase is due to our social media efforts this year. Now the picture is much clearer. Of course you should look into the full impact e.g. conversion, bounces, sales etc. (Note: How you present this story will depend on what format you chose to present your report)

Now everybody is on the same page and knows exactly what those numbers mean. Without that context, everybody would have had their own interpretations of the data. Misinterpretations lead to wrong action and/or mistrust in the data and the analytics team.

Final Words

Do not provide any reports without providing full context. Keep in mind that most of the canned and automatic reports do more harm than good because they do not provide context.

Other posts in the series


Note: This post was originally posted on March 4th, 2011 but it is still very relevant.

Follow me on twitter @anilbatra

Facebook Page http://www.facebook.com/pages/Anil-Batra-Page/130050670343547

Optizent.com - Digital Marketing & Analytics Consulting and Training