How to Setup Google Tag Manager

Search Engine Optimization

Whether you are a business owner or a digital strategist, Google Tag Manager is the unexpendable solution for tracking Adwords campaigns, remarketing tactics, analytics data, and more.

In this SEO guide, you will learn the overview of Google Tag Manager, how to implement it on your website, and how to setup and test your first tag.

What is Google Tag Manager?

What is Google Tag Manager

Google Tag Manager (GTM) is a free tag management solution provided by Google.

GTM is separate from Google Analytics, another free tool by Google for measuring audience data, user engagement, ROI, and much more.

By setting up Google Tag Manager, you will be able to customize the data that is reported in Google Analytics.

Tags, Triggers & Variables

A tag is a JavaScript snippet code for collecting and sending information to 3rd party services, such as Google Analytics, Google Adwords, Twitter, Facebook, and more.

A tag can be added directly to the website by copying and pasting the codes in the website template files (header.php, footer.php) or indirectly on the website via GTM.

What is a Tag in Google Tag Manager

The advantages of implementing tags via GTM include:

  • Control over when and where tags should or should not fire
  • Ease to update tags (versus updating code directly on the website)
  • Quick troubleshooting and deployment
  • Improved website speed (because slow loading tags are not blocking other tags from being fired)

trigger is used to observe an interaction and decide when the tag should be fired or not.

What is a Trigger in Google Tag Manager

Trigger types include:

  • Page View
  • Click
  • Form Submission
  • History Change
  • JavaScript Error
  • Timer
  • Custom Event

For example, if you wanted to track the number of times a button is clicked on, you would create a tag with a click trigger.

Variables tell GTM where to fire a tag. There are 2 types of variables: Built-In Variables and User-Defined Variables.

Built-In Variables are pre-configured variables that cannot be customized.

What are Built-In Variables in Google Tag Manager

User-Defined Variables are custom variables that gather rich marketing data that is unique to your website.

What are User-Defined Variables in Google Tag Manager

How to Setup Google Tag Manager

1. Login to Google Tag Manager or create an account if you already haven’t.

2. Click “Create Account” on the upper-left hand on the screen.

Create an Account in Google Tag Manager

3. Enter your business name under the “Account Name” field. Then click “Continue.”

Setup Account Name in Google Tag Manager

4. Enter the non-www URL of your website under the “Container Name” field.

Select “Web” for websites, “iOS” or “Android” for mobile applications, or “AMP” for accelerated mobile pages. Then click “Create.”

Setup Container in Google Tag Manager

5. After accepting the “Terms of Service Agreement,” a menu titled “Install Google Tag Manager” will prompt on your screen.

Copy and paste these codes immediately after the opening <head> and opening <body> tags in your website files, respectively.

Alternatively, you can click on the container ID, which is the identification number that uniquely identifies the GTM container, on the top-right hand of the screen to retrieve these tags.

Install Google Tag Manager

6. After GTM has been installed, visit your website and “Enable” Google Tag Assistant.

You can download the Tag Assistant Chrome extension here.

Enabling Google Tag Assistant

Refresh the page, then open the Tag Assistant widget to verify that the Google Analytics and Google Tag Manager codes were successfully implemented.

Results of Tag Analysis in Google Tag Assistant

Note: Do not worry if you identify that the Google Tag Manger tag was a “non-standard implementation.” It previously required only one tag whereas it now requires two tags.

7. Under the GTM Workspace, click on “Tags” on the left-hand column. Then click “New.”

Add Tag in Google Tag Manager

8. In this tutorial, we will create a “Universal Analytics” tag for tracking Google Analytics data.

First, rename the tag as “Universal Analytics.” Enter the Google Analytics Tracking ID and select the track type as “Page View.”

Adding Google Analytics Tracking ID to Tag in Google Tag Manager

Under the advanced settings, select “Once per page” under the tag firing options. This prevents a user from completing the same conversion multiple times within one session.

Advanced Tag Settings in Google Tag Manager

Click on the pencil icon under the “Triggering” section. Then choose “All Pages” as your trigger.

Choosing a Trigger in Google Tag Manager

Double-check all of your information so that your “Universal Analytics” tag looks like this. Then click “Save” to create your tag.

Universal Analytics Tag in Google Tag Manager

9. Click on the arrow next to the red “Publish” button. From the drop-down menu options, click “Preview.” You will now be able to preview your workspace.

Preview Changes in Google Tag Manager

10. Open your website in another window tab. Then refresh the page.

A box preview should prompt on the bottom of the screen. If the “Universal Analytics” tag was created correctly, a tag will fire under the “Tags Fired On This Page” section.

Google Tag Manager Box Preview

Return to the GTM Workspace and click “Leave Preview Mode.”

Previewing Workspace in Google Tag Manager

11. Optional: The last step is to enable Built-In Variables. By default, these are disabled in order to keep the size of the container to a minimum. Thus, increasing your page load speed.

However, we recommend enabling some Built-In Variables for inspecting HTML elements that improve how you can track tags.

Click on “Variables.” Under Built-In Variables, click “Configure.”

Enable Built-In Variables in Google Tag Manager

Enable all options under:

  • Pages
  • Clicks
  • Forms

Your changes will automatically save.

About Intuitive Digital

Intuitive Digital is a Portland-based digital marketing agency that offers holistic SEO, PPC, web design and maintenance services to small businesses and enterprises, nationwide.

Founded in 2012, we pride ourselves in having 100% positive ratings online and a 97% client retention rate. That’s mainly because our team of awesome strategists and directors work closely together to help our partners achieve their online and offline business goals.

Contact Intuitive Digital today for a free consultation and website audit.

About the Author

Nick Footer

Nick Footer is an entrepreneur and founder of Intuitive Digital, a national award-winning digital marketing agency in Portland, Oregon. With over 15 years of experience, he has helped hundreds of businesses improve their online presence through search engine optimization, paid advertising, and website design.

One thought on “How to Setup Google Tag Manager

Leave a Reply

Your email address will not be published. Required fields are marked *

Receive expert marketing tips