Welcome back to our GTM for beginners training. This is lesson number four.
If you missed any lessons, you can go back anytime. But in this lesson,
we're actually going to take our tagline that we have implemented last week
into action and go through a Tag deployment process. That's our last step.
We want to deploy Tags with Google Tag Manager, right? Well all the more,
coming up!
Hey there Measure Geeks, Julian here.
Back with the fourth lesson of our GTM for beginner series and we have
already installed Google Tag Manager. We haven't set up an attack plan.
And now we want to actually deploy a Tag via Google Tag Manager and migrate our
tracking that we have already on the website over to Google Tag Manager.
So we will step today through the whole Tag deployment process.
And hopefully, you will learn a lot.
You can actually test your knowledge at measureschool.com/lesson4,
where we have a little bit of a quiz prepared for you.
Now we've got lots to cover. So let's dive in. All right.
If we go over here to our Google Tag Manager account,
we have already our first version deployed,
but no Tags are actually inside of this container.
What do we want to install today? Well, that should be already in your Tag plan.
I have come up with an example here of a Google Analytics Page View Tag that we
want to deploy via Google Tag Manager. This should be our GA for base tracking,
and I have some notes here for the configuration. So where did I get this from?
Well, I already have Google Analytics 4 installed on the website.
So if I go to view page source, I should see the code. Yes,
here it is the G-Tech code right here.
And we done a little bit of an audit of our account in the last lesson.
Now that I know that Google Analytics 4 is in here,
I actually want to migrate this over.
So I Mark this here as migration to GTM.
So what are we doing next? Well,
this is the configurations that we already need.
This is just the little code here that we would need as the configuration.
If you don't have Google Analytics 4 yet, and you want to install it,
then head over to analytics.google.com and open up a new account and
a GA 4 property. And then you will find your GA ID,
your measurement ID, and a setup assistant.
And here we have Tag installation.
Then we have our data streams and you would need to set up a web data stream.
And here we get our measurement ID.
This is the ID that we want to send over in our code. All right,
let's start out with the first step of our Tag deployment process. Well,
we actually went through the first step already. We prepare our implementation.
We planned that out. Now we actually going to implement it.
This is the second step. So inside of Google Tag Manager,
we can deploy our new tracking Tag under the Tag options,
or just go here on the add new Tag.
The first thing that I would urge you to fill out is the name. Now,
remember if you deploy a lot of Tags, then this can get quite messy.
So I would recommend that you use a naming convention to keep
it consistent. So my naming convention,
I already have this in here is to say which tool it's from,
what it actually does. So it deploys Patriot and configuration,
and it will be the scope. So in our case,
it would be deployed on all pages for some people that might be a little bit
excessive, but in my case,
I always run really well with this because I know what the Tag does just by
looking at the name. The next step would be the Tag configuration.
When you click on this field,
it gives you a lot of different tools that you can choose from these attack
templates that let you deploy different tracking with Google Tag Manager.
We obviously want to go with Google Analytics 4 this is our Google Analytics 4
configuration tab. This is the base Tag that you need to install.
And here you see this kind of like a little form,
so nothing with coding or so like we saw it in our source here.
It is actually just a form and you need to fill out the right fields.
In our case, it's actually pretty easy.
We just need to fill out this measurement ID where we need to put an hour
measurement ID that we got from Google analytics.
So we have this already prepared here.
Let's put this over and we also want to send a Patriot event
with this tech. Next step would be to simply choose our trigger.
Now triggers are the conditions under which you want to deploy your Tag.
We don't have any special configurations here.
We just want to deploy this on all pages that are accessible to the user.
You can go with the all pages trigger,
which will deploy on any site where Google Tag Manager is installed,
or our Google Tag Manager container is installed.
Let's save this and now we can try it out by going into the preview mode.
So you click here on the preview button and you choose your page,
click start, and then your preview mode will connect to your website.
We'll open it up in a new tab,
and then you see this little message debugger connected,
and you should be able to now see in the Tag tab that just opened
that our Google Analytics 4 Page View Tag has fired correctly
on our page.
So we see of the Tag assistant that everything is deployed fine on our
page itself. We should be sending data over to Google Analytics.
So inside of Google Analytics, we have it handy tool, uh,
which is called the new debug mode. This is the debug view.
And here we,
I see that our Page View is now deployed on our page and it's
apparently sending data over. Let me just test this again.
I'm going to click on this new and then see if we get
anything in right now that might take a while because there's also a
batching functionality within Google Analytics 4,
so we might not see it right away, but hopefully in a second, and here we go,
we get user engagement, but here are our page views.
And now we see that there are two pages being sent over. Why is that? Well,
there is a checking code attack installed in the
view page source here, and also it's supplying through Google Tag Manager.
So it's totally natural. And we would see two pages of,
we know now that our Google Analytics code is the plot through Google Tag
Manager. And therefore we can get rid of this tracking script.
Now you should be doing this kind of simultaneously,
but what I'm going to do right now is now that we have verified our
Tag Deployment, we go over to Google Tag Manager,
and now we're going to submit this as a version to all our users.
So it goes live onto our website. So I'm clicking here, submit,
and we can give our version of name.
I would always give her the script of what you have changed in there.
And then you can publish this and then.
It should go out now to all our users.
So it's permanently installed on our website, but as I mentioned,
we still have this coat here on the page. So at this point,
now that's being deployed through Google Tag Manager,
and we know that it's working correctly.
We can actually go in and turn off the plugin that deploys this,
or get rid of the code inside of our theme files.
So that's what I'm going to do here. Instead of our theme files,
I have the global Sci-Tech.
Here and
let's delete that update our site
and now.
On our page. And I'm going to close the Tag assistant actually here.
So here we see that Google Tag Manager has a plot and our global Sci-Tech
through Google Tag Manager. So that's not, shouldn't be in the page anymore.
Let me just check here to make sure. Yep.
We just have Google Tag Manager installed,
or we can see only the Google Tag Manager and global Sci-Tech is deployed
through GTM.
Let's do another test here and actually go into our analytics and actually this
debug view,
we cannot use it because it only functions if we have the preview mode enabled
or a connection to the Tag assistant.
So what I'm going to do right here is actually going over to the real time
reporting. And here we go, I'm in Berlin right now.
We have one user from Berlin that should be me and our page views are counted.
So we have Google Analytics 4 correctly,
installed on our website is now deployed to all our users.
And we have stepped through the whole Tag implementation process from planning
out our implementation to implementing it via Google Tag Manager,
doing a little bit of Q&A, and then deploying it to all our users.
Now we also removed our hard-coded implementation of the
G-Tech right here.
And that's something you would need to do if you actually migrate.
If you deploy completely from scratch,
then you don't have to delete any kind codes,
but it would be necessary if you are actually migrating over to Google Tag
Manager.
So this is now active and we can continue with the next tax in
our next lesson. So there you have it.
We went through a full Tag deployment process with the help of Google Tag
Manager. We migrated our Google Analytics 4 code into Google Tag Manager,
and now it is deployed through Tag Manager itself.
If this all was clear and you were able to follow along.
Then you should be able to answer our questions at measureschool.com/lesson4,
where we have a little bit of a quiz prepared for you. In the next lesson,
we're actually going to dive deeper into Google Tag Manager and utilize event
tracking to track interactions on our pitch. So I hope to see you over there.
Check out this video over there if it's already available.
And we also have a playlist with all of the videos of this video series right
over here. Now, my name is Julian. Till next time.