Google Tag Manager eCommerce Tracking installation explained
Articles,  Blog

Google Tag Manager eCommerce Tracking installation explained


– [Voiceover] Hello and welcome to another video of GTM
Training.com with me Julian and today I want to talk with you about the Google analytics
e-commerce tracking feature and how to install this
with Google Tag Manager. Before we get started, as always, these little videos are brought to you by my udemy course on Google Tag Manager. You can find out more about
this at gtmtraining.com/youtube. In Google analytics
you have the capability to track e-commerce conversions and there’s a special feature for it called e-commerce tracking. And actually two types
of it out there right now the first one would be
the ecommerce tracking which, basically tracks the sale data on the Thank you page, and the second one would be
enhanced e-commerce tracking. Now in this tutorial video I
will only talk with you about the e-commerce tracking feature because enhanced e-commerce tracking is completely different and takes a whole ‘nother level of implementation with Google Tag Manager, and
so I want to save this up for another video. So we’ll just talk about the
e-commerce tracking feature, which basically tracks the sale data on the Thank you page of your online store. Now how does this actually work? Once a user purchases
something he lands on a final Thank you page,
and this Thank you page or confirmation or
transaction page features in the source code a data layer. And the data layer needs to
be integrated into your page and in this data layer we
have all the information available that we want to
transfer to Google analytics. Now once this data layer is available, we can trigger our tag, which is a Google analytics tag, but with the special feature that it is of the track time transaction. So we can take all that
data from the data layer which is available in a data layer and transfer it onto Google analytics. And we’ll look at how we would set that up in a second. But first of all I want to
talk again about the data layer because that’s the very
important part here in our e-commerce tracking installation. So the data layer that you need to install on the Thank you page is
basically the information that you want to transfer and that Google analytics
needs to fill their e-commerce reports. So we have for example, transaction ID, the transaction total,
and all the products that are associated with that transaction. And this data that you
see here is dummy data. It needs to be filled dynamically. So the transaction ID, if it changes, it needs to change in your data layer. And the products that have been purchased need to be changing so you
can’t just copy and paste this into your Thank you page, but this needs to change dynamically. There are two ways to install
this data layer functionality onto your Thank you
page, the first one being manual, so you need to
have a deep integration with your CMS system,
with your shop system. So for example, on Magento or Woocommerce you would go in and edit the template of the Thank you page to
feature this data layer and fill out the values of
this data layer dynamically. It probably needs a
little bit of programming, and we won’t go into
detail in this tutorial, but it’s definitely possible to install this data layer manually
onto your Thank you page. The second method of doing this is doing this through plug-ins. And if you have a bigger shop system that is extendable such
as Magento, Woocommerce, Prestashop, and so on. Chances are high that
there’s a plug-in out there in the extension store of your shop system that you can download and
install onto your page and this will do the
data layer integration for you automatically. Now let’s take a look
at how I accomplish this in my demo store. Now here we are back in our demo shop and this demo shop is built upon WordPress with a plug-in offer. Woocommerce and we all
know that WordPress is pretty extendable when
it comes to plug-ins and I have installed a plug-in right here which is the Google Tag Manager for WordPress plug-in by Thomas Geiger. And this is really a great plug-in because once you go to the
settings of this plug-in and go into integrations,
and under Woocommerce you can enable the Track
the classic e-commerce data layer for your web page. You can also install the
enhanced e-commerce tracking but this is for another video. So once you click Save Changes, and when we go back to our demo shop, and go through a quick test purchase, we’ll get to the page here that is in question with
is our Thank you page. And on this page the
data layer should fire and have our information available so we can pass it on to Google analytics via Google Tag Manager. And in order to check the data layer we can go into the developer
tools within Google Chrome so that would be under View, Developer, and JavaScript Console. And in this JavaScript
Console in the developer tools you can put in data layer. And that will give us
all the objects that are currently available in
the data layer for us to pass on to Google Tag Manager and then to Google analytics. So once we click on the first object here we already have the full
data layer integration of our e-commerce tracking. So for example we have the transaction ID, we have the products that have been sold, so there is one product in here. And, we also have the
total transaction amount. So, now there are also other
values in this data layer which are not as important,
but it’s safe to say that this data layer holds the values that we need to pass
on to Google analytics in order to fill our e-commerce reports. Now all we have to do is
fire an event based on this data layer and we can see up here that there’s an event
type in this data layer called GTM four, WP order completed, and we can use this to trigger our event. Now let’s configure that
in Google Tag Manager. Let’s go back to our
Google Tag Manager account and here we simply fire
a Google analytics tag based on this event. Now let’s start out by
clicking on new event, choosing Google analytics as a tag, it’s a universal analytics tag, and now we put in here our tracking ID, which I have stored in a variable so I don’t have to type
it in again and again. And then down here we
already have the track type, and as a track type we choose
this time, transaction. Now we can ignore all these
other settings, because we have everything
available in the data layer. So we click on Continue. And now we have to fire our tag based on this event that’s happening
in the data layer. So, you can click here on More, and on New Trigger, and we’ll just call this
Trigger, Transaction, and we want to fire
this transaction trigger on a Custom Event. And this event name equals, the name here in our data layer. So we can Copy, then
Paste in our event name. Now we can add Filters, which
we don’t have to do here because this is pretty unique. And then we can save the Trigger, and our tag is pretty much ready to go. Now we just need to give
a name for this tag. And then we can create this tag. Now best practice is of course
to preview and debug this, so let’s go into the
preview and debug mode. And then back to our demo store. And here we have, on the Thank you page, of course we could go
through another test purchase but I still have this open so I’ll just reload this page. And the Google Tag Manager
console opens up down here. We first of all see that
there’s an event triggered GTM four WP, once we click on that we see that our Google
analytics transaction event has fired. Now once we click into this, you can see that our trigger
was set up correctly, and transferred this
information to Google analytics. Now there’s no direct way
to see in Google analytics under the real time
reporting if this data was taken up correctly. But what we can do is use a little plug-in called the GAD Bugger for Chrome to see which data
actually gets transferred to Google analytics and we can do this by opening up the developer tools again. And go to the console, and then, reload this page by
clicking on this little D–GAD Bugger tool. And then we see all the
data that is sent in the Google analytics hit, and here we also see that
transaction information was sent to Google analytics
with the right order ID, the revenue and so on. Now this should be sufficient
to fill our reports here under Google analytics,
and under the conversion and e-commerce reporting. Now one important thing in
order to get this filled is that you have
e-commerce tracking enabled in the admin section
under e-commerce settings in your View settings. And here you need to
have e-commerce enabled. And then, the reports will be filled. This can take up to 48
hours till all the data is displayed correctly in Google analytics so you won’t see anything at this point. So just to recap again,
you need to install the data layer on your Thank you page, and you need to build an event trigger that triggers our Google
analytics tag with the Track Time transaction to
transfer the right data into Google analytics and fill
our e-commerce reports. And that’s already it
with our little video here at GTMTraining.com. If you like those videos, please subscribe to the channel or like our videos, and if you have any questions or concerns please put them into the
comments section below. I’m Julian. Till next time. – [Voiceover] So now
let’s get started with Scroll Tracking within GTM. And in order to, and what we’ll do in this little tutorial is implement a custom HTML tag which will basically act
as our event listener in Google Tag Manager,
and when somebody’s… Now let’s get started
talking about bounce rate. So the bounce rate is often seen as this metric to evaluate landing pages, so the traffic that hits my page actually stick around or leave the page. There’s actually a little
bit of a problem here with the bounce rate because the way that it is to find in Google analytics. Let’s have a look. So, bounce…

