Get Started Get Started

Setting Up Google Analytics 4 E-commerce Tracking

As Google introduced the new generation of Google Analytics which is called Google Analytics 4, and will 'sunset' the old version (Universal Analytics), Oncord has now removed the support for Universal Analytics e-commerce tracking to avoid potential technical issues.

Therefore, it's important to make the move over to Google Analytics 4 as soon as possible to be able to enable the new e-commerce tracking function. 

This article will instruct you how to set up Google Analytics 4 e-commerce tracking via:

Google Tag (gtag.js) 
Google Tag Manager

Note: You can either use Google Tag (gtag.js) or Google Tag Manager to install Google Analytics 4 into your Oncord site. Please go to our help article to know how to install Google Tag Manager and Google Tag (gtag.js) tracking code into Oncord.

If you are Using Google Tag (gtag.js)

If you've installed Google Tag (gtag.js) properly on your site, Google Analytics 4 will automatically record an event called "purchase" every time when there is an order has been made in your online store. 

The event "purchase" is marked as a conversion as default in Google Analytics 4, and you can see the configuration of the conversions by navigating to:
Your Google Analytics 4 Account > Configure > Conversions

If you are Using Google Tag Manager

To get started, please make sure the Google Tag Manager tag has been installed on your site properly. 

Step One: Create GA4 Configuration Tag 

Sign in to your Google Tag Manager Account.
Click the container name that you want to configure.
Within "Workspace", click the "Tags" tab in the left-hand column.
Click the "New" button to create a new tag.
Rename the new tag as "GA4 Configuration Tag", and then click the "Tag Configuration" box.
Select the "Google Analytics: GA4 Configuration" option from the right-hand list.
Enter your Google Analytics 4 Measurement id into the "Measurement id" field*

Click the "Triggering" box to configure a trigger for this tag.
Select the "All Pages" option from the list.
Click the "Save" button at the top-right of the page.


*
To get your Google Analytics 4 Measurement id:

Sign in to your Google Analytics Account.
Click "Admin" at the bottom left of the window.
In the "Property" column, click "Data streams".
Click the current web data stream that you want to configure.
In the "Stream details" box, click the copy button next to the "MEASUREMENT ID" heading.

Step Two: Create GA4 E-commerce Event Trigger

Within "Workspace" in the Google Tag Manager, click the "Triggers" tab in the left-hand column.
Click the "New" button to create a new trigger.
Rename the new trigger as "GA4 E-commerce Event", and then click the "Trigger Configuration" box.
Select the "Custom Event" option from the right-hand list.
Enter "purchase" into the "Event name" field.
Click the "Save" button at the top-right of the page.



Step Three: Create GA4 E-commerce Tag

Within "Workspace", click the "Tags" tab in the left-hand column.
Rename the new tag as "GA4 E-commerce Tag", and then click the "Tag Configuration" box.
Select the "Google Analytics: GA4 Event" option from the right-hand list.
Under the "Configuration Tag" heading, select the "GA4 Configuration Tag" in the drop-down menu.
Enter "purchase" into the "Event Name" field.
Click "More Settings".
Tick the "Send Ecommerce data" option under the "Ecommerce" heading.
Make sure the "Data Layer" is selected for the "Data source".

Click the "Triggering" box to configure a trigger for this tag.
Select the "GA4 E-commerce Event" option from the list.
Click the "Save" button at the top-right of the page.



Note: Don't forget to submit and publish the changes when you've finished the configuration in Google Tag Manager.

View the Results

To see the conversion data report, navigate to:
Your Google Analytics 4 Account > Reports > Engagement > Conversions


To view the e-commerce data report, navigate to:
Your Google Analytics 4 Account > Reports > Monetisation > Monetisation Overview

Note: It may take up to 48 hours to update the conversions data on your report page.