Better Marketing Through Better Analytics
Using analytic tools can be extremely useful for those wanting to learn more about their audience. Common 3rd party platforms like Google Analytics are used for observing consumer’s online interactions through tracking conversions, page views, sources, and how users navigate through websites. When taking your first steps, Google Tag Manager (GTM) can be very intimidating, but ultimately it will make adding and updating tracking codes (tags) a simple and easy process. Following this guide, we will break down each element in getting you started with GTM and adding tags to your website.
(Google Analytics will be used as our example for a 3rd party analytics tool.)
What is Google Tag Manager?
GTM is a free marketing tool provided by Google that allows users to create and manage all of their 3rd party tracking codes in one place. The benefit of using GTM is that it creates a single code which replaces all of the individual codes needed by 3rd party analytic tools. Once this GTM code is installed on your website, you’ll never have to edit the code again when adding, changing, or removing tags.
What is a Tag?
A tag is the tracking code generated by a 3rd party analytic tool that tracks a specific action on your website and sends the information back to the 3rd party service to be viewed. GTM provides templates to make adding 3rd party tags simple and easy (all you need is a Tracking ID). We recommend using Google Analytics which gathers invaluable information on how your customers are using your website, however GTM allows users to incorporate any 3rd party tag into its container code.
Here’s an example of a Google Analytics tag:
What is a Tracking ID?
A tracking ID is provided by the 3rd party analytics tool you decide to use. This is a unique code which tells tags where to send data. When setting up tags in GTM, its important use your unique tracking ID to link your 3rd party analytics to GTM so that data is properly sent to your analytics account.
What is a Container Code?
This is what makes GTM great! Tools like Google Analytics create tags which track specific actions (one tag per action). The more actions you want to track, the more tags you have to add. Every time you add or change a tag, you also have to edit the corresponding code. Thanks to GTM, instead of individually adding each code from your 3rd party analytic tool, GTM generates one code that acts as a container for all of the tags you have created. This single container code can then be inserted on all your webpages instead of inserting each individual tag, saving you tons of time.
Here’s an example container:
Getting Started with GTM
Setting up GTM is actually an easy process. Follow these steps and you’ll have your account up in no time:
Create a Google Account
If you already have a Google account you can skip to step 2.
Login to GTM
Follow this link and click Sign in on the top right, then select Google Tag Manager.
Add a New Account
After you sign in, you should have landed on the Add New Account page, if not click Create Account
For the account name, enter the name of the company GTM is being set up for and click continue.
Now its asking to name the container. Use the name of the website the container code will be added to.
Select where you want to use the container (for this example we are going to select Web).
After you accept, you should get the following pop-up:
Congratulations! This is your container code that you will be using throughout your site. Click OK and you’re halfway to adding GTM to your website.
Now we need to link an analytics tool. Let’s open up a second browser tab and then continue to the next step.
Link GTM to 3rd Party Analytics Tool
For this tutorial we are using Google Analytics. If you don’t have an account, follow the link and click sign up. This will bring you to a New Account page.
(If you already have Google Analytics, copy your tracking ID from the admin panel’s property settings page and return to GTM. Skip to step 5.)
Enter in your company’s name, website name, URL, and select the proper industry and time zone. Click Get Tracking ID.
You should have landed on the Admin page; if not, open the Admin tab using the top navigator, underneath the Property section click Tracking Info, then click Tracking Code.
On this page you’ll find your Tracking ID, it should be in bold relatively close to the top of the webpage. Copy or write this number down, we’ll later use this for adding tags to our GTM container.
You can now minimize this tab and return to GTM.
Add Tags to Your Container
On the top of GTM, navigate to the Container page.
Click Add a new tag. This will bring you to a selection of premade templates for 3rd party analytic tools.
At the top you will be able to give this tag a name. For this tutorial we are going to create a tracker for all of our page views, so let’s name it Page View.
We’re using Google Analytics so select that as your product choice, click continue.
Set your tag type to universal and click continue.
This is where you add the Google Analytics ID we signed up for (Step 4). Paste or type in your Tracking ID.
Now select what you want to track. In this tutorial we want to find out how many people are coming to our website, select Page View and click continue.
Before we finish we need to select when we want our new tag to trigger. Let’s go with All Pages, this will make our tag trigger anytime someone visits any of our web pages. Go ahead and click Create Tag.
Once done you should be brought to the screen below. Now you can access the container code at any time by clicking the blue font at the top next to your company’s name. Click the name and copy the container code.
Congratulations! You have created your first container code. Now click publish in the top right, there will be a confirmation pop-up, click Publish Now and you're almost ready to start tracking. Next, you’ll have to add this code to your website. This code will always stay the same and you will never have to edit your site again to add more tags.
Adding GTM Container Code to your Website
To start tracking we still need to add the container code to your website. This process will vary depending on how your website is maintained.
If you have a webmaster that manages your site, have them add the code.
If you have a content management system (CMS), follow the CMS' instructions for adding the container code into the global header.
If you do not have a global header, you will need to add the code to every page individually by inserting the code immediately after the opening <body> tag.
Save and publish your website and you’re ready to start tracking!
Test and Preview
If you’ve followed each step, your Google Tag Manager should now be fully functioning on your website and sending data to Google Analytics using the container code we’ve setup.
To see if your tags are being triggered properly, go to the Container page in GTM and click the Preview button in the top right (where the Publish button was before).
Wait for the page to load, it should now say Now Previewing Version #.
Open a second tab and go to your website. On the bottom of your website the following should appear:
As we can see here, the Page View tag was triggered. This data has now been sent to Google Analytics.
Analyze Your Data
To view this data simply login to your Google Analytics account.
Data typically takes 24-48 hours to show up.
If you use the Real-Time tab it gives you a live view of how many people are currently on your website.
Use this data to see how effective your website is.
If you want to find out more specific information on how people use your site, you can always go back through Step 5 and experiment with more tags later on. Tags can easily be added, changed, or removed simply by going to your Tags tab in GTM.
Congratulations! You’ve now completed setting up Google Tag manager with Google Analytics.
For more great tips, click below to download our free eGuide on lead generation: