Alright, by now you should be pretty familiar with Google Tag Manager.
You already set up multiple tags and also your triggers.
But now we want to actually dive a little
bit deeper into a very important topic within Google Tag Manager.
Imagine a case that you have an ecommerce
store, like we have here with our demo shop, and the user buys something.
Now, sometimes you don't only want to let
your tools know that a conversion has happened, purchase has happened,
but actually what the user has bought, and some details around that as well.
So that information about the purchase of the user can be transferred
with Google Tag Manager over to your tools like Google Ads.
But before we can do that, we need to learn a little bit more about
some concepts like data layers and variables.
That's what we're going to do right now.
So here I'm in Google tag manager already.
We have all our tags already here set up.
Let's go and actually take a look at the case.
So I'm going to preview and open up our page again.
And this time I'm going to buy something.
So let's check out here and we get to the order received page.
And here we have a total amount of what we have bought on our demo shop.
And this is the amount that I want to send
over to, for example, an ad system like Google Ads.
Why is this useful? Well, if you let Google Ads know not only
that somebody has purchased, but also the amount of what they have
purchased, you can, for example, calculate the ROI, the return on investment.
So how much did you spend on your ads and what was the return in the end,
that this ad made you crucial information for optimization.
And that's why it's quite common in conversion tracking.
Now the question becomes,
how can we transfer this total amount here over to Google Ads?
For that, we need to pull in this number into Google Tag Manager.
There are several methods to do this,
but the recommended way is something called the data layer.
The data layer is a layer of sorts that lives on the website.
You can't see it really because it's not visible to the user.
But in Google Tag Manager, you can view it.
So inside of your tag assistant,
you can go over here and we just need to find the right event.
Here is the purchase event.
We can find here a tab called Data Layer.
And in this tab we have a lot
of information about the purchase of the user on our website.
Now, chances are that by default,
you don't have such a data layer on your website.
There are three ways again to install a data layer.
Number one would be to do it manually.
For that, you need to know a little bit of programming, because you would need
to go into the code of your website and actually put it in and make it dynamic.
The second part would be to give it over to a developer.
If you are not familiar with your website, then that's the way to go.
And third, you would install a plug
in and see if there's a plug in available that can provide you a data layer.
In our case we have a great plugin for WordPress called Google Tag Manager
for WordPress that provides us this data layer.
So if you are running on a WooCommerce
store you can utilize this plug in as well.
But what if you don't have a plugin available?
Well then you need to install these codes manually or with the help of a developer.
And you can find the information
on the Google Help page here on the different data layers that are available.
For example for ecommerce sites.
So in our case we would have here a data layer push that needs to happen when
the user has bought and this information would be sent over.
Now this information is not just copy
pasted into your theme files for example, you actually would need to make a dynamic.
So the value for example changes or
the tax and the shipping based on what the user has bought on your website.
But I'd say a developer,
if you send them over the documentation, they should know what to do and how
to actually create this on your website so it works for your case.
And then you have all the information
available to be sent over to Google Tag Manager.
So as you can see, we have this plugin installed,
we have a purchase event that's happening here inside of our Tag Assistant and we
have all the information here in the data layer as well.
So that's step number one.
You need to have a data layer set up on your thank you page.
Now let's take a look at what we actually
would need in order to connect something like a Google Ads tag.
So inside of Google Tag Manager,
I'm going to go over to our tags and click on New here and then Tag configuration
and then just go to the Google Ads conversion tracking.
That's what we want to do. We need to have a conversion ID.
That's something we'll get from Google Ads in just a second conversion label.
But then here we have a conversion value
and possibly also the transaction ID and the currency code.
So for the conversion value we need
to pull that in somehow and that's something that you type in manually
because then it would always stay the same.
You actually would utilize something called variables.
And variables are placeholders that we have already used in triggers.
So right now we have click Trigger, available page paths and so on,
but not our revenue that we have generated on the thank you page.
And this is where data layer variables come in.
So we would create a new data layer variable.
So we can click here on plus.
And there are different ways to pull in information from different sources.
We want to pull data from our Data Layer.
For that, we will need to know
the Data Variable name, the name that holds our value.
For that, we can go back to the checkout page here.
And there's a great extension that you can
install on your Chrome browser called Data Layer Checker.
And the Data Layer Checker will let us
know all of the different events that happened on our site.
And if you click on Purchase,
where we have our information in here, we have, for example, if we scroll down,
we have our value right here, ecommerce.value.
We can copy this key.
So you don't really have to know how this is put together.
And we paste it in here.
ecommerce.value should give us our value.
Now, as a name, you can choose anything
you want to keep it clean and simple.
I type the variable and type in here.
So Data Layer Variable.
And we are going to get our revenue so we know what it is.
We can save that, and then it will be implemented with these
two curly brackets inside of our tag as the Conversion value.
The same thing for transaction ID.
Let's go over here, click on New and utilize our Data Layer Variable.
What do we choose?
Well, with the extension,
it's pretty easy to go into our purchase, and we want to get our Transaction ID.
So that's right here we copy the key
and again put that into our Data Layer Variable name.
So here we go. Data layer variable for our transaction.
ID.
Save this and it's now implemented in our template.
Could also put in the currency code,
but that will not change, at least on my Store.
So I would just go with USD right here.
Now, where do we get the conversion ID
and conversion label from?
That's from your tool directly.
So inside of Google Ads.
Go over here under Tools and Settings Measurement.
And then we have here conversions that will bring you to this screen.
And then if you create a new
Conversion Action, you would have your website and then we can enter our domain.
We actually want to provision this
manually, so we'll go with a Conversion Action manually.
And here we go.
We choose our category of our goals.
So this is a purchase.
We can give it a name like Conversion
and a Purchase, and then it comes to this value option.
So use the same value for each Conversion.
No, we don't want to use that.
We want to use different values for each Conversion.
And that's what we're sending over with the code enter a default value.
So if you have a default value here, we can put that in.
In our case, it would be US.
Dollars.
And then we'll go ahead and choose how
often we want to count this, every or one time.
Every time is fine.
We leave these options the same,
but you can change them around depending on your preference.
I will click on Done Here and Save and continue.
Now, the next step is to install your tracking code.
Now, this is the code that you would normally deploy on your website itself,
but we are actually using Google Tag Manager so we can go to this
option and it will give us our conversion ID.
So we're going to copy that and put
that into our template, as well as the conversion label here.
And we should be able to now go on and look at the trigger options.
So in the trigger, we'll click on here,
and we have our different triggers that we have already created for our case.
We need to create a new special trigger.
And this special trigger needs to be based
on when the data is available in the data layer itself.
So here we have our purchase event,
and I'm going to go ahead and click on plus, and then trigger configurations.
We won't choose one of these page view triggers, but actually a custom event.
And here is where we can put in our purchase, right?
And let's give this a name.
So this is a custom for our purchase.
Let's save this.
And we have everything filled out.
Let's give our Google Ads tag a proper name.
So we found a conversion tracking tag on our purchase event, and let's save this.
And now we have that in here.
You already know the next steps.
We now need to test this all out.
So let's go into preview and continue.
And let's buy something.
Again, we get to the auto receive page.
We have here an order number and so on.
First of all, let's take a look at our
variables that we have pulled from the data layer.
So on this purchase event, we have a data layer that gets deployed
that then pulls in specific data from our data layer variables.
So, data layer variable revenue.
And here's the transaction ID that is
pulled into Google Tag Manager, which then goes into our tags.
And this is our Google Ads conversion purchase.
And we have here a transaction ID variable.
So these gray areas are the variables.
If I go into values, we'll now change this around and it's a placeholder in the end,
with our transaction ID, we should also see our conversion value right here.
So this is all now sent over to Google Ads, and it seems to work just fine.
Now, in Google Ads, it's a bit tricky to see that data until it shows up.
Will take a little while.
You should see that there's no recent conversions right here,
but when we send data over, should be able to see something in a few hours.
If you click on Purchase,
we can also go to Web Pages and see if there's any kind of activity there.
The real ultimate test with Google Ads is unfortunately you would actually click
on your own ad, go to the website, and then go through a purchase cycle
in order for the data to be confirmed inside of Google Ads,
because Google Ads only will attribute data from a prior ad click.
So if there was a prior ad click to one
of your Google Ads, then it will show up in your reports as a conversion.
You can obviously also utilize some other tools.
We have here the tag assistant.
Unfortunately, that wasn't enabled.
So let me just go through a quick another order here.
And then when we get to the auto receive page again here on our Tag assistant,
we should see conversion Ads tracking as well.
And we have a conversion value as well as
the currency and the label and the conversion ID.
So I trust that we have created this correctly.
Obviously, we would need to confirm with Google Ads later on when you actually
take this live to website, which is our last step here, really,
to go over to Google Tag Manager and submit this as a version.
We have added in this version of Google Ads conversion tracking.
All right, so as you can see, there's more to Google Tag Manager.
There's something called the data layer
that then transfers data over into variables.
You can use these variables,
these placeholders in your tags as well, and then have a dynamic tag deployment
with Google Tag Manager, which then in turn powers more data inside
of your tools like Google Ads, for ROI analysis, for example.
If this video helps you out in any kind of way, I'd love for you to hit
that thumbs up button so we can share it to more people out there.
And I'll see you in the next lesson where we're going to talk about a few more
things on how learn Google Tag Manager right over there now.
My name is Julian. See you in the next one.