Ad - Web Hosting from SiteGround - Crafted for easy site management. Click to learn more.

Successful search marketing campaigns start with good data.

Who is in your target audience, where they come from, and how they move through your website from landing to exit (preferably conversion) is essential information.

The trouble is getting to the point where you have enough data to make smart marketing decisions.

Marketers rely on JavaScript tags on the backend of webpages to gather information about site visitors.

These are useful, but manually tagging and maintaining tags is time-consuming and tedious.

A marketer gets a tracking code from a third party, for example, or asks a developer to create a piece of tracking code for an on-page event.

The developer says they can complete it by next week.

Next week comes and the marketer tests the code. There is a lot of back and forth, especially when managing multiple campaigns and pages.

Enter Google Tag Manager.

What Is Google Tag Manager & How Does It Work?

Google Tag Manager (GTM) is a free tool by Google that allows you to quickly add tracking pixels and update tags on a website or app from a web interface.


Continue Reading Below

GTM allows site owners and team members to collect data without needing to rely on a developer to make major changes to the website code or wait for the next app release.

Once the (Google) Tag Manager Container is placed, it can effectively replace all other manually-coded tags on a site or app, including Google Analytics, Google Ads, and 3rd party tags such as the Facebook pixel.

This condensed code makes for a much faster site.

Google Tag Manager vs. Google Analytics

What is the difference between Google Tag Manager and Google Analytics?

Google Tag Manager (GTM) and Google Analytics (GA) are two completely different tools that work together to get you the data you need to make smart marketing decisions.

GTM is used for storing and managing the code – it is literally a container.

There are no reporting features and there is no option to analyze data within tag manager.

GA is used for data analysis.

All reporting: user reports, custom segments, conversions and engagement, ecommerce sales, etc. are viewed in Google Analytics.


Continue Reading Below

To understand why you need GTM in addition to Google Analytics, you need to know how GA gets the data you see in reports.

Google Analytics is able to report on user interactions thanks to the help of a tracking code also known as “GA Javascript code snippet” or “gtag.js.”

When an interaction occurs on your site—a pageview, for example—the Javascript snippet sends the hit to Google Analytics.

Google Tag Manager does not replace Google Analytics because it has no reporting features.

GTM is used to quickly add the GA tracking code to a website, deploy event tags and define rules for when each code should fire.

Getting Started With Google Tag Manager

At a high level, the main steps to getting started are:

  1. Log in to
  2. Create an account.
  3. Install GTM container.
  4. Add your tags.
  5. Preview and debug.
  6. Publish container version.

Tag Manager Set up & Install

Creating an Account

First, decide how account management will be handled if a member of your team changes roles.

Then, create the account using the login credentials of the person who will be managing the account in the long term.

Having a user management strategy from the beginning is best practice.

Should someone leave your organization, you will want to retain the work put into developing the Tag Manager account.

User Management is found within the Admin screen, where you can add users to the Account or a specific container within an account.

Admin is located in the top navigation, third from the left.

Creating a GTM Account: Step-By-Step

  1. Login to Tag Manager.
  2. Click Create Account.
  3. Enter Account Name.
    • An account represents the topmost level of organization.
    • Only one account is needed per company.
    • An account can hold more than one container.
  4. Select Country.
  5. Select if you’d like to share data.
  6. Enter Container Name.
    • Choose a descriptive container name for internal use; most often the name of the site or app.
  7. Select Target Platform:
  8. Click Create.
  9. Read Terms of Service.

Create a GTM Account screenshot of required fields.

After this screen, you will be prompted to install your new GTM code.


Continue Reading Below

Click “OK” to clear this dialog, or follow the install directions.

It does not matter if you choose to set up your container first or install the container snippet later.

After closing out of the snippet dialog box, you will be on the workspace screen, where you will be creating your marketing tags and triggers.

Installing GTM Container

If you closed the web container installation dialog box, you will find instructions to install Google Tag Manager within the Admin tab.

Admin is located in the top navigation, third from the left.

Instructions for installation will look like this:

GTM Container Snippet Screenshot Example

Examining the container code will help us see how Google Tag Manager works.


Continue Reading Below

In the first part, highlighted in yellow, you will see <script>.

This loads your GTM container on your page. It also tells your site that the page can continue loading while Google is doing its magic.

In the second part, highlighted in yellow, you will see a no script tag.

This no script tag is your backup.

It tells the browser to render an iframe version of the GTM Container to the page, allowing you to still track users when JavaScript is disabled.

A common question while installing the GTM container is: Does placement really matter as long as it is in the <head> section?

The answer is, yes – placement really does matter.

Google Tag Manager is not dependent on any plugins, it runs in raw JavaScript.

Placing the container snippet as high in the <head> as possible improves accuracy.

Placing the snippet lower in your page may result in incorrect data.

And, don’t skip out on the second part, it needs to be placed directly after your <body> tag.


Continue Reading Below

