Enhanced Ecommerce (EE) is a Google Analytics plug-in that provides merchants with better insights for the shopping behavior of users.
Enhanced Ecommerce tracking requires your developers to send lots of extra product and checkout information in a way that Google Analytics can understand. So why use it?
Note: Update: If you are using GA4, the new version of Google Analytics, Enhanced Ecommerce will be a bit different. Read more about GA4 for ecommerce
Why use Enhanced Ecommerce?
The main benefit of Enhanced Ecommerce (EE) over standard ecommerce implementation is the sheer number of valuable reports merchants have access to with EE. Enhanced Ecommerce is necessary to get complete checkout funnel reporting and similar reports in GA.
Not only that, but merchants can segment data based on ecommerce events — which users visited your product pages, where the customer journey hit a roadblock (e.g. a customer pondered a product but didn’t add it to cart, etc.) or during which steps of the checkout process a user abandoned their cart.
It’s essential to capture checkout funnel events, and EE helps with that. Tracking checkout funnel steps in Google Analytics doesn’t just offer insight into the checkout journey, it also gives you the tools you need to set up custom funnels.
Ultimately, this kind of data helps merchants zoom in on their sales funnel and alter the parts of the process that don’t lead to conversion.
GTM data layer for ecommerce tracking
Enchanced Ecommerce implementation is no small feat, but it also depends on a number of factors — the size of your store, the number and type of Google Analytics custom dimensions you need to add, etc.
Without question, Google Tag Manager is the simplest and best way to enable Enhanced Ecommerce in Google Analytics.
If you already use Google Tag Manager (GTM) to track page views, you must send ecommerce data via Google Tag Manager.
If you don’t already use GTM, it’s simple to set up: just activate Enhanced Ecommerce within your Google Analytics tags and use a dataLayer as an ecommerce data source. Just make sure the dataLayer contains all ecommerce data.
Step 1
Enable enhanced ecommerce reporting in the Google Analytics view admin setting, under ‘Ecommerce Settings’
Step 2
Select names for your checkout steps (see point 4 below):
Step 3
Get your developers to push the product data behind the scenes to the page ‘dataLayer’. Here is the developer guide.
Step 4
Make sure the following steps are tracked as a pageview or event, and for each step set up a Universal Analytics tracking tag:
- Product listing view
- Product detail view
- Add to cart event
- Remove from cart event
- Checkout step 1 (views the checkout page)
- Checkout step 2 etc – whatever registration, shipping or tax steps you have
- Purchase confirmation
- Refund
Step 5
Send the data to Google Analytics using the Data Layer. Instruct the tags to look into the Data Layer and pull the key-value pairs from the eCommerce object pushed most recently into dataLayer by selecting the correct Google Analytics variable.
Step 6
This step involves checking the setup. After you have configured everything in place, you’ll need to check your entire. What you should be looking for is:
- Are all the keys configured in the dataLayer.push() getting picked up and being sent to Google Analytics?
- Is the payload length too long?
- Is there a risk of data duplication with some hits?
To debug these, you really only need three tools: GTM’s own Preview mode, the Google Analytics Debugger browser extension, and Google Chrome browser’s DevTools. Yes, there are plenty of other tools you can use, but these have proven to be more than enough in my own experience.
GTM data layer for ecommerce tracking
Wrapping up
Need some more help? Get in touch with our lovely team of Google Analytics experts and we’d be happy to answer any questions!
At Littledata, our Google Analytics connection is the easiest way for you to automate GA for Shopify stores. With Littledata’s app, you get:
- GTM and Google Analytics data layer that works automatically for ecommerce tracking, including checkout funnel tracking
- Seamless connections with apps like ReCharge and CartHook
- Raw data that remains available in Google Analytics or Segment
- Accurate analytics for Shopify with complete sales and marketing events captured automatically
Try our Google Analytics app for Shopify free for 30 days on any plan. On Shopify Plus? Learn more about Littledata Plus.
We implemented the next code for tracking checkout process (after GTM code):
dataLayer.push({
‘event’: ‘checkout’,
‘ecommerce’: {
‘checkout’: {
‘actionField’: {‘step’: ‘Review Cart’}
}
}
});
but we can see any data in the Checkout behavior report (session with transactions only).
We created tag in GTM like tag in the 5 step.
What error did we do during implementation?
Thanks.
Hi Tatyana – good question! I found the part about ‘actionField’ confusing as well. You need to specify the ‘step’ as an integer, and then name the step within the GA admin interface (see screenshot in step 2 above). So in this case you should write:
dataLayer.push({
‘event’: ‘checkout’,
‘ecommerce’: {
‘checkout’: {
‘actionField’: {‘step’: 1}
}
}
});
Thanks! Now we see all data in Checkout behavior report.
We implemented the next code for tracking checkout process (after GTM code):
dataLayer.push({
‘event’: ‘checkout’,
‘ecommerce’: {
‘checkout’: {
‘actionField’: {‘step’: ‘Review Cart’}
}
}
});
but we can see any data in the Checkout behavior report (session with transactions only).
We created tag in GTM like tag in the 5 step.
What error did we do during implementation?
Thanks.
Hi Tatyana – good question! I found the part about ‘actionField’ confusing as well. You need to specify the ‘step’ as an integer, and then name the step within the GA admin interface (see screenshot in step 2 above). So in this case you should write:
dataLayer.push({
‘event’: ‘checkout’,
‘ecommerce’: {
‘checkout’: {
‘actionField’: {‘step’: 1}
}
}
});
Thanks! Now we see all data in Checkout behavior report.
Hi that’s a great tutorial, thanks! I wanted to go a bit further and create a macro that returns the checkout step but a nested datalayer variable (checkout.actionField.step) doesn’t seem to work for me – any help?
A nested dataLayer macro should work. But in the case here you would need ecommerce.checkout.actionField
Hi that’s a great tutorial, thanks! I wanted to go a bit further and create a macro that returns the checkout step but a nested datalayer variable (checkout.actionField.step) doesn’t seem to work for me – any help?
A nested dataLayer macro should work. But in the case here you would need ecommerce.checkout.actionField
Hi, How do you see the actionField option step. I’m working with Tag Manager to try and view this information. Its been marked up within the datalyer already but I can’t see it anywhere within Analytics. Got any advice?
‘actionField’: {‘step’: 1, ‘option’: ‘Visa’},
Hi Ed – if you’re specifically talking about the actionField for checkout options, then you can see this in the ‘checkout behaviour’ report on GA. However, you’ll need to set up the steps in configuration first (see option 2 above).
I don’t think you can segment it by the option – e.g. ‘visa’ yet – that is waiting for a further release from GA. But you can set that up in a custom report – i’ll add that as a PS to this post
Hi, How do you see the actionField option step. I’m working with Tag Manager to try and view this information. Its been marked up within the datalyer already but I can’t see it anywhere within Analytics. Got any advice?
‘actionField’: {‘step’: 1, ‘option’: ‘Visa’},
Hi Ed – if you’re specifically talking about the actionField for checkout options, then you can see this in the ‘checkout behaviour’ report on GA. However, you’ll need to set up the steps in configuration first (see option 2 above).
I don’t think you can segment it by the option – e.g. ‘visa’ yet – that is waiting for a further release from GA. But you can set that up in a custom report – i’ll add that as a PS to this post
Hi, I am a novice. I am trying to setup enhanced ecommerce tracking for https://www.mhsim.com. I have a few questions I hope you can help me resolve.
I have only created a single Universal Analytics tag and as per step 5, edited my tag, and under ‘More Settings’ section, select the ‘Enable enhanced ecommerce features’ and then ‘use data layer’ options. NOTE: This is the only I have created on this website.
Our developers have confirmed the datalayer is declared before the container snippet for website – so the datalayer has loaded before the tag is due to fire – however no ecommerce data is passing to Google Analytics.
Should I be creating other tags or triggers?
Should I be creating an additional events tag and configure enhanced ecommerce setting?
I did not really understand step 4.
Also, how do I know what labels to give step 2? And what pages of the checkout should be included (I don’t think our website quite follows conventions)?
Regards,
Keiron
Hi Keiron,
I can’t answer all your questions, but I don’t think the data is being exposed in the right format in the data layer just to use the GTM ‘user data layer’ option. I had a quick look and I can’t see product data on any of the pages in step 4. Your site is not conventional, but there is still a product page, cart and checkout.
Maybe contact us if you want more expert support.
Edward
According to documentation the tag configuration for checkout steps is as follows:
Tag type : Universal Analytics
Track type : Event
Event Category: Ecommerce
Event Action: Checkout
Enable Enhanced Ecommerce Features: true
Use Data Layer: true
Basic Settings – Document Path: {{url path}}
Firing Rule: {{event}} equals checkout
What about the event label? Don’t I need to specify it somehow or does GTM automatically insert the “step” value from the data layer? When I leave the label empty I get “undefined” in GA. I’m not sure if it is a because I should use a variable or if there is a problem in my data layer. Enhanced e-commerce – chekout step configuration
Hi Anna,
You don’t need to specify a label – GA doesn’t use the event dimensions (cateogory, action or label) in the checkout behaviour chart. But if you have a custom variable set up in GTM to measure ‘step’ then you can pass that as the label.
Edward
According to documentation the tag configuration for checkout steps is as follows:
Tag type : Universal Analytics
Track type : Event
Event Category: Ecommerce
Event Action: Checkout
Enable Enhanced Ecommerce Features: true
Use Data Layer: true
Basic Settings – Document Path: {{url path}}
Firing Rule: {{event}} equals checkout
What about the event label? Don’t I need to specify it somehow or does GTM automatically insert the “step” value from the data layer? When I leave the label empty I get “undefined” in GA. I’m not sure if it is a because I should use a variable or if there is a problem in my data layer. Enhanced e-commerce – chekout step configuration
Hi Anna,
You don’t need to specify a label – GA doesn’t use the event dimensions (cateogory, action or label) in the checkout behaviour chart. But if you have a custom variable set up in GTM to measure ‘step’ then you can pass that as the label.
Edward
Hi, the official documentation doesn’t say you should define seperate step events – there is only one event that registers them – here I see we should set up a seperate event for each step. I have a problem with the shopping behavior report – it shows 0 transactions event though the goals report and the checkout report show that the transactions were made.
If the checkout step event shows up in the ‘behaviour..events’ reports, but not in the ‘conversions.. ecommerce.. shopping analysis .. checkout behaviour’ then that means the GTM tag is firing, but the data layer object is not valid.
Go back to the documentation, and check all the required attributes are sent and in exactly the right format. e.g. transaction value is sent as string type ‘0.00’ but checkout step is sent as a number.
Hi, the official documentation doesn’t say you should define seperate step events – there is only one event that registers them – here I see we should set up a seperate event for each step. I have a problem with the shopping behavior report – it shows 0 transactions event though the goals report and the checkout report show that the transactions were made.
If the checkout step event shows up in the ‘behaviour..events’ reports, but not in the ‘conversions.. ecommerce.. shopping analysis .. checkout behaviour’ then that means the GTM tag is firing, but the data layer object is not valid.
Go back to the documentation, and check all the required attributes are sent and in exactly the right format. e.g. transaction value is sent as string type ‘0.00’ but checkout step is sent as a number.