google tag manager basics

Google Tag Manager Basics: Master Tags and Triggers

[Updated 3/13/24] Learning Google Tag Manager basics begins with mastering tags and triggers. So let’s learn how GTM tags and triggers work and then walk through the process of setting up a GA4 event tag in GTM.

Once we set up our trigger and tag in GTM, we’ll send event data into Google Analytics based on the specific event parameters we specify.

Table of Contents

What is a Tag in Google Tag Manager?

A tag is piece of code that can send data to a system such as Google Analytics. A tag could be something like the code for a Facebook tracking pixel, or the code snippet for Google Analytics. The screenshot below shows the two Google Analytics tags on the Root and Branch site (the GA4 property type and the UA property type) within the associated Google Tag Manager account.

In addition to tags like this, we can create other tags to track a specific action on our website. You can see these other other types of tags in the first five tags below.

ga4 and ua tags in gtm

These actions are called “events”, which is why you’ve probably heard the phrase “event tracking” in terms of Google Tag Manager and Google Analytics. We’re going to walk through an example of creating a tag and associated trigger for event tracking in the walkthrough below.

a blue tag

Explain These “Events” A Bit More

An “event” could be something like scroll depth tracking, or video plays, or page timer tracking, or link click tracking. In this case, the event we’re going to be tracking is a specific click from a specific page (the Root and Branch homepage) to a specific destination (the Root and Branch YouTube channel).

What is a Trigger in Google Tag Manager?

A trigger “listens” for certain actions (the aforementioned “events”) to take place. Those actions could be clicks, form submissions, pageviews, scroll activity, or video plays. For a tag like a Facebook tracking pixel, the trigger will be a pageview of any page of the website in question. That page loading (the trigger) will tell the Facebook pixel (the tag) to get to business and start collecting data. For a more specific action that we want to track like our example of tracking clicks from the homepage of this site to the YouTube channel, we’ll want to create more specific rules for our trigger.

a trigger for a gtm event

On its own, a trigger can only listen. It needs help in order for data to be created and shared with an associated platform like Google Analytics.

How Do Tags and Triggers Work Together?

Within the Google Tag Manager platform, we will define our trigger and our tag. The trigger is specific action that we are listening for. The tag holds the data that we want created. When a tag is paired with a corresponding trigger, data will be sent through to Google Analytics as the trigger fires.

It looks like the diagram below.

trigger and tags in google tag manager

If you want to skip the reading and jump to the video, check out the linked tutorial below. This has all the info you will need. Otherwise, read on below for more info.

Google Tag Manager Basics Video Guide: Setting Up a Tag and Trigger in 12 Minutes

The linked video explains the theoretical background of these Google Tag Manager basics. It also reviews a complete walkthrough of creating the tag and the trigger.

gtm tags and triggers

Note: the video walkthrough includes the old version of Google Analytics, so you might prefer the written walkthrough below for GA4

Before We Begin: Here’s What We’ll Need

We’ll be working with Google Tag Manager and linked Google Analytics (GA4) property.

Google Analytics

We’ll use the new GA4 property type.

If you were a fan of the old version of Google Analytics and want to learn more about how the new version compares, you can check out this comparison of GA4 vs. UA.

google analytics png

Google Tag Manager

GTM is where we’ll actually be doing the work to create our trigger and our tag. If you are not currently using Google Tag Manager, you can check out this guide to set up Tag Manager on your WordPress site. And if you’re confused about the difference between the two platforms check out this comparison between Google Analytics vs. Tag Manager.

google tag manager png

Configure Your Tag and Trigger

Let’s start by creating our trigger.

Let’s Create Our Trigger

As you can see in the screenshot below, we’ve created a Link Click trigger. After we hit the “New” button to create a new trigger, we’re prompted to select what kind of trigger we want to create. The options we have for the type of trigger to create look quite similar to the different kinds of actions we can track. For example, there’s a timer trigger, a scroll depth trigger, and various click triggers. We select the link click trigger (called “Click – Just Links”) for our purposes.

We can set this trigger to fire on ALL link clicks or just SOME link clicks. We’ll configure it only for some link clicks. This allows us to specify the specific conditions that we want. As you can see below, there are two conditions for our trigger. The destination of the click must be to the URL of the YouTube channel (the Click URL) AND the user must be on the homepage when they make that click (the Page URL). So any clicks from this page to the YouTube channel, would not cause this particular trigger to fire.

