In a previous post, we discussed how using Google Tag Manager can improve SEO by feeding certain data directly from your site or mobile app to Google Analytics. This free tool saves you time by removing the need for repeat manual processes and virtually eliminates the need to write code (cue applause)!
But is it as simple as Google makes it sound? No, but it’s not incredibly difficult, either. If you have a site or suite of digital properties, such as one or more websites and mobile apps, Google Tag Manager will become your best friend.
Are Google Tag Manager and Google Analytics the Same Tools?
Google Analytics and Google Tag Manager are not the same things, even though both work together seamlessly. Google Analytics is the hub of statistical data about your website and its pages, while Google Tag Manager is a tool that makes it easier to apply Google Analytics tracking codes to your pages and allows you to track certain events, such as link clicks or file downloads. Google Tag Manager holds and manages tracking codes.
Let’s introduce Google Tag Manager by first defining some important terms:
- Tags—Segments of code added to your website’s pages. Tags are instructions that tell Google Tag Manager what to do.
- Variables—Like variables with anything else, variables with Google Tag Manager stipulate other information that may be needed for a tag to work properly.
- Triggers—Like an IFTTT function, triggers tell Google Tag Manager when to fire tags on a page.
- Containers—In Google Tag Manager, containers are used to keep digital properties and their respective tags separate. For example, your website may be one container while your mobile app is another.
How to Set Up Google Analytics Tracking With Google Tag Manager
Google Tag Manager supports all Google-generated tags, such as from Google Analytics or Google Ads, in addition to tens of third-party tags. Most site managers start their journey with Google Tag Manager by using it to set up Google Analytics tracking. Here’s how it’s done.
Sign Up for Google Tag Manager
You can use an account you already have or create a new one at tagmanager.google.com. Once you log in, click Accounts, then Create Account. A single company only needs one account, as multiple containers can be used to differentiate between websites, mobile apps, etc.
Create a Container
If you don’t already have a container set up, use the default container for your website. Use your website’s name as the container name and choose “web” as the content type. You will be prompted to insert code on each page of your website, but make a note of your container ID before doing so.
Find Your Container ID
Navigate to Workspace in the Tag Manager. Toward the menu’s top, you will find your container ID, which will appear as “GTM-XXXXXX.” Click the unique ID for the container; this will start the Install Tag Manager form.
Copy the Code
Replace the container ID found in the code here with your unique container ID. Google Tag Manager explains that this code will need to be placed as near to the opening <head> tag as possible. A second code snippet that must also be customized with your container ID needs to be placed immediately after the opening <body> tag on each of your website’s pages.
Create a New Tag
Once Google Tag Manager is installed properly via code placement, navigate to Workspace and click “Add a New Tag.” Choose “Google Analytics: Universal Analytics,” leave page view as the Track Type, and choose “New Variable.” Input your Google Analytics tracking ID into the variable configuration box. To ensure the Google Analytics tracking code is used on all pages where GTM code is enabled, select “All Pages” before your tag goes live.
Get Valuable Information With Google Tag Manager
Setting up Google Analytics tracking via Google Tag Manager is the first step in simplifying analytics. However, Google Tag Manager allows you to get very specific about the type of information you want to be tracked using tags. Once you become comfortable with the tool, explore event tracking to gain valuable insights into your users’ behavior.