Google Analytics Settings Variable in Google Tag Manager Explained

In this article I will show how to create and use ‘Google Analytics Settings’ variable in Google Tag Manager:

Prerequisites

I have written this article under the assumption that you are familiar with, how Google Tag Manager and its variables work.

Classic Google Analytics Tags in Google Tag Manager

You can create different types of tags in Google Tag Manager (GTM). These tag types could be: ‘Universal Analytics’, ‘Classic Google Analytics’, ‘Adwords Conversion Tracking’, ‘Custom HTML’ etc

In GTM there are tags which are based on ‘Classic Google Analytics’. We call such tags as ‘Classic Google Analytics’ tags. In order to maintain backward compatibility, such tag type is still available in GTM.

You can select this tag type while creating a new tag in Google Tag Manager or while editing an existing tag:

The Classic Google Analytics tags are used to send hits (pageviews, event, transaction etc) to Google Analytics server using ‘ga.js’ JavaScript library:

Each Tag of type ‘Classic Google Analytics’ has got its own set of settings which can be viewed / changed by clicking on the ‘More Settings’ and ‘Advanced Settings’ links while creating a new ‘Classic GA’ tag or editing an existing ‘Classic GA tag’:

‘Basic Configuration’, ‘Campaign Tracking’, ‘Campaign Variables’, ‘Domains and Referrers’ etc are examples of Generic Google Analytics settings.

In most cases, all of these settings need to be set and maintain with same configuration options across all tags of type ‘Classic Google Analytics’. But this need to be done manually for each tag because the ‘Google Analytics Settings’ variable through which you can set, change and apply Google Analytics Generic settings across all tags from one central location is not available for ‘Classic Google Analytics’ tags.

The ‘Google Analytics Settings’ variable in Google Tag Manager is available only for ‘Universal Analytics’ tags in the: ‘web’, ‘Android’ and ‘IOS’ GTM containers. This variable is not available in the ‘AMP’ GTM container:

Related Article: Difference between Google Analytics and Universal Analytics

So if you are using ‘Classic Google Analytics’ on your website or any tag of type ‘Classic Google Analytics’ then you would first need to migrate your existing tracking from Google Analytics to Universal Analytics before you can use and take advantage of the ‘Google Analytics Settings’ variable in GTM.

Related Article: Migrating from Google Analytics to Universal Analytics

Universal Analytics Tags in Google Tag Manager

As the name suggest, Universal Analytics tags have got the tag type ‘Universal Analytics’. You can select this tag type while creating a new tag in Google Tag Manager or while editing an existing tag:

Universal Analytics tags are used to send hits (pageviews, event, transaction etc) to Google Analytics server using analytics.js JavaScript library and they support the ‘Google Analytics Settings’ variable:

Remember, the ‘Google Analytics Settings’ variable is available only for ‘Universal Analytics’ tags. It is not available for any other tag type.

Each Tag of type ‘Universal Analytics’ has got its own set of settings which can be viewed / changed by clicking on the ‘More Settings’ and ‘Advanced Settings’ links while creating a new ‘Universal Analytics’ tag or editing an existing ‘Universal Analytics’ tag:

In most cases, all of the configuration options under ‘More Settings’ (like ‘Fields to Set’, ‘Custom Dimensions’, ‘Custom Metrics’, ‘Content Groups’, ‘Ecommerce’ etc) need to be set and maintain for all tags of type ‘Universal Analytics’. Manually updating each and every ‘Universal Analytics’ tag to make sure all such tags have got same basic configuration options is time consuming and not practical esp. if you have got dozens or even hundreds of  ‘Universal Analytics’ tag.

Here the ‘Google Analytics Settings’ variable come handy. Through this variable you can set, change and apply any or all of the configuration options under ‘More Settings’ (like ‘Fields to Set’, ‘Custom Dimensions’, ‘Custom Metrics’, ‘Content Groups’, ‘Ecommerce’ etc) from one central location to all tags of type ‘Universal Analytics’.

It is important to remember that through the ‘Google Analytics Settings’ variable you can not set, change and apply any or all of the configuration options under ‘Advanced Settings’ (like ‘Tag firing priority’, ‘Tag firing options’, ‘Tag Sequencing’ etc):

Methods to create Google Analytics Settings Variable in Google Tag Manager

There are two methods which you can use to create Google Analytics Settings Variable in Google Tag Manager:

#1 You can create a new Google Analytics Settings variable from within any tag of type ‘Universal Analytics’. Just edit the tag and then click on the ‘New Variable…’ option from the ‘Google Analytics Settings’ drop down menu:

#2 Navigate to the ‘Variables’ section in your GTM container and then create a new user defined variable of type ‘Google Analytics Settings’:

How to create a new Google Analytics Settings Variable

Follow the steps below:

Step-1: Login to your Google Tag Manager account and then edit the tag (of type Universal Analytics) whose generic settings you want to use across all other tags of type ‘Universal Analytics’. Most likely this would be tag you used to install ‘Universal Analytics’ on your website.

Step-2: Note down the ‘tracking ID’:

Later, you will use this ‘tracking ID’ while creating a ‘Google Analytics Settings’ variable.

Step-3: Click on the ‘More Settings’ link to see the current settings for your Universal Analytics tag:

Take a note of these settings. Later, you will use the same settings while creating a ‘Google Analytics Settings’ variable.

Step-4: Create a new ‘User defined variable’ of type ‘Google Analytics Settings’.

Step-5: Name the settings variable and enter your tracking ID:

The ‘cookie domain’ field is pre-populated with the value ‘auto’.

‘auto’ is a configuration parameter which automatically setup cross domain tracking between primary domain and its sub-domain(s).

Step-6: Click on the ‘More Settings’ link and then use the same settings you note down earlier for one of your ‘Universal Analytics’ tag:

Step-7: Once you have copied all the settings from your ‘Universal Analytics’ tag to your ‘Google Analytics Settings’ variable then click on the ‘Save’ button. You have now created a new Google Analytics settings variable which store generic settings for your universal analytics tags.

Note: You can create several Google Analytics Settings variables.

Configuring a Universal Analytics tag to use Google Analytics Settings Variable

Step-1: Edit a tag of type ‘Universal Analytics’ and then select the new ‘Google Analytics Settings’ variable from the ‘Google Analytics Settings’ drop down menu:

Step-2: Click on the ‘Save’ button to save the new setting for your tag.

Step-3: Repeat step 1 and 2 for each tag of type ‘Universal Analytics’.

Note: You can use only one Google Analytics settings variable at a time for a Universal Analytics tag.

Configuring a Universal Analytics tag to use Google Analytics Settings Variable but override some of the fields

You can configure a Universal Analytics tag to use Google Analytics settings variable and at the same time override some of the fields with custom values. To do that follow the steps below:

Step-1: Edit the universal analytics tag which use the Google Analytics settings variable.

Step-2: Click the checkbox named ‘Enable overriding settings in this tag’ in order to override individual fields from the settings variable in the tag and then add custom values to the fields you want to override:

Step-3: Click on the ‘Save’ button to save the tag with new settings.

Step-4: Repeat steps 1 to 3 for each universal analytics tag for which you want to use the Google Analytics settings variable but at the same time override some of the fields/settings with custom values.

Note: The fields which are not overridden continue to use the settings defined by the Google Analytics settings variable.

How to find which tag settings have inherited their values from Google Analytics Settings variable and which haven’t

When a universal analytics tag is configured to use ‘Google Analytics Settings’ variable then all its fields under the ‘More Settings’ section along with ‘tracking ID’ and ‘cookie domain’ fields inherit values from the ‘Google Analytics Settings’ variable (unless they are manually overridden with custom values).

In order to find the fields of a Universal Analytics tag which have inherited values from the ‘Google Analytics Settings’ variable, follow the steps below:

Step-1: Edit the universal analytics tag which use the Google Analytics settings variable.

Step-2: Click the checkbox named ‘Enable overriding settings in this tag’ (if it is not already checked).

Step-3: Click on the ‘More Settings’ link.

Step-4: Check each setting one by one and look for the text ‘Inherited from setting variable’:

Any field whose default value is ‘Inherited from setting variable’ has inherited its value from the Google Analytics Settings variable. 

Configuring a Universal Analytics tag without using Google Analytics Settings Variable

It is not mandatory to use the Google Analytics Settings variable. You can choose to keep/set all GA settings manually for any/all tag, of type ‘Universal Analytics’. When you create / edit a tag of type ‘Universal Analytics’ and you want to completely ignore the ‘Google Analytics Settings’ variable then do following two things:

#1 Choose ‘Select Settings Variable…’ menu option from the ‘Google Analytics Settings’ drop down menu and then click on the checkbox ‘Enable overriding settings in this tag

#2 Enter your GA property ID, click on ‘More Settings’ link and then add the various GA settings manually:

Note: In order to maintain backward compatibility, the checkbox named ‘Enable overriding settings in this tag’ is selected by default for all universal analytics tags which are currently not configured to use ‘Google Analytics Settings’ variable. However if you are creating a new universal analytics tag, then the checkbox named ‘Enable overriding settings in this tag’ is not selected by default.

Announcement about my new books

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and Beyond
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Himanshu Sharma

Certified web analyst and founder of OptimizeSmart.com

My name is Himanshu Sharma and I help businesses find and fix their Google Analytics and conversion issues. If you have any questions or comments please contact me.

  • Over eleven years' experience in SEO, PPC and web analytics
  • Google Analytics certified
  • Google AdWords certified
  • Nominated for Digital Analytics Association Award for Excellence
  • Bachelors degree in Internet Science
  • Founder of OptimizeSmart.com and EventEducation.com

I am also the author of three books:

error: Content is protected !!