Table of Contents
If your site involves ecommerce, there are metrics you want to use beyond general website traffic to make informed business decisions.
Luckily, Google Analytics 4 has powerful analytics abilities to collect a variety of ecommerce metrics for your site. Because not all sites have ecommerce data, GA4 does not automatically track it. Instead, you must set up ecommerce tracking manually.
This guide will provide you with information on what ecommerce data you can track in Google Analytics 4 and how to easily set up ecommerce tracking for your site.
What Ecommerce Events Can Google Analytics 4 Track?
GA4 can track many kinds of ecommerce events, including:
- Viewing an item
- Adding an item to cart
- Removing an item from cart
- Making a purchase
- Applying a promotion
- Item revenue
How To Set Up Ecommerce Tracking in Google Analytics 4
If your site uses a common CMS or payment platform, such as Shopify, WooCommerce, or Stripe, they often have instructions or integrations that allow you to set up GA4 ecommerce tracking. We’ve included a brief overview for these three platforms below, as well as how to implement GA4 tracking on your site when not using one of these tools.
Shopify
Shopify has an easy ecommerce integration system using the Google & Youtube Channel app and adding the Google Tag ID to your Shopify admin page. After setting up GA4 tracking, Shopify will track ecommerce events automatically using the Google Channel app. Here is Shopify’s full documentation on how to set this up for your site.
WooCommerce
Similar to Shopify, WooCommerce (used with WordPress) makes GA4 setup simple with a custom Google Analytics integration. After setting up GA4 tracking, WooCommerce will track several events, such as product detail views, which track which items a user viewed the full description of. Here are step-by-step instructions for setup straight from WooCommerce.
Stripe
Unlike Shopify and WooCommerce, Stripe does not have a built-in GA4 integration. Instead, it provides code for developers to add to the site to send data to GA4. Once properly configured, Stripe will track a conversion funnel, allowing you to analyze the purchase journey of site users. See here for full documentation explaining how to add Stripe data to GA4.
Google Tag Manager
If you aren’t using one of the tools above or something similar, you can follow these steps to set up e-commerce tracking using Google Tag Manager and your site’s data layer.
Step 1: Add ecommerce tracking to data layer
GA4 documentation contains ecommerce tracking code that needs to be added to your site’s data layer (found in the source code). Your site developer should implement these tracking events on your site.
Step 2: Confirm that data layer events are tracking using Google Tag Assistant
Use the Google Tag Assistant to ensure that the ecommerce events you have added to your site’s source code (such as view_item, add_to_cart, and purchase) are firing correctly and include necessary data, such as the correct item name, category, quantity, and price.
Step 3: Add ecommerce events as GA4 tags to Google Tag Manager
Create a new GA4 event tag in Google Tag Manager and select a GA4 configuration tag. Enter your recommended event name and select “Send Ecommerce Data” (located under More Settings).
Next, build a trigger for the GA4 event based on the data layer events you have already established. Select a custom event, and enter your data layer event name under “Event name.” Name your trigger and save it.
After successfully creating your trigger, save your GA4 Event Tag and repeat for each additional ecommerce event you want to create.
Step 4: Use DebugView in GA4 to ensure that Google Tag Manager Events are tracking
Use GA4’s DebugView mode, which can be found in Admin under Data Display. Using preview mode in Google Tag Manager, check that event names are triggering in GA4 and that the item details contain the correct information.
Analyzing Ecommerce Tracking in Google Analytics 4
Once you have ecommerce tracking set up, you can analyze your ecommerce data. Click on reports, then monetization, then ecommerce purchases to see a breakdown of items on your site.
You can also click on “Purchase journey” to see the path of users making purchases on your site. This can provide insight into which parts of your site might need improvement to ensure users complete their purchases.
For additional reporting needs, you can use ecommerce data in custom reports. Click on the explore tab and create a new exploration where you can add custom dimensions and metrics. Add your data by clicking the ecommerce section under either dimensions or metrics.
Conclusion
Tracking ecommerce data is crucial for making informed business decisions and optimizing the performance of your online store. GA4 provides robust tools to capture a variety of ecommerce events, and setting up your website to track ecommerce events in GA4 will allow you and your team to leverage these insights, enabling you to understand your customers’ purchase journeys better, identify areas for improvement, and ultimately drive more sales.
Search News Straight To Your Inbox
*Required
Join thousands of marketers to get the best search news in under 5 minutes. Get resources, tips and more with The Splash newsletter: