Intermediate Google Tag Manager — Tracking Ecommerce: The Next Level
I started with Intermediate Google Tag Manager on CXL, and my tutor is Chris Mercer from measurementmarketing.io.
Introduction to the Course:
As per discussed the basics of Ecommerce tracking, the one of the big difference in standard and enhanced ecommerce tracking is the details GTM shares with Google analytics. Standard Ecommerce reports tell you the what,it’s the standard story.Here’s what was purchased and when that purchase happens,in this case the implementation would be to send over a Google Analytics transaction tagor send it over with page view tag and then all the details get stored,in this case the transaction details get stored in Google Analytics in terms of the transaction and then the items that were purchased and everybody’s happy. Analytics knows what products were purchased,how many of those products were purchased,what their price points were,it knows the total transaction and the order ID of the invoice and more information. So it has all of the details.But what that doesn’t allow you,to actually get into from a story perspective,is the how that happened.In fact Standard Ecommerce just doesn’t allow us to do that in those reports.
Enhanced Ecommerce is you still have the what,but you’re not doing it through a transaction tag.Transaction tags are only for Standard Ecommerce,instead you sort of have to get the date in there through another means.It’s either going to be through an event,or a page view tag, is how that actually gets through.So you do it through a Google Analytics event or pageview tag and that’s how the information actually gets into Google Analytics.So that’s sort of one difference on how enhanced works.In Standard Ecommerce with Google Tag Manager you have the Google Analytics transaction tag that you can use to take the purchase information and send it into Google Analytics,and again this already has to be in data there.But Enhanced Ecommerce it doesn’t use the transaction tag,it can’t use the transaction tag,instead it has to sort of hitchhike into Google Analytics through either an event tag or a page view tag. So enhanced is a very, very different world.
Enhanced Ecommerce is certainly one of the finest reporting user interface features that Google Analytics has to offer. Enhanced Ecommerce, as the name implies, is a set of dimensions, metrics, and reports, which combine to provide you with a fairly complete view into how users are interacting with your products in your webstore. The main downside of Enhanced Ecommerce is, as with all good things, that it’s complicated to implement.
Differences (and similarities) to Standard Ecommerce
If you’ve been running Standard Ecommerce through Google Tag Manager, there are mainly three major differences between that and Enhanced Ecommerce.
- Standard Ecommerce only collects transactions (i.e. “Purchase” hits in EEC) — there are no other components to its funnel (in fact, there is no funnel).
- Standard Ecommerce uses a different category format.
- Standard Ecommerce doesn’t support Product-scoped Custom Dimensions and Metrics.
One thing to pay heed to is that you can collect both Standard Ecommerce and Enhanced Ecommerce hits to an Enhanced Ecommerce -enabled Google Analytics view! This means that if you leave your “old” tracking in place and run an Enhanced Ecommerce implementation in parallel, you might end up double-counting transactions.
Google Analytics does deduplicate identical transactions sent in a session, but it’s enough for some component in the two different tracking methods to differ for GA to collect the data twice.
In the Tutorial, we used GTM Plugin for WordPress and integrated the Enhanced Ecommerce Tracking using GTM. Shopify Plus also has options to enable enhanced ecommerce tracking through GTM
Send the data to Google Analytics using the Data Layer
When you select the Use data layer option in the Enhanced Ecommerce settings of a Google Analytics Page View or Event tag (or a Google Analytics Settings variable), you instruct the tag to look into the Data Layer and pull the key-value pairs from the ecommerce object pushed most recently into dataLayer.
This sounds pretty straight-forward. All you need to do is make sure the object pushed into dataLayer follows the exact correct syntax, and that it’s pushed into dataLayer before (or in the same push as) the tag that accesses the data via Use data layer fires.
However, there are two important things to note here.
- The dataLayer.push() must be perfectly formed. There’s no way to modify it on-the-go if you activate the “Use data layer” option. So it’s absolutely vital that you specify and audit the object that is being pushed into dataLayer for Enhanced Ecommerce data collection.
- When a tag with “Use data layer” fires, it really only accesses the most recent ecommerce push. So, if you’ve split Product Impressions into multiple pushes and then fire the tag when the last one is done, if the tag has “Use data layer” checked, only the last impressions object is sent to Google Analytics.
Point (2) might sound counter-intuitive, but it actually makes sense. If GTM didn’t exhibit this behavior, then all ecommerce pushes done on a single page would tag along with all the subsequent Enhanced Ecommerce payloads. By sending only the most recently pushed object, this behavior can be avoided.
It’s precisely because of this behavior that I again strongly recommend to always include the event key in every single Enhanced Ecommerce object. Why? Because then you can use Custom Event triggers to fire your Enhanced Ecommerce tags at precisely the correct time, and the most recent object they access will always be the one that triggered the tag. That way you won’t lose any data because of pushes that didn’t trigger any tags.
Next thing that we discussed in the Tutorial, Tracking Enhanced Ecommerce tracking using Facebook Pixel. The solution here is to create an API that you can pass your Enhanced Ecommerce products array to, and it will return the array all reduced and converted to the various formats required by the Facebook Pixel.