How to Set up Ecommerce Tracking in GA and Google Ads?

How to Set up Ecommerce Tracking in GA and Google Ads?

Data is necessary to make the right decisions. When it comes to ecommerce shops, the data concerning transactions is the most important piece of information. In order to take full advantage of the benefits of web analytics you need to properly configure your e-commerce tracking in Google Analytics.

Latest on our blog: How to Lose E-commerce Customers in 5 Seconds?

Ecommerce tracking in Google Analytics – what is it?

Ecommerce reports in Google Analytics inform you about transactions, order values, conversion rate, the total number of orders and in the case of Google Ads campaigns, about conversion bidding of campaigns, ad groups or keywords. It’s an essential part of every ecommerce web analytics. Thanks to having correct data about sales and user behavior you’re able to optimize your Google Ads campaigns, determine the effectiveness of your SEO activities or analyze different sources of traffic to the site.

It’s worth using campaign goals to pick up any possible errors of the ecommerce module and to measure micro-conversion. Goals can be configured so that they provide you with the conversion value data, however, setting up ecommerce tracking provides much more comprehensive information.

In today’s article we’ll spill the beans and present you the easiest ways of implementing ecommerce tracking. Later, this blog post can serve you as a brief which will help your web developers to deploy the changes.

How to turn on conversion tracking in GA?

Let’s assume that Google Analytics is properly implemented on every subpage of your website. You can turn on ecommerce conversion tracking by logging into your Google Analytics account, going to the administration tab in the data column and clicking on ecommerce settings.

Ecommerce settings in google analytics

Then, you’ll be redirected to an ecommerce setup where you need to enable ecommerce. Additionally, you can set up improved ecommerce which provides even more details about transactions, abandoned shopping carts or shopping path analysis. Save the changes.

How to implement ecommerce conversion tracking?

Once ecommerce tracking is enabled, Google Analytics will wait for your website to provide it with information about transactions or products. In order to send such information correctly, you need to implement a special javascript code which will send this dynamic data. For more instructions go to or namely to the ecommerce measurement documentation

When configuring the tag on the site, the web developer should provide transaction and product data. Such data layer should be included on each subpage finalizing the transaction or in some cases, on subpages which precede being redirected to a payment gateway. The code needs to be activated for each transaction and the data layer should be placed at the very top of your website structure, above the Google Tag Manager code.

Transaction data

Variable nameDescriptionValue type
transactionld*Unique transaction IDSequence of signs
transactionAffiliationThe store or affiliationSequence of signs
transactionTotal*The total value of the transactionCurrency
transactionShippingThe total shipping cost of the transactionCurrency
transactionTaxThe total tax cost of the transactionCurrency
transaction ProductsThe list of objects purchased in the transactionTable of objects


Product data

Variable nameDescriptionValue type
name*The name of the productSequence of signs
sku*The SKU code of the productSequence of signs
categoryThe category of the productSequence of signs
price*The price for each productCurrency
quantity*The number of products purchased in the transactionInteger


An exemplary data layer code

