How to Track Transactions with Google Analytics Enhanced Ecommerce Functionality



in this video you're going to learn howyou can track transaction with theenhanced e-commerce trackingfunctionality of Google Analytics andwill install all this with the help ofGoogle tag manager a lot more coming upso let's dive in hi there and welcome toanother video of measure school commwhere we teach you the data-driven wayof digital marketing my name is Julienand today we want to talk about how youcan track enhanced e-commerce trackingtransactions within Google Analyticswith the help of Google tag manager andwe have done this before in anothervideo because they are actually twodistinct methods of capturingtransactions one is the classicecommerce tracking functionality withinGoogle Analytics and the second onewould be the enhanced e-commercetracking functionality within GoogleAnalytics now I won't be able to explainall of the different integrations youwould need to do to get a completeunderstanding of enhanced e-commercetracking but if you're interested in amore comprehensive course about this I'mactually thinking about building onejust for this purposeplease signalize your interest atmeasure school comm slash enhancede-commerce tracking course but today wewant to talk about just the transactiontracking part of the enhanced e-commercetracking and this is actually what Iwould recommend to install if you arethinking about installing equalstracking on your website so instead ofthe classic ecommerce tracking I wouldrecommend to start out with the enhancede-commerce tracking although you mightnot install the whole enhancede-commerce tracking functionality solet's get started first of all we wouldneed to prepare our Google Analyticsaccount to receive this enhancede-commerce tracking data how would we dothis we go over to Google Analytics andin the admin section under our viewsettings will find ecommerce settingsand we need to enable e-commerce butalso enhance ecommerce which we can doin the next step we can also put anour checkout labeling which we willignore in this video because we are onlyinstalling the transaction tracking ofthe enhanced e-commerce capabilitieslet's submit this and Google Analyticsis now ready to receive our data allright on our demo shop we have GoogleAnalytics installed and Google tagmanager now we want to add to this ourtransaction tracking there need to betwo things in place in order to do thisone is a correct data layer and thesecond are the write tags that forwardthe information on to Google Analyticsso let's talk about the data layer for asecond data layer would need to beinstalled on the final checkout pagewhere the data of the purchased itemsare available so in our case that wouldbe the Thank You page so let's gothrough a checkout process reallyquickly and we get to the checkout pagewhere we will have the data available tosend on to Google Analytics such as theproduct that was bought the total amountthat was paid the order number and so onand so on now in this page we would needto install a code that carries theinformation and if you do this withGoogle tag manager you would install itinto our data layer which is a centralrepository for all our data hidden fromthe user but visible to Google tagmanager and what we need to installexactly is documented in the enhancede-commerce tracking Help section wherewe have our developer guide on how toinstall enhanced e-commerce tracking nowas I said there are many different datalayers to implement to have the fullfunctionality of the enhanced e-commercetracking available we are only going totalk about the transaction trackingwhich is the purchase action within theenhanced e-commerce tracking so let'sclick on this and we actually get thedata layer or the data layer push thatneeds to beout on our thank-you page and valuesneed to be dynamically replaced such asthe ID would need to be replaced withour order number the revenue with ourtotal here and so on and so on nowinstalling this can be done in severalways you could do it right through thebackend of your system by editing thetemplate files and replacing dynamicallythe values of those fields with theactual value of the transaction youcould also install a plugin thatprovides that data by default or sendthis documentation over to yourdeveloper to have them implement it thisdata layer but be aware you can't justcopy it and paste it into your templatebecause then the products and the onlinestore and all these values would staythe same you need to have a dynamicreplacement of these values luckily weare on WordPress and WooCommerce hereand there's a very good plugin by ThomasGeiger which is the duracell to meGoogle tag manager plugin which I haveinstalled on my wordpress website and itgives you a lot of functionality on theimplementation of Google tag manager andfortunately also under the integrationsin WooCommerce functionality we can turnon the track enhanced e-commerce datawhich will transfer the data into ourdata layer automatically so let's checkout what is in the data layer let's goover to Google tag manager and actuallygo into the preview and debug mode andgo through a transaction againwe get to the Thank You page and we canlook with our preview in debug mode intothe data layer and the data that isavailable now we see here this is a bigobject that was pushed into the datalayer with the key GTM for WP ordercompleted and we have an e-commerceobject available with the data that weneed for enhanced e-commerce trackingthis is modeled after what we see herein the data layer push of the officialintegration now if you see any problemshere that's something that happens quiteoften you would need to make sure thatit's modeled after the officialdocumentation here in order for ourenhanced e-commerce tracking to work nowall we need to do is send the data on toGoogle Analytics how would we do thatlet's go over to Google tag manager andcreate a new tag this will be good aGoogle Analytics tag which will send anevent with our enhanced e-commercetracking data of the transaction overlet's go with Google Analytics here andwe are going with Universal analytics Ihave a tracking ID prepared in ourvariables if you don't know how toinstall this please Google for theGoogle Analytics ID my video will pop upand then we choose the track type ofevent now sending data over for enhancede-commerce tracking will not require youto send over a transaction track typeyou can send it either with an event ora page view but this data needs acarrier in our case we already have thepage you tracking installed so I don'twant to duplicate the page view on theThank You page I want to send in anevent to transport the data to GoogleAnalytics so let's go with event hereand then we can fill out anything thatwe want but please be sure to fill outthe category in action I usually callthis my enhancedecommerce tracking data and then theaction would be a purchase I will setthe non interaction hit to true becauseI don't want this tag to affect mybounce rate and then under the moresettingsI have ecommerce tracking featuresavailable and I can enable the enhancede-commerce tracking features now you canchoose to use a variable but in our casewe will use the data layer because thedata is available here let's continueand fire this tag upon a new trigger andwhat will this trigger be like let's goback we see our data here and we want tobe able to trigger our tagline that datais available and the actual checkpointfor this is in the event and we have anevent available here which is the GTMfor WP auto-completed let's copy thatand go back to Google tag manager andchoose custom event and as the eventname we simply put our GTM 4wp ordercompleted you call this trigger thetransaction trigger and we don't need toadd in any filters because this ispretty unique to this website let'screate this trigger and create this tagrefresh and go through a anotherconversion againhere we go and we see that upon ourfirst GTM for WP order a large EA eventee transaction has fired correctly nowwe can look into that unfortunately wedon't see any very revealing informationabout our sent enhanced e-commercetracking data and unfortunately we arealso not able to see any sign of ourenhanced e-commerce tracking in thereal-time reporting but we would be ableto see that an event came through and besure that our enhanced e-commercetracking data was sent it takes a whileto populate then in our conversionreports on the e-commerce you would haveyour enhanced e-commerce trackingreports available where you also haveall your sales performance report whereyour transaction should be showing upwithin the next half hour to 48 hoursplease be patient for this the otherreports will not be filled by defaultyou will need to install the fullenhanced e-commerce trackingfunctionality at the end don't forget topublish your version so it goes out toall your users so this was a quickoverview on how to install enhanceecommerce transaction tracking with thehelp of Google tag manager if you areinterested in building out the fullenhanced e-commerce tracking on yourwebsite please signalize your interestat measure school comm slash enhancede-commerce tracking courseand that's already it with this week'svideo of measure school , hope youenjoyed it and if you like this videoplease subscribe to this channel so wecan bring you more videos every week myname is Julien til next time

Source