It is strongly recommended that you use the Google Tag Manager service wherever possible to implement Google Analytics. There are many reasons for this but the main one is that it makes updating or adding features to tracking your website easier and reduces your reliance on a web developer to make changes to your website.
IMPORTANT: Google Analytics Enhanced E-commerce requires that you are using the Universal Analytics version of the tracking code. If you are using an earlier version then you will need to upgrade this to the Universal Analytics version before proceeding with the remaining steps in this article.
Step 1: Turn on Enhanced E-commerce in your Google Analytics Settings
Step 2: Setup the variables or data layer
Step 3: Connect the Google Analytics code
Step 4: Test and test again
Step 1: Turn on Enhanced E-commerce Settings
Login to Google Analytics.
Go to the view that you want to configure.
Click on the Admin icon at the bottom left hand side of the screen.
Click on the E-commerce Settings icon
Turn on the Enable E-Commerce status
Click Next step button to configure the Enhanced E-commerce settings.
Change the Enable Enhanced E-commerce Reporting toggle to On
Under Funnel Steps, add labels which match each step in your checkout process.
Click on the Submit button to save these changes.
Step 2: E-commerce Variables / Data Layer
This is the hardest step for most people. Getting the data that you need from the web page to populate the Google Analytics reports can be tricky.
The full details on what you need to track can be found at:
Google Tag Manager:
Rather than recreate this documentation here, you can send this to your web developer for them to implement.
If it is not possible to implement all of the features on your shopping cart platform then you might want to consider implementing some of the more important features only. From our experience these are:
- Checkout Steps
- Product detail views
- Add to cart events
- Internal promotions
|All pages||Internal promotions||This feature allows you to track the effectiveness of your promotions within the website. For instance a home page hero image that is used to direct customers to selected products will be tracked using this feature.
Wherever you show a promotion on the site you can record an impression and a click.
|Content group||Whilst not part of enhanced e-commerce content groups give you a powerful way of assessing the value of your SEO activities.
|Product category pages||Product list tracking||Product list tracking shows you how many times a product was displayed in a category or list and the number of times it was clicked. This is one of the more difficult features to implement but can provide a lot of value for the analyst if it is implemented.
|Add to cart||If your online store allows your customers to add products to their shopping cart from a product list then you can track this using Google Analytics.
|Product detail pages||Product detail views||When the customer views a product details page on your website recording that view in Google Analytics provides the basis for measuring the effectiveness of that product in generating sales. If a product is frequently viewed but not frequently purchased then this may indicate that you need to change that product.
|Add to cart||Adding the product to the shopping cart is a key measure of the potential sales for that product.
|View cart||Checkout step||Measuring whether the user proceeds from the view cart stage to start checkout is a recommended measure for your website. By adding a checkout step at this stage you can create audience remarketing lists that you can use to bring customers with abandoned carts back to your website.
|Remove from cart||This feature allows you to track whether a user has removed an item from their shopping cart. If some items are frequently removed from the shopping cart this may indicate issues with shipping costs or other aspects of that product.
|Add to cart||When the user increases the quantity of an item within the shopping cart you can use the add to cart event to record this.
Note that Google Analytics doesn't currently have an adjust cart event and implementing this feature may bias your add to cart reporting. Our recommendation is to use the Google Analytics event tracking to record this rather than using the add to cart event.
|Checkout||Checkout step/s||Tracking the customers' progress through the checkout process can provide valuable information on whether your checkout is working at peak efficiency.
As a number of shopping carts use a one page checkout this can require custom implementation to match your set up. Also some shopping carts that use a 3rd party system may not be able to track all steps. One example of this is the popular Shopify service.
|Transaction details||Naturally this is the most important feature that you must implement to get the value of the Google Analytics e-commerce reporting.
This feature allows you to record what sold, the amount, shipping, tax and the details of the products sold.
|Currency||Google Analytics supports using multiple currencies. This allows you to see which currencies customers are using to purchase from your store.
For Google Tag Manager you need to include the dataLayer variable 'currencyCode' which should be included in all transactions.
|Custom product attributes||When you record a transaction you can also extend Google Analytics' product fields to include custom dimensions and metrics. For instance if you are selling clothing you can include the product style, size and colour as 3 additional dimensions. You can also include custom metrics such as the cost of the product (though be warned if you use this you might be disclosing your profits).
|Administration||Refunds||If a user returns a product then you can record a refund event to cancel out that transaction in Google Analytics.
Step 3: Connect the Google Analytics Code
If you are using Google Tag Manager (and we recommend that you do), you must set up the variables, triggers and tags for any of the features you’re implementing.
The configuration specifics for Google Tag Manager can be found with the details of each feature here: https://developers.google.com/tag-manager/enhanced-ecommerce
Step 4: Test and Test Again
Testing that each of the enhanced e-commerce features is functioning is imperative to ensure the data in Google Analytics is reliable.
There are a number of methods for conducting the tests:
1. Google Tag Manager’s Preview Function
Google Tag Manager has the ability to show all tags which have (and have not) fired on each page.
As an example, see the testing section for our Tag Manager Plus Magento Extension:
DataSlayer is a Chrome extension which shows tag activity and data layer details. This is only useful for a Google Tag Manager implementation.
Download DataSlayer here.
3. GA Debug
This is another Chrome extension which shows all data being transmitted from to Google Analytics. The format of the data isn’t as easy to read as DataSlayer, but it can be used with analytics.js tagging or Google Tag Manager.
Download GA Debug here.
4. Google Analytics Realtime Reports
While the above 3 methods show data which is being sent to Google Analytics, the Realtime Reports will confirm the data is arriving as expected.
Specifically, look at Realtime > Events to confirm that all events which are triggered on the website are appearing in Google Analytics.
If you would like to find out more, or require assistance with implementation documentation for your developers, contact us to discuss your requirements.