- In this video, you're gonna learn how you can track
transaction with the enhanced e-commerce
tracking functionality of Google Analytics.
We will install all this
with the help of Google Tag Manager.
All and more coming up so let's plug in.
Hi there and welcome to another video of measureschool.com
where we teach you the data driven way of digital marketing.
My name is Julian and today we want to talk about
how you can track enhanced e-commerce
tracking transactions within Google Analytics
with the help of Google Tag Manager.
And we have done this before in another video
because there are actually two distinct methods
of capturing transactions.
One is the classic e-commerce tracking functionality
within Google Analytics
and the second one would be the enhanced
e-commerce tracking functionality within Google Analytics.
Now I won't be able to explain all of the
different integrations you would need to do
to get a complete understanding of
enhanced e-commerce tracking,
but if you're interested in a
more comprehensive course about this,
I'm actually thinking about building one
just for this purpose.
Please signalize your interest at
measureshool.com/enhancedecommercetrackingcourse.
But today we want to talk about just
the transaction tracking part of the
enhanced e-commerce tracking and this is actually
what I would recommend to install
if you are thinking about installing
e-commerce tracking on your website.
So instead of the classic e-commerce tracking,
I would recommend to start out with the
enhanced e-commerce tracking,
although you might not install the whole
enhanced e-commerce tracking functionality.
So let's get started.
First of all, we would need to prepare
our Google Analytics account to receive
this enhanced e-commerce tracking data.
How would we do this?
We go over to Google Analytics
and in the admin section under our view settings,
you'll find e-commerce settings
and we need to enable e-commerce,
but also enhanced e-commerce,
which we can do in the next step.
We can also put in our check out labeling,
which we will ignore in this video
because we are only installing the transaction
tracking of the enhanced e-commerce capabilities.
Let's submit this and Google Analytics is now
ready to receive our data.
Alright, on our demo shop,
we have Google Analytics installed and Google Tag Manager.
Now we want to add to this our transaction tracking.
There need to be two things in place in order to do this.
One is a correct data layer,
and the second are the right tags
that forward the information on to Google Analytics.
So let's talk about the data layer for a second.
Data layer would need to be installed
on the final checkout page,
where the data of the purchased items are available.
So in our case, that would be the thank you page.
So let's go through a checkout process really quickly.
And we get to the checkout page
where we will have the data available
to send on to Google Analytics
such as the product that was bought,
the total amount that was paid,
the order number and so on and so on.
Now on this page we would need to install a code
that carries the information
and if you do this with Google Tag Manager
you would install it into our data layer,
which is a central repository for all our data
hidden from the user, but visible to Google Tag Manager.
And what we need to install exactly is documented
in the enhanced e-commerce tracking help section
where we have our developer guide
on how to install enhanced e-commerce tracking.
Now as I said, there are many different
data layers to implement to have the full functionality
of the enhanced e-commerce tracking available.
We are only going to talk about the transaction tracking,
which is the purchase action within the
enhanced e-commerce tracking.
So let's click on this and we actually get
the data layer or the data layer push
that needs to be sent out on our thank you page
and values need to be dynamically replaced,
such as the ID would need to be replaced
with our order number,
the revenue with our total here, and so on and so on.
Now installing this can be done in several ways.
You could do it right through
the backend of your system by editing the template files
and replacing dynamically the values of those fields
with the actual value of the transaction.
You could also install a plugin
that provides that data by default,
or send this documentation over
to your developer to have him implement this data layer.
But be aware you can't just copy it
and paste it into your template
because then the product and the online store
and all these values would stay the same.
You need to have a dynamic replacement of these values.
Luckily, we are on WordPress and WooCommerce here
and there's a very good plugin by Thomas Geiger,
which is the DuracellTomi Google Tag Manager plugin,
which I have installed on my WordPress website
and it gives you a lot of functionality on
the implementation of Google Tag Manager
and fortunately also under the integrations
and WooCommerce functionality,
We can turn on the track enhanced e-commerce data,
which will transfer the data
into our data layer automatically.
So let's check out what is in the data layer.
Let's go over to Google Tag Manager
and actually go into the preview and debug mode,
and go through a transaction again.
We get to the thank you page
and we can look with our preview and debug mode
into the data layer and the data that is available.
Now we see here this is a big object
that was pushed into the data layer
with the key gtm4wp.orderCompleted
and we have an e-commerce object available
with the data that we need for enhanced e-commerce tracking.
This is modeled after what we see here
in the data layer push of the official integration.
Now if you see any problems here,
that's something that happens quite often,
you would need to make sure that it's modeled after
the official documentation here
in order for our enhanced e-commerce tracking to work.
Now all we need to do is send the data
on to Google Analytics.
How would we do that?
Let's go over to Google Tag Manager and create a new tag.
This will be a Google Analytics Tag,
which will send an event with our
enhanced e-commerce tracking data of the transaction over.
Let's go with Google Analytics here
and we are going with Universal Analytics.
I have a tracking ID prepared in our variables.
If you don't know how to install this piece
for the Google Analytics ID,
my video will pop up
and then we choose the track type of event.
Now sending data over for enhanced e-commerce tracking
will not require you to send over a transaction track type.
You can send it either with an event or a pageview,
but this data needs a carrier.
In our case, we already have the pageview tracking installed
so I don't want to duplicate
the pageview on the thank you page.
I want to send an event to transport
the data to Google Analytics.
So let's go with event here
and then we can fill out anything that we want,
but please be sure to fill out the category and action.
I usually call this my enhanced e-commerce tracking data
and then the action would be a purchase.
I will set the non-interaction hit to true
because I don't want this tag to effect my bounce rate
and then under the more settings,
I have e-commerce tracking features available
and I can enable the enhanced e-commerce tracking features.
Now you can choose to use a variable,
but in our case we will use the data layer
because the data is available here.
Let's continue and fire this tag
upon a new trigger and what will this trigger be like?
Let's go back.
We see our data here and we want to be able
to trigger our tag when that data is available
and the actual checkpoint for this is in event
and we have an event available here,
which is gtm4wp.orderCompleted.
Let's copy that and go back to Google Tag Manager
and choose custom event and as the event name,
we simply put our gtm4wp.orderCompleted.
We'll call this trigger the transaction trigger
and we don't need to add in any filters
because this is pretty unique to this website.
Let's create this trigger
and create this tag.
Refresh
and go through another conversion again.
Here we go and we see that
upon our first gtm4wp.order
our GA Event EE Transaction
has fired correctly.
Now we can look into that.
Unfortunately, we don't see any revealing
information about our sent enhanced e-commerce tracking data
and unfortunately we are also not able to see any sign
of our enhanced e-commerce tracking
in the real time reporting,
but we would be able to see that an event came through
and be sure that our enhanced
e-commerce tracking data was sent.
It takes a while to populate then in our conversion reports.
On the e-commerce, you would have your
enhanced e-commerce tracking reports
available where you also have your sales performance report
where your transactions should be showing up
within the next half hour to 48 hours.
Please be patient for this.
The other reports will not be filled by default.
You will need to install the full
enhanced e-commerce tracking functionality.
At the end, don't forget to publish your version
so it goes out to all your users.
So this was a quick overview on how to install
enhanced e-commerce transaction tracking
with the help of Google Tag Manager.
If you are interested in building out
the full enhanced e-commerce tracking on your website,
please signalize your interest at
measureschool.com/enhancedecommercetrackingcourse.
And that's already it with this
week's video of measureschool.com.
I hope you enjoyed it
and if you liked this video,
please subscribe to this channel
so we can bring you more videos every week.
My name is Julian.
Until next time.