E-commerce analysis possibilities with Google Analytics

Jose Vicente

Written by Jose Vicente

E-commerce section in Google AnalyticsGoogle Analytics can track sales made on our e-commerce site using its E-commerce feature. This option is available on the platform’s “Conversions” section. Before we go to analyse the possibilities it provides, we should clarify that it shouldn’t be seen it as a comprehensive monitoring tool of our e-commerce sales. If we really want to know how much we’re selling or what our revenue is, our own e-commerce system should integrate this feature. When dealing with large online stores, it is common to see that a small percentage of the total amount of registered sales doesn’t match the real figures. But as with all the data Analytics offers, we should use it to establish patterns and trends.

How to install e-commerce on Google Analytics

Google Analytics registers the sales on our e-commerce thanks to JavaScript code, that our web application must generate when the purchase has been completed.

This code is included inside the Analytics tracking code on the purchase confirmation page, and it’s comprised of 3 parts:

  • Transaction creation: it contains the data of the order and we should at least define the order number (it should be unique) and the total cost. This data is defined using the _addTrans() function.
  • Add products to the transaction: using the _addItem() function, we add the products included in the order. For each line, we should at least define the order number, the product reference, price per unit, and number of units.
  • Send the transaction to Google Analytics: when the _trackTrans() function is run, and if the remaining lines of code are correct, we will register the order on our Analytics account.

Google’s E-commerce Tracking page provides more specific information regarding the implementation and the various syntaxes.

Besides implementing this code correctly, we must enable its monitoring from Google Analytics. To do this, we must go to the admin panel of the view in question, and activate the option of “E-commerce Tracking”.

What kind of data does Google Analytics collects about our e-commerce site?

If we install and enable the Analytics tracking code for e-commerce correctly, besides the sales data we will also get more information on customers and prospective customers of our website.

  • Top-selling products: if we fill all the fields of the _addItem() function correctly during the implementation, we could have all the data on the products registered by the system. The fourth parameter of this function is especially interesting, because it allows us to also register the product categories sold. Knowing this information is important, to see which products and types of products we should give more visibility on our online shop.
  • Behaviour of users who completed transactions: Google analytics registers –within its possibilities– the number of days and visits until a transaction is completed.
  • Data on visits with a transaction: the advanced segment “Sessions with transactions” allows us to filter data in order to see patters in sessions, which made a purchase on our e-commerce. If we can get these patterns to happen more often, we’ll most definitely get more sales.
  • Data on users who purchased: the advanced segment “Made a purchase” allows us to determine the behaviour of users who purchased something on our online shop on later visits to our website. We shouldn’t confuse this advanced segment with the previous one, because this one only collects data from users who made a purchase, whilst the previous one only collets data from the sessions during which they purchased something. We should also keep in mind that, given that this segment gets user data, Analytics will only display the data of the past three months.
Data provided by #Analytics about our e-commerce: 1️⃣Top-selling products 2️⃣Behaviour of users who made a purchase 3️⃣Data on sessions with transactions and 4️⃣Data on users who made a purchase.Click To Tweet

Although the tracking code can only register sales with the required fields, it’s important to fill in all the possible fields, so that the analysis is as comprehensive as possible.

Days to Purchase

Issues with registering sales

As we’ve said at the beginning of this post, we should not use this feature to keep a precise control over the sales of our e-commerce. In some cases, it won’t be possible to implement it correctly, and in others, there could be technical inconveniences which might hinder its functioning. Let’s see some examples of these issues:

  • Payment gateways that do not transmit the order code. Certain payment gateways do not transmit the order code to our web application, to inform us that the payment has gone through correctly. Without this information, we cannot generate the code for Analytics to register the sale. The ideal solution for these cases is to integrate the payment gateway into our e-commerce, but this is not always possible, due to the high cost it entails.
  • Users who do not go through correctly with the order. With certain payment methods the user should click on a button to return to the online store and finish their order. If the user doesn’t do this, we cannot register this sale.
  • Errors in the execution of the Analytics code. Analytics’ e-commerce code uses JavaScript, which is run by the user’s client application. If there is a JavaScript error on the page, the sale cannot be registered in Analytics.
  • Skewed data in Analytics. Just as with other metrics it collects, Google Analytics doesn’t always show the collected data in full, which results in the existence of a certain margin of error.

This Analytics feature should not be used as a tool for comprehensive tracking of sales made on our e-commerce.

☝ This Analytics feature should not be used as a tool for comprehensive tracking of sales made on our e-commerce.Click To Tweet

Other uses of the e-commerce section in Analytics

Even though this feature was created to analyse the sales of an e-commerce, there are other websites who could benefit from the information provided in this section.

  • Estimate budget requests: there doesn’t need to be a sale in its strictest form for it to be registered with this feature. If our website can be used by our prospects to request a budget quote, we can register these requests with Analytics. This way, we will get data on products and services our website’s users find more interesting.
  • Application or document download: if our website’s goal is to get a user to download applications and/or documents, we can also register them in Analytics.

We should always keep in mind this Google Analytics feature, because it’s the one tracking more data. If our website is an online shop, or it follows a similar model we can adapt, we strongly recommend enabling and implementing this feature.

Jose Vicente
Autor: Jose Vicente
Head of Search Marketing and SEO consultant at the Human Level online marketing agency. He's a search engine optimization and web analytics expert, specialising in planning web positioning strategies.

Leave a comment

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