How to Track Transactions with Google Analytics Enhanced Ecommerce Functionality
Articles,  Blog

How to Track Transactions with Google Analytics Enhanced Ecommerce Functionality


– 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.

72 Comments

  • Martin Tang

    What about setting up tracking in WHMCS? Anyone have idea how to write the 'code'? Or where I should start first?

  • Christoph Günther

    Hey Julian,

    first of all a big THANK YOU to you for sharing your knowledge and for all the great content you provide!

    I have a question regarding your method of setting up enhanced ecommerce and the way Thomas from the wordpress plugin is describing it. Why do you choose this way and not the way Thomas is doing it, where I set up all tracker once? Here is the link to the docu from Thomas: https://duracelltomi.com/google-tag-manager-for-wordpress/how-to-articles/how-to-setup-enhanced-ecommerce-tracking-v1-3

    Thank you and Regards
    Christoph

  • Nojin Park

    JulianI Thanks for the great content. Your channel is a gold mine for GA nerd like me :D. wanted to express my interest in learning full functionality of enhanced ecommerce tracking at the URL you said in the video but it brings me to the log in page every time. (I'm already logged in)
    Where can I learn?

  • Rahul Mahajan

    Can we not write custom HTML, which will populate dataLayer in GTM custom HTML Tag, which will be fired on some page event? Basically, can we not skip modifying HTML? Modifying HTML, is this not against basic principal of doing such work without need of UI build team?

  • Punit Kansara

    Hi Julian, I have installed the same plugin but once we place the order I do not see any event named "gtm4wp.orderCompleted" in data layer, nor the GA shows any transaction data. Can you pls help.

  • yyyy

    Julian, so we have to modify the general Google Analytics tag (by enabling "Enhanced Ecommerce" and "data layer" options) AND create a new Google Analytics tag (as you described on this video). Right?

  • Tinka Marketing Agencia

    Hy julian i've seen all your videos, learned alot about GTM with analytics, I got an ecommerce runing with lots of things, but how do I track a transaction made, that ecommerce doesn't have a thank you page. I cant set a goal without the link. Any help in advance would be nice.

  • Артём Сивак

    Hello, in this case you using event gtm4wp, but how to name my own event? I`m placing it on thank you page and my datalayer appears like: "Current values of the Data Layer" and "Message"

  • Ahmed Mobin

    https://youtu.be/R0wTkc4e7DE?t=456
    You added {{GoogleAnalyticsId}} here but you did not described how to add it in dropdown. Can you share your video on it please.

  • Octavian Zagarin

    Hi. Great video and your energy is very good. I need to be able to measure ROI for email marketing campaigns. Shall I go with Enhanced e-commerce settings? Do you have a guide for this scenario or can you point out the steps I need to go through? There is info available out there but pretty scattered and confusing… Thanks

  • shaishav garg

    Hi Julian! First of all, this is the best video on ecommerce integration with GA. I was wondering what would be difference if we used track type as Transaction rather than Event. Will that work the same way? Will that also enable Enhance Ecommerce feature in GA?

  • Lucas Castells

    Hello, I like your videos a lot, helps me on my implementations and marketing campaigns. I still have a doubt and its about this same plug in for Magento.
    On a previous video you were speaking about the Slirx plug in but I can't find it any more. Instead I find this one from Udevix: https://www.magentocommerce.com/magento-connect/google-tag-manager-integration-gtm.html (which costs $35 USD).

    The most important thing is to have the dataLayer enabled and it seems this plug in does it. What's your opinion? And, is there any good free one?

    Regards

  • Mustafa Tariq

    Hello,

    I want to track ecommerce tracking without GTM. NOT ENHANCED just Ecommerce Tracking. I am trying to enabling it from Admin>View>Ecommerce Settings but here I am unable to turn it "ON". I am not a developer, is their a specific video you did for this.

    Please advice.

  • Jorge Mena

    Hi Julian,
    Thanks for the video it helped me a lot! just one question when you have more than one checkout step, can you add those as different checkout steps in the dataLayer? I mean something like: checkout2, checkout3, etc. Then track it in the Checkout Funnel. Thanks.

  • Lamb Digital

    followed the steps until the 6 minute mark. when i enter into debug mode I get the message "there are no tags in the container", so seems like a missed a step somewhere. can you provide any guidance?

  • willie williams

    I can't quite understand what you're saying about setting up a variable….is it possible for you to note what you said….

  • Michael Ingram

    great video – one thing I am having a problem with is how to do this when an iFrame is involved. Do you know of any resources or docs that I can take a look at?

  • Tycoon Mafia

    Hi Julian
    I love your videos but I am have trouble getting the data layer from my big commerce site. Any suggestions or do you have a video on how to do so? I have use the test mode and actually bought an item from my store and I dont see the data layer you have.

  • john carol

    HI is it ok to have analytics code implemented with the normal code implementation & implementing it via tag manager? will it count twice?

  • Meg Ramsay

    Can you have Ecommerce Tracking AND Enhanced eCommerce Tracking at the same time? Or will that just confuse GA? Is that even useful? Do you have to chose between the two?

  • Achieve Health

    Great Video, love what you do. What do you do if you don't have word press? I have squarespace, and the plugins it looks like doesn't really exist.

  • Aaron Marroquin

    I've been watching your videos for a while, more than a year to be more exact, and words cannot explain how grateful I am for coming across your channel. I used to get so frustrated with WordPress and all these ecomm concepts, but the more and more I learn and practice, the easier it gets. I started my humble journey as a graphic designer, I had to learn HTML, CSS and now JS, but now I make a living making websites and managing FB and AdWords campaigns for a living, and of course a logo comes my way once in a while. Dude, your the reason why the internet is amazing! Thanks a lot!

  • Paul Spikmans

    Hi Julian,
    What Chrome plugin do you use to check if analytics and tag manager is installed as you mention in your video at 2.43?
    Thanks!

  • Beautiful Hot Mess

    Can I use this if I have an store within Ebay??? I was directed to your videos by a friend but Im not sure if its applicable to Ebay..thanks!

  • aashay shah

    Hi Julian, I have implemented the EE just as you mentioned in this video with a plugin, my only problem is that the details do not populate in my GA. I have checked the dataLayer and even the push in the source. It fires perfectly as well as tracks in my real-time events. Why is the GA ecommerce section not populating?

  • Deloitte Katia De Palma

    All the parameters inside the Purchase object are mandatory? What happens if we are using ID and affiliation? thanks!

  • Gian Paolo Manfredini

    Great Video indeed, but .. The cheque payment is very easy to manage. I think that you have to cover or explain that via Paypal (90% of transaction) is quite different.

  • Sandro Zimmermann

    Hallo Julian, ich habe mir ne ganze Menge Tutorial von Dir angeschaut, darauf aber keine Antwort gefunden: Wenn ich einen Tag im Tag Manager habe der Eventgebunden eine Conversion misst via GA und angehaktem Enhanced eCommerce – kommt sich dann dieser Tag nicht in die Quere mit dem Tag GA / alle Seiten und angehaktem Enhanced eCommerce? Wenn ich z.B. auf die Checkout Success Seite komme dann feuert ja der eventgebundene Tag und holt seine Daten aus dem Data Layer, gleichzeitig feuert dann dann ja aber auch der Tag Google Analytics / Alle Seiten und holt Daten aus dem Data Layer… Erkennt das GA oder muss ich bei letzterem das Enhanced eCommercer explizit ausschalten? Danke für die Info!

  • Wilhelm Otto Dusseldorf

    The only problem I'm having is… I don't know how to write a dynamic dataLayer script. It would be convenient to copy and paste the script on the Google Developers page, but how do I make it sync with BigCommerce and populate dynamic data? Also, do I add the script to the <head> of every page (base.html in BigCommerce), or only on the transaction complete page? I'm in a small rut because e-commerce tracking was working via Google Analytics but stopped accruing data after I installed Google Tag Manager.

  • Matteo Carini

    hi Julian thanks for your really usefuls videos; I hope you can help me out with these two questions:
    1. why do you have to go through the whole check-out process instead of simply refreshing the page?
    2. is it ok if i trigger the event upon "thank-you page" view instead of a custom event?

    thank you in advance

  • Mike Mags

    Hi Julian, I just have one issue. I do not have the option to access "more settings." around the timestamp of 8:47. Any reason why this would be?

  • Juan Urdaneta

    Julian could you tell me which is the Plugin that you use or at least tell me which is the developer of the plugin that you explain during the video of Tag Manager for WordPress.

  • brijesh dobariya

    hey Measureschool,
    have any tool for WordPress Easy digital download to e-commerce enhance tracking tools?
    here you suggested tools is DuracellTomi's Google Tag Manager. it is work for Woo-Commerce.
    but I use Easy Digital download which is a plugin for WordPress.

  • KidzLover

    Do I need to add those chrome extensions and tag maanger for this, or I can just install google analytics for woocommerce ?

  • John Paulin

    hey Julian first of all I want to thank you for your videos and I would like to ask how to prevent duplicate values in enhanced e-commerce tracking in analytics? Right now, it is sending data to analytics every page load of thank you page and perhaps the user is saving the thank you page and open it more than once. So how to go about avoiding multiple values for the same transaction in enhanced ecommerce tracking?

  • Palash Sharma

    Hi Julian, I have a ecommerce website but we dont take payments online. We take the payments in bitcoins or we take payments from western union. In this case how should I put my ecomm conversion tracking so that it tracks my conversions ?

  • Imre Amery Fülöp Phil

    Julian, I'm experiencing sg very wierd in my Analytics ecommerce data. It shows product transactions with revenue value 0.00 on every single day. Any clue I might look at, sg I missed?

  • Thomas Cilius

    Hi Julian, is it time for an update to the enhanced ecommerce tracking? 🙂 The panels looks very different these days.

  • Siu Fung Bevis Lau

    Hi Julian, i have everything set up and a tag fire with the transaction value, but my GA didnt receive any transaction data. I noticed that the tutorial you did with the GTM tag set up ,invovle a setting to "Enable Enhanced Ecommerce Feature" .But i didnt see that for my own GTM. I think thats the reason why mine is not working. As i saw on the tag information, it said " Enable Ecommerce: False " . Is there any way to solve it.

  • Mediaplus Digital

    At 7:44, {{GoogleAnalyticsID}} Im still unsure how you got there. Do I refer to this video: https://www.youtube.com/watch?v=28d60ejfk3s

  • Local Mcc

    What is the best way to complete test transactions on a client website? Without actually completing purchases. Not sure if I missed that part or not. Thanks!

  • Jayjay F

    In this video I don’t think you make it clear that if you have more than one product on the purchase page then how does the data layer format change to incorporate those multiple products? Would u need to make the code dynamic or does google tag manager sort the data layer out for you ?

  • Jorick Sikkes

    Hi, I've set up enhanced ecommerce using this video. However In the purchase tag I want to give the value of a purchase to the event, so that I can then make it into a conversion that I can send to Google Ads. How do I do this?

  • Nicola de Liso

    Hi Julian, thanks for the guide!! Do you know of any prestashop plugin that help me transfer the purchase information to the data layer (as in the woocommerce version)?

  • Sravan Muppalla

    Thanks, Julian for your videos. I Have one dought how to set up data layer in background and can you share the syntax for E-commerce Tracking and Enhanced E-commerce Tracking

  • jamesfarrow85

    I have set this up in the same way but am finding that my transactions are sometimes being counted twice causing inflated revenue and obviously transactions. Are you able to help fix by stopping this to happen? I have tried setting my tag to fire once per page in the hope the cookie that is supposed to stop it firing again fixes the issue but still seems to be happening. Any help is greatly received. Thanks for the great content also, been watching loads of it so thanks

  • stripes

    Isn't the wordpress plugin doing this already after you checked the ecommerce tracking? Why do you need to implement a tag? Seems like the plugin tracks events from the site and sends them to google analytics.
    Can you please why you would not be able to do this without a tag.

  • We WP

    Thank you for this great video Julian, But what if I am using different CMS where I can't the find this plugin, for ex: on Shopify?

    Don't tell me to contact a Developer because I like to do everything by myself

  • Gaurav Tripathi

    i am facing a problem in setting up revenue tracking in google analytics can you please help me out i have taken help from google support team also but nothing solved please help me

  • Adrian Sandu

    I just can't make the purchase tag to work. I mean in the debugger it says it is fired and the data layer with the transaction and products looks good but even after 48 hours in analytics e-commerce section everything is at 0 empty.

Leave a Reply

Your email address will not be published. Required fields are marked *