Marcio asks, “How do you create a trigger where GA 4 isn’t supposed to track something like a login page?”
Can’t see anything? Watch it on YouTube here.
Listen to the audio here:
- Got a question for You Ask, I’ll Answer? Submit it here!
- Subscribe to my weekly newsletter for more useful marketing tips.
- Find older episodes of You Ask, I Answer on my YouTube channel.
- Need help with your company’s data and analytics? Let me know!
- Join my free Slack group for marketers interested in analytics!
What follows is an AI-generated transcript. The transcript may contain errors and is not a substitute for watching the video.
Christopher Penn 0:13
In today’s episode Marcio asks, How do you create a trigger in Google Analytics 4, where you don’t want to track something like a login page when people visit a login page, you don’t want to track those things.
The short answer to this is that if there’s an event that is trackable of some kind, then you can simply configure within Tag Manager to say, Don’t fire, the Google Analytics, 4 tags.
When this these these conditions occur.
One of the big changes between Universal analytics or Google Analytics three, and Google Analytics 4 Is that Google Analytics 4 is highly reliant.
On Google Tag Manager.
Four, it’s the majority of its configuration.
So if you have a login page, and that login page creates an event that is visible inside the data layer, which is the metadata that is created, anytime we’re visiting a page, there’s a number of Chrome plugins like data Slayer, that you can see what’s in the data layer, the way I explained it a lot is it’s like a piece of plexiglass, you put over a page, and then you write notes and stuff on the plexiglass.
It’s doesn’t you can’t see it on the page.
But those extra notes there.
And when that happens, there’s now a trackable event in in Google Tag Manager and Google Tag Manager can then be set up to have a trigger looking for that event.
And that trigger can then be added to the tag.
So you have a Google Analytics 4 event tag like pageviews.
And you would say, as an exception, don’t fire this page view tag.
Anytime you see this login page trigger, right? Those triggers can be configured, again with any trackable activity.
So let’s say you have a page just like Christopher Penn calm slash login, and there’s a form on that page, you can say trigger that looks for a form submission, which is built into Tag Manager on the login page.
So that would be a trigger when when someone is on the login page and fills out this form, raise your hand Tag Manager, raise your hand, that’s what the triggers do.
And then on your tags, you would say, Google Tag Manager is looking for pages to tell Google Analytics 4, someone’s visiting.
And up here comes somebody.
And it looks and says, Hmm, there’s a trigger here, it says login page trigger.
And then in that tag, configuration, you say, don’t, don’t track this, if that login page trigger goes off.
So the things that are built in to tag match are things like click URLs, if somebody clicks on a certain link, by by name, fills out a form visits a page is a portion of a page clicks on some kind of thing that is detectable.
And even, you can even be restricted down to say, I want it to be a click only in with this certain ID if you’ve got IDs embedded into your web content.
So it’s very flexible outside of the box.
And then for anything else, where maybe you’ve built your own custom CRM, which we’ve had clients do.
And Tag Manager would listen for that custom event.
When he hears it triggers, raise his hand, and then tells Google Analytics 4.
Don’t track this.
So that’s the easiest way to to not track something in Google Analytics 4 using Google Tag Manager.
Christopher Penn 4:17
some debate about whether that’s the best way to handle that situation.
And the debate is this.
If you’ve tell Tag Manager don’t track this.
Google Analytics 4 will not have that data.
As opposed to saying, I want to see everything that everybody’s doing all the time on our website, but we want to create a custom dimension that tells me if a user is logged in, and then I on my on the reporting side, I can exclude any session that has that that custom dimension set.
So you’re not losing any data so that if for example, marketing wasn’t the only group of people Well, that was using Google Analytics, maybe a customer service was as well.
And customer services like, hey, we want to know, when people are logging in as user, we want to see how many people that is your kind of volume is, if that’s the case, then you’re going to want to create a different approach and the different approaches, same general thing, right, you have a, your, your trigger that says someone’s logged in.
But now you would modify your Google Analytics 4 tag to say, when this page you fires, and we have that logged in user event, send a custom dimension event to Who will I don’t look for and record that.
So that you know that the person is logged in.
That’s the more data complete way to handle this particular situation.
My personal opinion is that I would go the data complete route, so that you’re getting an accurate, you know, views, page views and stuff for everything, and then exclude on the reporting side rather than willfully excluding the data upfront, because again, you may have multiple departments in your company where people need information that marketing isn’t just marketing’s.
And frankly, sometimes you just want to see what people are doing.
And so having that information still be available, but appended with the correct custom dimensions or metrics.
Well, that to me is the better way to go.
So really good question.
It’s a relatively straightforward setup.
You’ve just got to be handy with Google Tag Manager because again, with Google Analytics 4, that is the preferred way, the strongly recommended way to do any kind of configuration for Google Analytics 4.
Thanks for asking.
You might also enjoy:
- It's Okay to Not Be Okay Right Now
- Best Practices for Public Speaking Pages
- The Basic Truth of Mental Health
- How to Measure the Marketing Impact of Public Speaking
- Almost Timely News, 17 October 2021: Content Creation Hacks, Vanity Metrics, NFTs
Want to read more like this from Christopher Penn? Get updates here:
Get your copy of AI For Marketers