window.dataLayer = window.dataLayer || []
'transactionId': '1234',
'transactionAffiliation': 'Acme Clothes',
'transactionTotal': 38.26,
'transactionTax': 1.29,
'transactionShipping': 5,
'transactionProducts': [{
'sku': 'DD44',
'name': 'shirt',
'category': 'Clothes',
'price': 11.99,
'quantity': 1
'sku': 'AA1243544',
'name': 'Socks',
'category': 'Clothes',
'price': 9.99,
'quantity': 2

Data layer for transactions measured in Google Ads

<!-- Event snippet for Konwersja AdWords conversion page -->
gtag('event', 'conversion', {
'send_to': 'AW-xxxxxx/xxxxxxxxxx',
'value': 0.0,
'currency': 'EUR',
'transaction_id': ''

How to check whether ecommerce tracking works properly?

In order to check whether the module has been implemented properly, go through the following stages:

  1. Check your real time orders. Place an order and check if the transaction displays in the REAL TIME tab. The delay shouldn’t take more than a few minutes. If the transaction isn’t shown in real time, wait 15 minutes and see whether it’s been recorded in CONVERSIONS > ecommerce > transactions from today. If the transaction still hasn’t been recorded it may mean that the module doesn’t work properly.
  2. Check data from the previous month. Compare your data from Google Analytics with the sales data in your store. Usually 10% (difference) is the acceptable value of error. If the difference is bigger, it may suggest that the tracking doesn’t work properly.
  3. Compare sales data with your supporting goals. We’d suggest you to create goals such as going to the shopping cart page, taking the last step in the shopping cart before being redirected to a payment gateway or the thank you page. This will help to identify where the error occurred. If the data from the thank you page corresponds to the number of transactions, then you can be sure that ecommerce tracking works properly.

However, if the module is implemented incorrectly, you’ll need to check:

  1. Whether the ecommerce script is called once or several times within the order path.
  2. Whether each payment operator redirects to the site with the ecommerce script installed.
  3. Whether the ecommerce script is called before or after the transaction.
  4. Whether test orders were included.
  5. Whether the ecommerce script has been implemented according to the current Google guidelines.
  6. Whether each subpage enables Google Analytics tracking and whether it’s the latest tracking version.
  7. Whether Google Analytics module in your CMS (if you use one) is up-to-date and has no errors.

Another reason for Google Analytics not tracking your transactions may be various tools which are enabled on your website and block javascripts. Sometimes errors in CMSes effectively prevent the ecommerce script from being called properly. After reading this article and obtaining detailed reports from Google Analytics, a web developer should conduct a special audit to examine this specific area.

To sum up

Properly implemented ecommerce tracking is essential to run a successful online store. Setting up your ecommerce tracking may turn out to be a bit problematic, however, we hope that after reading our article, it’ll be much more straightforward for you. In Delante, as a part of our cooperation with clients, we send proper specifications already at the stage of implementing ecommerce tracking.

Senior SEM Specialist - Adrian

Senior SEM Specialist

SEM specialist since 2009 professionally connected with Internet marketing. He specializes in performance marketing, conversion optimization and data analysis. He gained experience working for both the agency and the client. He is passionate about road cycling and mountain cross-country running.

Leave a Reply

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

Recently on our blog

Are you curious about SEO of online stores or maybe you want to enter the Swiss market and wonder SEO abroad looks like? You will find answers to these questions and many other tips important for the development of your business on our blog.

How to Lose E-commerce Customers in 5 Seconds?

How to Lose E-commerce Customers in 5 Seconds?

Various research clearly indicates that even from 40% to 70% of all online transactions aren’t finalized. Why? Why do you lose your ecommerce customers and why do they choose your market rivals? Keep reading to see how to deter e-commerce customers in a few seconds and what to do to increase the number of purchases finalized in your store.

Read more
Company Website in 2020? 9 Reasons Proving that Your Business Needs This Solution

Company Website in 2020? 9 Reasons Proving that Your Business Needs This Solution

Do you remember that at the turn of the first and second decade of the 21st century marketing specialists believed that the era of websites was coming to an end and they were persuading business owners to “move” their content to Facebook and Instagram? Social media were predicted to take over the legacy and effectiveness of websites. Larger and smaller companies stopped paying for domains and decided to invest in their Facebook profiles. Did they back the wrong horse?

Read more
Content Marketing Isn’t Only About Blogging

Content Marketing Isn’t Only About Blogging

As reported by Content Marketing Institute, as many as 88% of B2B marketers benefit from various content marketing activities to a certain extent but only 6% perceive this form of brand promotion as effective. Where does this big discrepancy come from? One of the main reasons standing behind this state of affairs is the scope of implemented content marketing activities limited to only one form such as company blogging. And after all, content marketing has much more to offer!

Read more