Hello there.
And welcome back to another video of measureschool.com teaching you the data-driven way of digital
marketing.
My name is Julian.
And today I'm here again with a quick tip on how you can make better use of Google Tag
Manager in combination with Google Analytics.
And this is really when you want to get more information apart from the tag assistant here
to view what information went out to the Google Analytics tracking code or to Google Analytics
itself.
And this is normally done with the GA debugger.
That's an extension for Chrome that you can activate.
And it will give you great information here inside of our developer console.
You can reach that by going to more tools, and then your developer console and under
the console log, you will be finding a lot of information of what information was actually
sent over to Google Analytics.
This will give you great information to debug if you have any kind of events firing and
you want to make sure that the right data is going over or if you find
out that some data is corrupted, you can look into this log and see what each page view
of each event is sending over to Google Analytics.
Really a great addition to debugging our toolset within Google Tag Manager and Google Analytics.
Now, there is this extension of that you can install.
But there's actually another trick to make this work every time you have the preview
and debug mode open.
And this is simply putting your Google Tag Manager, Google Analytics tag into a special
state.
And you can find it under the override settings here of our Google Analytics tag.
You can go to more settings.
Down below we have advanced configurations.
And here we have a feature called use debug version of Google Analytics.
If we set this to true, we should see
the same information in the console.
Now notice I don't have the GA debugger turned on right now and we get all this information.
If I obviously turned this to false, it will not show me this information.
Now the cool thing that you might have
have already seen is that will be able to utilize variables here to see whether it should
be turned true or false.
And we can utilize a variable that we need to activate first in our variable menu.
It's a built-in variable.
And this is simply the variable called debug mode.
It's under errors for whatever reason.
But this will simply determine whether our Google Tag Manager is in the debug mode or
not.
So if you reload this page
and look into our variables, we can look here in the debug mode.
And it's right now true.
Now if I would leave the debug mode, it would turn into false.
Now it's safe to assume everybody who has that debug mode open is a marketing manager
or a developer or somebody who is trying to debug something in Google Tag Manager.
And therefore at this stage, I always want to turn on our Google Analytics debug option
in the developer tools and we can simply do this by going in
into our tag.
And in that option that we just ticked we'll not use true every time but rather our debug
mode variable.
So every time Google Analytics is opened and firing a tag, we'll either be put into the
debug mode or into the normal state, depending if the preview and debug mode is actually
open.
So right now we see our data here.
So if I leave the preview and debug mode,
go back to our page and reload that.
And we see nothing in the console.
We see still that Google Analytics is being deployed.
But the debug mode was turned off because we don't have the actual preview and debug
mode from Google Tag Manager open.
Now obviously you don't want to do this for all your different tags.
Like if you have a Google Analytics event click trigger you want to utilize this option
in your Google Analytics settings variable.
So if you have a settings variable setup, I'm just going to inherit this from the settings
variable.
You can also go into your settings variable that you have set up.
I have one right here
and set the option in the more settings under the advanced settings in here use the debug
version.
Yes only if the debug mode is true.
Let's save this
and that's false.
If you go into the preview and debug mode and a Google Analytics tag fires we should
see in our JavaScript console the debug information from the Google Analytics tracking code.
Hey there, it's me again.
Thanks for checking out our Quick Tip video.
Was that helpful?
Did you understand something not quite?
Then I'd love to hear from you in the comments down below.
But if you liked it, then why not give us a thumbs up and subscribe to our channel right
over there, because we bring you new videos just like this one every week.
Now, my name is Julian til next time.