How to Setup Google Tag Manager
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?
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 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.
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)
A trigger is used to observe an interaction and decide when the tag should be fired or not.
Trigger types include:
- Page View
- Form Submission
- History Change
- 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.
User-Defined Variables are custom variables that gather rich marketing data that is unique to your website.
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.
3. Enter your business name under the “Account Name” field. Then click “Continue.”
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.”
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.
6. After GTM has been installed, visit your website and “Enable” Google Tag Assistant.
You can download the Tag Assistant Chrome extension here.
Refresh the page, then open the Tag Assistant widget to verify that the Google Analytics and Google Tag Manager codes were successfully implemented.
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.”
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.”
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.
Click on the pencil icon under the “Triggering” section. Then choose “All Pages” as your trigger.
Double-check all of your information so that your “Universal Analytics” tag looks like this. Then click “Save” to create your tag.
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.
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.
Return to the GTM Workspace and click “Leave Preview Mode.”
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 all options under:
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.