Let’s Create Our GTM Tag

We can create a tag in GTM by hitting the blue “New” button within the Tags menu (accessible from the left-hand navigation).

The next thing to do is select the type of tag we’re going to be creating. This tag is for event tracking for our associated Google Analytics (GA4) property, so we select “Google Analytics: GA4 Event” as our tag type.

ga4 event tag

Let’s now give our new tag a name. This name identifies the tag within the Google Tag Manager platform. It doesn’t affect anything outside of that.

We’ll give ours a descriptive name: GA4 Event – YT Subscribe.

new name ga4 event

After we name it, click Save.

Now it’s time to configure the event.

Configure The GA4 Event Tag

In the days of Universal Analytics, we created events by identifying specific event parameters. We identified a specific name for up to 4 parameters: category, action, label, and value. Only the first two were required with label and value being optional. Each parameter could be hard coded (manually typed in) or set up as a variable.

Event parameters in GA4 look much different.

Event Parameters in GA4

Gone are category, action, label, and value.

In its place is a far more flexible approach to parameters. In GA4, you can set anywhere from 0 to 25 event parameters with each event.

You also have must give your new event a unique name. This event name is what will feature most prominently in your GA4 event reporting. Any parameters that you set with the event will be associated with that event and will provide additional context for the event.

Check out the event below. We’ve given it a name of youtube_subscribe_button. Every time the event fires, an event of the same name will record data and show up in our GA4 reports. You can also see that there has been a parameter called click_text set that will pull in a variable of {{Click Text}}. So if we look in our GA4 reporting we’ll be able to use the click_text parameter to see the specific text of the link that was clicked when the youtube_subscribe_button fires.

Note: If you’re going to be working with event parameters in GA4, you must know about the role of custom dimensions so you can actually access your data.

ga4 tag created

Finish Configuring Our Tag

The final item we see above is the “Configuration Tag” field. This is where we associate our GA4 Event Tag code with our Google Analytics property, so the event data goes to the right place. In this field, you can  type in your GA4 Measurement ID (from the admin section of your GA4 data stream). Or you can do what we’ve done here. That’s creating a separate tag in GTM for your GA4 configuration using the same Measurement ID and then selecting that in the drop down.

Our Tag and Trigger Together

The last step is to select a firing trigger for our brand new tag.

You’ll see a directive from GTM to choose “Choose a trigger to make this tag fire”. Click into that space and go find the Trigger you built above. Once you’ve selected it, you’ll have a tag combined with a firing trigger as shown below.

tag and trigger paired

Last Steps

Congratulations! You (hopefully!) now know a bit more about GTM than you did before. Tag Manager can be confusing and overwhelming, but if you can grasp the concept of tags and triggers you can understand the primary way in which the platform works. Bravo! Google doesn’t seem to do us many favors either by having products platforms with very similar names. For example, the new Google tag is located within Google Tag Manager and is used set up Google Analytics.

You can also use Tag Manager to deploy other code-based tools on your website. You can find one example of that in this Microsoft Clarity set up guide.

If you’re interested in more digital marketing tips and guides like this, head on over to YouTube and subscribe to the Root and Branch channel. There’s normally at least few new analytics and SEO videos with tips and guides each month.

click to yt


Final Thoughts

If you have questions about these Google Tag Manager basics or suggestions of your own tips to share, feel free to drop them in the comments below or share on LinkedIn.

Thanks for reading and have fun with those tags and triggers!

5 replies

Trackbacks & Pingbacks

  1. […] Google Tag Manager, navigate to the variables section and create new variables under “User Defined […]

  2. […] it out, along with the codes I’ve used to set up Google Tag Manager and the Facebook domain […]

  3. […] methods exist to install the Clarity tracking script, but we will focus on using Google Tag Manager […]

  4. […] how to install GTM in 4 minutes. If you’re not yet comfortable with GTM, this guide to understanding tags and triggers may be worth a […]

  5. […] will help get the job done quickly. I’d also recommend reading about how tags and triggersGoogle Tag Manager Basics: Master Tags and Triggers […]

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

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