If you plan on using GTM to verify Google Search Console, you will need both tags placed as Google recommends otherwise verification will fail.

Ensure tags do not fire twice by removing any hard-coded tags on your site.

You can double-check for these using Google Tag Assistant (legacy).

Create an Analytics Strategy: Tags

Best practice for starting with GTM is to have an analytics strategy and tag implementation plan.

I promise this plan is not as complicated as it sounds.

  • Know what information you want to collect.
  • Identify all the tags you currently have deployed on your site.
  • Are there additional tags you will need to deploy?
  • For new projects, outline the tags you will need.
  • For custom events, plan your event naming convention and structure.

The most popular use of GTM is for Google Analytics, Google Ads, and the Facebook Pixel.

As of October 14th, 2020, GA4 properties are the default when you create a new Analytics property.

Because this is a beginner’s guide we will discuss the top question, how to set up Google Analytics 4 Property with Google Tag Manager, and link you to information providing additional tag implementations.


Continue Reading Below

Installing Google Analytics 4 With GTM

To begin recording basic data collection such as page views, scrolls, outbound clicks, and video engagement; you will need to set up the “Google Analytics: GA4 Configuration tag” to every page that you want to measure.

Unlike Universal Analytics, this one tag will set Google Analytics cookies for your property and send automatic measurement events to GA.

GA4 and GTM Step-by-Step:

GA4 Trigger Configuration screenshot example

Create your Trigger: the trigger tells the tag when to fire.


Continue Reading Below

  1. Click Triggers > New.
  2. Name your Trigger: Page View – All
  3. Choose Page View trigger type.
  4. Select trigger to fire on All Page Views.
  5. Save.

GA4 GTM Tag Configuration screenshot example

Create your tag: the tag will send data to Google Analytics for reporting.

  1. Click Tags > New
  2. Click Tag Configuration.
  3. Name your Tag: GA4 – Page View – All
  4. Select Google Analytics: GA4 Configuration.
  5. Enter measurement ID
  6. Click Triggering
  7. Select All Pages: Page View.

Completed GA4 Configuration in GTM screenshot example

Where to Find GA4 Measurement ID

Hold on – what is a measurement ID and where can I find it?

GA4 properties use the same data collection principles as Universal Analytics properties (the gtag.js library).

Rather than naming them property IDs, under GA4 they are referred to as “Measurement IDs.”

Finding GA4 Measurement ID screenshot example

GA4 Measurement ID step-by-step:

  1. Open GA4 Property; it will look like XXXXXXXXX
  2. Admin.
  3. Under the Property Column, click: Data Streams.
  4. Select your Web-based Data Stream.
  5. Measurement ID can be seen in the top right corner, it will look like G-A2ABC2ABCD.

Create a GTM Account screenshot of required fields.


Working with GA4 and GTM is quite different from Universal Analytics, and the majority of events will be automatically collected or easy to toggle on and off within the Google Analytics 4 interface.


Continue Reading Below

One of the biggest questions from marketers surrounds lead generation.

We’re used to tracking form submissions by destination URL.

Brace yourself… destination URL goal tracking is not a built-in to GA4 (*cringe*).

It may become available but as of publication, does not yet exist.

Creating a “destination URL” custom event actually takes place in the GA4 interface, which would take us on a bunny trail and turn this beginner’s guide into a behemoth.

For the sake of brevity, the events section of this article will focus on terminology and best practices when implementing GA4 events using GTM.

Automatically collected events are collected… well, automatically; you will not need to do anything extra to collect these events:

  • First Visit.
  • Page view.
  • Session Start.
  • File Download.
  • Video Start.
  • Video Progress.
  • Video Completed.
  • View Search Results.

Enhanced measurement provides events that you can toggle on and off within the Google Analytics 4 interface.


Continue Reading Below

No code changes are required. Enhanced measurement events available for websites are:

  • Scroll.
  • Outbound click.
  • Site Search.

Custom events are events that are not automatically collected or recommended events.

Custom events will not show up in standard reports.

Best practices when implementing events:

  1. Check if the event is among the automatically collected events.
  2. If not, check if the event is an Enhanced Measurement event.
  3. If not, jot down its naming convention within recommended events.
  4. Create a custom event only if automatic, enhanced and recommended events do not meet your needs.

The Google Tag Manager Advantage

Successful search marketing campaigns start with good data.

It does not matter if you run an ecommerce store or B2B services site, it is essential to understand how people interact with your site.


Continue Reading Below

Google Analytics provides a lot of helpful insights as far as site visitors and behavior flow but it does have its limitations.

By tagging events on your site with Google Tag Manager, you will be able to collect so much more.

GTM is packed with so many great solutions that take the headache out of tagging.

This Beginner’s Guide to Google Tag Manager merely scratches the surface of what the tool can do.

Even if you’re not a developer, reading Google Tag Manager’s Developer Guide is highly recommended.

More Resources:

Image Credits

Featured image by author
All screenshots taken by author, February 2021.

Source link