Trigger Groups are the newest edition to Google Tag Manager. Let’s take a look at this new feature.
🎓 Learn more from Measureschool: https://measureschool.com/products
🚀Looking to kick-start your data journey? Hire us: https://measureschool.com/services/
📚 Recommended Measure Books: https://kit.com/Measureschool/recommended-measure-books
📷 Gear we used to produce this video: https://kit.com/Measureschool/measureschool-youtube-gear
In this video, we’re going to talk about the new Google Tag Manager feature of trigger groups. All and more coming up.
Hello there measurers. Welcome back to another video of measureschool.com teaching you the data-driven way of digital marketing. My name is Julian, and today we want to talk about the new Google Tag Manager feature of trigger groups. Now, what are trigger groups exactly? It is just that a new trigger type where you can take your existing triggers and put them into a group. Now all of these triggers need to turn true for your trigger group to turn true. And if you have that attached to a tag, then new tag would fire.
This is particularly helpful if we wanted to have some kind of control structure where we pieced together our control structure from different triggers. I’m going to show you an example right now on how you can utilize this.
So let’s dive in. Here we are on our demo shop. And we have a landing page here. And on this landing page, I want to fire a tag when the user scrolls down this long landing page and actually reads it. So I would utilize a timer trigger to fire up, for example, on five-second mark.
But then also a scroll trigger to fire on the 50% mark. Now, if both of these conditions turn true previously, then I want to fire our tag. So what tag are we talking about. We are here in our Google Tag Manager account under tags, I have a GA scroll event tag. And now I need to attach a trigger to it. And if I will just take our triggers of the scroll 50% and the timer trigger 50% and attach it to the tag, these would evaluate actually or underneath each other. So that would mean that if we attached them to the tag, either, when the five second timeout would fire or the 50% mark would fire our tag would fire so it would find actually two times which is not desirable. We want to combine them and this is where these new trigger, the new trigger type of trigger groups come in.
So we go here on new, and we can choose this new trigger group right here. And let’s name this correctly. So this is a group for our scroll and our time, five second time. And we’re going to attach our existing triggers that we have the time, the trigger that have prepared beforehand, and our scroll trigger right here.
Now you can optionally put in another condition. So this would be a third condition not really a trigger, but the condition for that trigger group to put in and say that it should only trigger in these certain circumstances. But since we have these triggers inside already, we should be able to make this work within just the trigger.
So I’ll just go with all conditions. And I’m going to save this year. So now we have a new group, scroll and time a trigger.
Just to show you the other triggers that I have set up beforehand. So this is a normal titled trigger that will fire upon the five second mark. And then I also have a scroll trigger that fires on the 50% vertical scroll. So if I’ve scrolled 50% down, it should fire. Now this is now attached to a trigger group. So we have a new kind of relation between triggers in each other, that is something to look out for.
But this should do it, we have it now prepared, and we can attach it to our Google Analytics, scroll trigger tag. Now this isn’t just a tag test tag, it’s not really a Google Analytics tag. I just wanted to test this and put this into a new group.
Let’s save this and refresh our page. Okay, so we’re here on our landing page, which is pretty long. I’m going to reload this. And now I’m going to start reading the text. And before I hit the 50% mark, the GTM time as you see down below here has already fired so the five seconds are up. And once we hit the 50% mark of our scroll trigger, we should have another event which is our GTM scroll depth so we had 50% now. And then our whole triggered group turn true, which is the new trigger type of trigger group. So a new event here in the data layer, and our scroll event, track tag fired.
So not on the individual events of the triggers had fired. But on our new GTM trigger group. Let’s make a negative test here. Let’s say I’m just a casual user coming to the landing page and scrolling down really fast, should be already at hundred percent now. Our scroll trigger fired, our timer only fired after five seconds. So you would have these combined, if both of them turn true. That’s important to understand.
Okay, obviously, I would play with the time if you really want to make this this work and also the scroll depth. But you could if you increase the time, filter out all those people who don’t take longer than 30 seconds to actually to read to the half or the bottom of the page.
So you can make your scroll trigger more accurate. We have another video on this at use a little bit different method but here you exactly the differences here because we can utilize two trigger types in order to combine them to one with our trigger group.
Another example that is common nowadays is to use cookie consent pop up. So we have one right here where you would allow cookies that would set a cookie and your browser we have here on the application in the developer tools, we have a new cookie that is now put into where is it?
Okay, there’s no cookie yet because I haven’t allowed it yet. But if I click allow cookies, we should have a new cookie here, which is our consent status allow. Now I’ve built simply a variable that is a first party cookie that reads this cookie. So I will be able to see in my developer tools here ahhh my in my variables that the allow cookie consent is denied or is true.
Right now it’s deny. If I reload it should be cookie consent status true. And then I could build a trigger of that which I have already on. So here’s allow, which I’ve already done. In the triggers is cookie consent status allow.
So this is a normal page view trigger with a cookie consent status contains allow. Now, if I combine this, for example, let’s say I want to only fire up my facebook pixel not on all pages, but on all pages only if the user has already allowed this cookie, then let’s go ahead and build this into a group. So we’ll be able to first of all, look at the cookie consent status. And then if this is true fire on our pages. Let’s try this out going on to the trigger and building a new group trigger for our page view and our cookie allow.
So this is what we’re going to combine, we’re going to have the page view trigger, and no not the page view trigger in a group. So it’s going to trigger groups, build a new page view trigger on all pages, and also attach our cookie consent allow right here. So these two conditions need to be true in order for it to fire. Let’s save this, go back to our facebook pixel.
And only fire this on our group. So I’m going to get rid of the all pages trigger, and instead use our group for our page view allow. Let’s save this and refresh. Go back to our page here. And the two conditions of the two triggers will be evaluated and then our trigger group should fire and our pixel is allowed. Now, let me get rid of this little cookie here. Cookie consent status allow, then Select. OK, let’s close this and go back to the page.
Now if I reload, or if I go to the page, normally, we should see that our page you fired, our GTM tag fired and so on. But our facebook pixel has not yet fire because we have not yet allowed this consent. Even if you go to the next page and the next page and the next page until the user actually clicks this allow cookie. So now it’s allowed and the next page view would then actually fire the facebook pixel.
So this is how, let’s see, Yes, here it does. Click the something. Okay, the trigger group is now facebook pixel has fired. So this is how you can utilize your consent cookie as well. And put this into a group in order for your tags that you want to have fired only if consent is given, you can do that.
They are obviously different other methods of doing this now. But this, this whole group trigger thing actually gives us more flexibility. In order to have different methods available. We could also put this into a variable, we could put this into the trigger itself, we could use tag sequencing. So many different forms of the firing the trigger and making sure that only when the consent status is given our tags would fire.
And there’s also a method of doing this on the tracking side itself. So in the tracking code itself, Facebook actually has a feature for that. We have a video on that as well on how to make use of that.
But if you have a special case where you want to utilize different trigger conditions, and you already have these triggers set up, I think this is a very helpful feature that makes our life a bit more flexible and easy in certain circumstances of all costs. All right, if you have any other use cases for this new trigger type of trigger groups, I’d love to hear from you. I just came up with some of these on the spot and wanted to present them and get this new video out there right away so you will be up to date. If you want to stay up to date with all and everything that we do here on this channel, then definitely hit that subscribe button right over there because we bring you new videos just like this one every week. Now my name is Julian till next time.