GA4 eCommerce tracking involves monitoring all events related to a purchase, from view_item (when a product page is opened) to purchase (when the purchase is completed).
Either the developer or, more often, a plugin will send the information to the dataLayer using the push method, always based on the standards defined by Google.
In Google Tag Manager, we create the appropriate TAGS so that GTM can send information to GA4 or ad platforms for each eCommerce event.
On a typical website, the most common events we track to feed the advertising platform we use are of the LEAD type. A visitor fills out a contact form, expresses interest, subscribes to a newsletter, and transforms from a simple visitor to a LEAD.
In eShops, however, the visitor makes a purchase and thus becomes a CUSTOMER. This is the primary goal of every company engaged in eCommerce. GA4 eCommerce tracking provides the solution here.
Who sets the standards for eCommerce Tracking?
The standards are set by Google.
- Official Google Documentation – GA4 Recommended events
- Official Google Documentation – Measure eCommerce (Specifications)
The above pages serve as the guide for implementing any project related to GA4 eCommerce Tracking.
One of the most interesting analyses written on this topic can be found on Simo Ahava’s blog: GOOGLE ANALYTICS 4: ECOMMERCE GUIDE FOR GOOGLE TAG MANAGER
Where can I see some reports to understand the usefulness of eCommerce Tracking?
Google offers detailed documentation and a demo account:
- Official Google Documentation – GA4 Monetisation reports
- Demo account – detailed instructions can be found here
Looking for a Course?
Knowcrunch offers a comprehensive Masterclass in Google Tag Manager, covering all aspects of GTM with detailed references to GA4 eCommerce Tracking.
Where is the information stored so that it is available in Google Tag Manager?
In the dataLayer, obviously.
When we are on a product page, the Data Layer knows which product we are viewing, its price, and other characteristics (color, weight, size, etc.). This information is stored in a complex JavaScript object.
Once the Data Layer acquires the appropriate information, Google Tag Manager uses it in the way it knows best, sending it to services like Google Analytics, Facebook, etc., with the ultimate goal most often being the optimization of an advertising campaign.
What changes are needed in Google Tag Manager?
In most cases, a basic tag is sufficient (regardless of which eCommerce platform we use):
![GA4 eCommerce Tracking Basic tag](https://www.pontikis.gr/wp-content/uploads/2024/06/ga4-ecommerce-tracking-basic-tag.png)
The trigger has the form:
![GA4 eCommerce Tracking Basic trigger](https://www.pontikis.gr/wp-content/uploads/2024/06/ga4-ecommerce-tracking-basic-trigger.png)
Here, with regex matching, we cover all events that “contain” a word between the slashes.
For greater accuracy, we use anchors ^ and $
^(select_promotion|view_promotion|begin_checkout|add_to_wishlist|view_cart|remove_from_cart|add_to_cart|view_item|select_item|view_item_list|purchase|add_payment_info|add_shipping_info)$
For the tag to work, it is necessary that some plugin has sent the information to the dataLayer as specified by Google’s specs.
Below are basic instructions for each platform.
Woocommerce
Here we will use the GTM4WP WordPress plugin by Thomas Geiger. This is an excellent and very popular free plugin that, in addition to installing GTM, offers (among other things) full integration with Woocommerce.
A detailed guide is available here.
Magento
The recommended method is to install a commercial plugin.
- Anowave: Magento 2 Google Tag Manager Enhanced Ecommerce (GA4) Tracking
- Weltpixel: Google Analytics 4 (GA4) With GTM Support for Magento 2
Shopify
The recommended method is to install an app from the Shopify Store.
- Easy Tag ‑ GTM & Data Layer
- Conversios Google Analytics 4
- Conversios GA4 & Ads Tracking
- Analyzify (GA4 & Ads Tracking)
- GroPulse GTM & Data Layer
How will I know that the process has been successfully completed?
The process is indeed complex and requires thorough testing, which should never be skipped.
At the very least, we need to perform a complete purchase cycle of a product using the PREVIEW mode and check that:
- The events and TAGS are fired correctly.
- The correct information exists in the dataLayer, comparing it with the page we are viewing (for example, if we have a product in the cart, it should be visible in the dataLayer).
- Google Analytics receives the event and the additional parameters (using Admin → Debug View).
Why is GA4 eCommerce Tracking fundamental for Digital Marketing?
- Because it provides the information needed to create Monetisation Reports.
- Because it defines the events based on which we can send information to advertising platforms.
- Because it offers information that can be used by third-party platforms (e.g., Criteo) and sets the standards for the purchase process.
Looking for a Course?
Knowcrunch offers a comprehensive Masterclass in Google Tag Manager, covering all aspects of GTM with detailed references to GA4 eCommerce Tracking.
Credits
Image source: Google Demo Account – Google Analytics 4 property: Google Merchandise Store (web data)