2023 marked the biggest change in the history of marketing analytics: Google’s full migration to their new version of Google Analytics, GA4. The change meant a steep learning curve as marketers figured out the new platform. Here’s what you need to know about leveraging GA4 to track behavior on your ecommerce store.
What is Google Analytics 4?
Google Analytics 4 (GA4) is the latest version of Google Analytics, a free website analytics tool provided by Google. GA4 officially replaced the previous version of Google Analytics, Universal Analytics, in July 2023.
GA4 was more than just a software update. Relative to Universal Analytics, GA4 introduced an entirely new interface, tracking code snippet, and underlying data model.
Why did Google do this? The previous version of Google Analytics was based on software created in 2005, well before the boom in web apps and ecommerce. Universal Analytics eventually added ecommerce tracking, but it was an afterthought, not the main feature.
So while GA4 can be difficult to learn, it has ecommerce tracking at its core.
Google Analytics 4 vs. Universal Analytics ecommerce tracking
GA4 and Universal Analytics (UA) ecommerce tracking differ in three key ways:
Configuration
In UA, ecommerce was an optional, additional setting. A standard UA account would not include any reports or settings for ecommerce.
By default, UA tracked simple form fills. To enable ecommerce, UA users went to “Ecommerce Settings” in their “Admin” panel. There, they could enable general ecommerce tracking, enhanced ecommerce (unlocking additional reports), and funnel tracking by manually adding their funnel.
IN GA4, there is no “Ecommerce Settings” section to enable in the “Admin” panel. Ecommerce reporting appears by default in the “Monetization” section of “Reports,” and it will ingest ecommerce events as soon as the Google Analytics property receives them.
Event tracking
Overall, GA4 and UA track a very similar set of ecommerce activities. For example, they both track product clicks, add-to-carts, checkouts, and purchases. However, they frame these events differently.
UA used the language of “products.” In ecommerce reports in UA, you would see reports on “Product Revenue,” “Product Category,” and more. GA4 uses the language of “item” instead of products; for example, “Item Revenue,” “Item Category,” and “Item Name.”
GA4 doesn’t assume that products are the only thing someone can buy online. Today, someone could also buy a service, membership, or app upgrade online, so this naming convention allows for that. But ultimately, for ecommerce stores, it functions the same.
Google has created a quick reference guide for the GA4 equivalents of all its UA ecommerce events.
Reporting
In UA, all ecommerce reporting occurred within the “Ecommerce” tab under “Conversions.” There were over a dozen premade reports, not designed for customization.
In GA4, the main ecommerce report lives within the “Monetization Reports,” called “Ecommerce purchases.” However, GA4 encourages users to build additional reports in the Explore tab for ecommerce reporting.
GA4 offers a funnel exploration template for shopping behavior analysis and has provided instructions for creating a typical ecommerce funnel.
How to set up ecommerce tracking in Google Analytics 4
Ecommerce events (like a purchase event) require important context, such as product price and category, to be meaningful. So Google Analytics does not track ecommerce events by default. Instead, you must send ecommerce events to GA4 via an integration with your CMS or a custom tracking setup. Here’s how:
CMS integration
Some content management systems (CMS) now offer an automated, one-click solution for setting up GA4 ecommerce tracking. Shopify was the first to do this, and GA4 ecommerce tracking comes with any Shopify plan. Below are the steps to set up GA4 on Shopify, which are likely similar to other stores:
1. Create a Google Analytics 4 property at analytics.google.com. You will need to have a personal Google Account to create it. Name the property after your website. If you have multiple domains (for example, .com, .ca, and .co.uk), create one property for each site under the same account.
2. Log into Shopify and install the Google & YouTube Sales channel:
3. Connect your Google account:
4. In the dropdown for GA4, select the property that you created:
Shopify will then begin sharing your data with GA4.
Note that Shopify’s GA4 integration doesn’t track every possible ecommerce event, only the most common ones. Here are the events Shopify sends by default:
- Page_view. A customer visited a page on your online store
- Search. A customer searched for a product on your online store
- View_item. A customer viewed a product on your online store
- Add_to_cart. A customer added a product to their cart
- Begin_checkout. A customer started the checkout process
- Add_payment_info. A customer successfully entered payment information
- Purchase. A customer completed their checkout
Here are examples of other events for ecommerce that Shopify does not send via its integration:
- Remove_from_cart
- View_cart
- Refund
To collect ecommerce data related to these events in GA4, you need to customize your site’s codebase or tag manager.
Custom tracking
If your CMS doesn’t have an integration with GA4, or if your store has a highly bespoke ecommerce experience, you will need to implement ecommerce tracking for GA4 with custom code. Custom tracking requires an understanding of HTML and JavaScript and should involve a web developer. There are three steps to custom ecommerce tracking:
- Define your events and parameters. Reference Google’s list of recommended events for online sales to decide which events are relevant to your website. The most important events are “view_item,” “add_to_cart,” “begin_checkout,” and “purchase,” as these populate GA4’s default Ecommerce purchases report. For each event, you’ll need to define the parameters that go alongside the event, such as the product’s name, price, and payment method. Some event parameters are mandatory, and some are optional for ecommerce—Google provides full documentation on defining your ecommerce parameters.
- Implement code for each event. You’ll need to insert custom code in your website wherever you want to fire an event. For example, for “add_to_cart,” the code should fire whenever an item gets added to a cart.
- Decide whether to use gtag or Google Tag Manager—the two ways to fire event code. Google tag (“gtag”) code sends the event directly to GA4. Google Tag Manager reads the code after your website sends the event to the data layer, then sends it to GA4. For websites that only track ecommerce through GA4, gtag is likely best. Google Tag Manager is best for websites that track ecommerce parallel in other places, such as Google Ads, Meta, or Heap, because it can send the data to other platforms.
- Lastly, test and iterate. Custom tracking can be tricky to implement—it is rarely perfect from the start. Review your data in GA4 and compare it to your sales records. In a good custom tracking implementation, the two data sets should be no more than 10% different in total purchases in a given week. If they’re further apart, your code may need further quality assurance (QA).
Google Analytics 4 ecommerce tracking FAQs
Can you track multiple ecommerce events with Google Analytics 4?
Yes. GA4 allows for a robust set of ecommerce-related events, from purchase events to add-to-carts to product page views.
What are the limitations of GA4?
GA4 can take in a wide variety of data—with custom events, it has few limits in the types of data it can track. However, GA4 is currently limited in building custom reports to align different data types. For example, building a report showing revenue by landing page is not currently possible.
Does Shopify automatically track ecommerce events?
Yes, Shopify offers a simple GA4 integration that automatically tracks the following key ecommerce behaviors: page views, site searches, product views, add-to-carts, checkouts, adding payment info, and purchases.