74 Comments

  • Patricia Websalad

    Thank you for this video. It was very insightful.

    I'm very interested in seeing a video explaining how to install enhanced eCommerce using Google Tag Manager. I'll be eagerly awaiting the next installment.

  • Anastasia Kapravelou

    Thanks again for the video!! I'm particularly interested in Enchanced ECommorce (EEC)! Let me know if any video/course will be available!

    Many thanks and great job! Congrats!

  • Stuart McLean

    Hi there, this video is the ONLY video I could follow to achieve this. Thank you so much. Do you have any tips for handling multiple currencies in gtm and ga? Thanks again. Stu

  • Ashwani Kumar

    Hi, Nice video!
    I just want to know that " first i have to put these data layer code in our web page, if you saying that only i have to paste the all datalayer variable on thankyou page then how value pass from  one page to another".

    Simple Example:- If i bought levis jeans from wallmart or any shopping website, first wallmart enable his google analytics setting. 
    Then how you select or create a datalayer from Tag Manager…

  • Artlandish Aboriginal Art Gallery

    When i followed this and checked through developer tools the objects were not there in the datalayer. I installed the plugin and followed the steps exactly but nothing!

    Anyone had this issue coz i'm lost now.

    thanks

  • Laercio Tersi

    ENGENHARIA DIGITAL
    Aumente suas VENDAS/DIVULGAÇOES e ganhe MAIS dinheiro. Nós temos o caminho, venha nos conhecer!

    acesse  www.eleandro.com

    Fixos (41) 4063-6161 (11) 4063-2057 (41) 8848-6388 Claro . (41) 8423-3210 OI .(41) 9282-1781 Vivo .(41) 9547-3783 TIM
     Outros Telefones: 41 9142-1518 TIM 41 9232-1600 VIVO

  • Daniel Thomas

    Great video. Very easy to follows – thanks. On my store transactions I don't have a unique 'event' as you had. My remarketing tag event fires and I have a 'transaction affiliation:' in dataLayer. How would you add this as its not a unique event?

  • Jirka Fiala

    thank you! we started a website the last week and implemented transaction data the old way while using GTM for everything else. I had limited time to study it and this video finally saved me. THX!

  • ianman6

    Hi, there isn't an event passed into the dataLayer in my case. Can I set the trigger using page URL or pageType? Or does this not work? Thanks!

  • Martin Zdravkovski

    Great video Julian! I have one question: can you give me few reasons why to implement GTM on my e-commerce website? I use only google analytics right now.

  • Christian Benedict

    Thanks Julian for another detailled and easy to follow tutorial. For all those that have been asking about a video on the enhanced ecommerce tracking: Please go for this 2015's Superweek session! http://youtu.be/dh4oq4vKYuE. It gives you a lot of in depth knowledge.

  • Максим Писанов

    What event I need to use on magento? Here is dataLayer what showing on console, no event…
    Object
    transactionAffiliation:"My Store"
    transactionId:"500000031"
    transactionProducts:Array[1]

  • TheTeaShed

    Brilliant video, thanks for the help!

    I've got a problem which is that the tag fires 2 times:

    Messages where this Tag Fired
    2 gtm4wp.orderCompleted 5 gtm4wp.orderCompleted
    Firing Triggers
    transaction
    Filters
    _event
    equals
    gtm4wp.orderCompleted

    Can I do anything about this?

  • TheTeaShed

    Also I've tried setting this up with shopify but when i try to fetch data layer this shows up:
    VM966:2 Uncaught ReferenceError: dataLayer is not defined
    at <anonymous>:2:1
    at Object.InjectedScript._evaluateOn (<anonymous>:878:140)
    at Object.InjectedScript._evaluateAndWrap (<anonymous>:811:34)
    at Object.InjectedScript.evaluate (<anonymous>:667:21)

    Do you know how i can fix this?

  • Diego Miranda

    Hi Julian, I followed your steps to install and configure GTM eCommerce on Prestashop (with added tweaks here and there) My Tag Assistant reported successfully tags firing on Demo mode but as soon as I have switched to Live Mode my online store I cannot get conversions. I tested with Tag Assistant and Preview Mode on GTM and both show: "No Tag Found!" error. Any clue please?

  • DIVUMART divulgação inteligente

    Hello Julian ,
    Friend, how do I get conversion data by clicking a button on my landing page ? For example : I created the conversion in Adwords for Click, so he asks to insert a snippet inside the button . And how do the two of them to work together ? And it all appears on analytics as a conversion or a goal ?

  • Jake Shaw

    Hi Julian,
    I am really impressed with the way you explain all your GTM lessons
    in the videos. Now I need to your assistance, how to install Google Certified
    Shops badge and the Order confirmation module through GTM. If you have any videos
    on this topic please share with me  

    Thanks,

  • EXTINTORES CELTA

    HI there – it is the first time I watched a video of yours as I am really starting to look into analytics, but it was very helpful.
    You set up the trigger only for one product of your online store – do you need to repeat this as many times as products you have in your online shop inventory?
    Thanks,
    Arturo

  • Nick Lima

    Hey Julian, best tutorials on GTM so easy to follow they have been a great help to me.

    Sending you positive vibes 🙂

  • Sirvach Jumani

    Hey Julian, your lesson its awesome please guide me how do i have applied e-commerce for shopify website any specific plugin for that to push data on thank you page.

  • EndingScene

    Hello Julian, you are simply great! Julian one thing. If I want to change the currency as like website what I need to do?

  • Param S

    I watched your all videos but couldn't see anywhere how to add datalayer, and this is the main part in Tag Manager, and another thing deploying it on ecommerce store on every product may take months to get the job done for magento shops. If you have explained data layer that comes built in with tag Manager, please recommend your right video, I appreciate your effort, and you are the one these days, who shows real tag manager assistance. Thanks

  • Honey House

    Hi, Very Nice demo. while creating a New Tag you have given Tracking ID as a {{GAIN}} . What should I will give on that for my eCommerce . Could you please explain me.

  • Derma Shop

    Hey Julian, thank you for your video. This is what I get: unknown variable. The unknown variable " GAID " was detected in a tag . Edit the tag and remove the reference to the unknown variable. Can you please help?

  • Lalit Sharma

    Hello Julian,
    I am having a hard time implementing the data layer on Woocmerce checkout. All I am getting is

    PagePostAuthor
    :
    "debasis"

    PagePostType
    :
    "page"

    :
    Object
    event
    :
    "gtm.js"
    gtm.start
    :
    1480337340661
    _proto_
    :
    Object

  • eyllan carmona

    Thank you very much for this explanation, I only have one doubt, if the payments are in payment gateways that are integrated with woocommerce I would also run those sales with analytics?

  • Ignacio Gil

    Hi Julian! the video its very good! thanks for your explain. I have two questions:

    1- I am try to put other courses in your web and I cant. When you open the courses?

    2- In minute 7:00, in configure track, the tracking ID where is the site to get this code?

    Thanks for all

  • Vane Velkov

    Hey mate, great video. One question: how come if I select enhanced e commerce tracking in Analytics and have set up standard via this method I still see some data in Shopping Behavior? Is that wrong data?

  • Michael Ingram

    at 1:25 you say "this page features, in the source code, a dataLayer". I assume that this means that something needs to be added to the page first, right?

  • Emirate Fashions

    Hey Jullian Thank you for wonderful explanation, google analytics template has been updated, kindly make a new video with updated google analytics or if u have already created kindly share with me. Best of luck for your upcoming videos

  • Tim Meyer

    This is a great tutorial thank you! My only issue is that I can see all the data, in the datalayer except for the Event id. Any idea why this could be?

  • iRestore Taiwan家用光電醫療保健產品專家

    Hi Thanks for the video. I am also using wordpress to build my website. So can you please tell me the the full name of your plugin?

  • Marcio Santos

    Hi Julian, as always great video!

    What do you recommend for adding enhanced ecommerce tracking to magento community edition?

  • Ghazi Jawad

    does GA reads eCommerce values if I used different names in the data layer, for example, if I used "total_price" instead of "transactionTotal" ??

  • Tushar Shukla

    Hi Julian,

    I have query can u plz help me

    I have ecommerce website which is doing nice business. But the issue is few of the transactions(order I'd ) is missing in GA when I compare with the website CMs. This is the scenario for everyday

  • Howard S

    What happens if you only have PayPal as your payment option on your site and the buyer doesn't get redirected to a thank-you page?

  • danielguerrat

    What is the Tracking ID called GAID and how was it configured? Can somebody tell me? I am totally new to this and completely lost since he does not explain this here. Thanks

  • Kopranix

    Hi julian, thanks for all this free content, this help me a lot. Unfortunately, since I installed the GTM and implemented the GA via a universaltag with the custom varialbles like shown, I do not get any more data from my shopify store via GA. Is it possible that you do a quick guide on how to set it up correctly? to check if I didnt do a mistake somewhere?

  • LondonWebFactory.Com

    Great Video Julian!!! FYI – I tried refreshing the "/checkout/order-received/" page on Woocommerce but my transaction event didn't fire. I deleted the product and bought a new one and it did fire. Many thanks. You saved me a stack of time.

  • jk28147

    I would have to go a different route. I am running a woo-commerce on WP but my store is an Amazon Associate Store.
    Therefore I do not have a real transaction on my site. However, I would like to be able to track the clicks on my product pages.
    My guess is I would need to ad a trcking code or similar to my Buy now .png image to make this work. Could you direct me to the most appropriate tut for image/link tracking

  • Jayjay F

    Is this video still valid now ? Also where is the video for enhanced ecommerse tracking, I see u have one video but it only talks about transactions

  • Lucas Gardezani Abduch

    how hard is it to learn how to fill the data dinamically?
    any tutorials or websites I could learn it by myself online?

  • sohail TheEnricher

    i have magento e store, plz tell me plugin name like you use in abve video for woocommerce.. any body know plz share…

  • Kjeld H

    Can someone please help me out!? I can't get it to work. I manually put the container snippet in the header (and also one in the body). I also put <?php if ( function_exists( 'gtm4wp_the_gtm_tag' ) ) { gtm4wp_the_gtm_tag(); } ?> in the first line of the body. However If I perform a test transaction I don't get the ordercompleted event in the datalayer.

  • Salman Khan

    Can someone please tell me from where we have to connect the thankyou page to Google Tag Manager? Like in this video the orde received page is the thank you page but I haven't seen that you have connected with in the plugin settings to show the data layer in it.

  • S Serafin

    I'm looking for a non plugin way to do this. Is it possible? Too many plugins bloats a site. There has to be an easier way to do this than that. Also, this video is 4 years ago. Is this still a current way to implement? Meaning DataLayer? Thank you in advance! Love your videos. They have helped me tremendously!

Leave a Reply

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