GA4 eCommerce: How to Set Up GA4 Ecommerce Data With Enhanced Dimensions and Metrics

By: | July 21, 2023 | Tags: |
GA4 eCommerce

By reading this post, you will discover the game-changing potential of GA4 eCommerce, revolutionizing online businesses with its advanced analytics and customer insights!

It’s no secret that ecommerce is the backbone of modern retail, with an astonishing 81% of US consumers making an online purchase in the past year.

And it’s easy to see why, given the low overhead costs, seamless shopping experience, and the swift ability of brands to meet the ever-changing needs of customers. But what if there was a way to extract even more insightful data to improve your ecommerce bottom line? 

Good news, there is. And if you’re keen on understanding your customer behaviors and boosting your ecommerce platform’s performance using advanced analytics, you’ve landed in the right place.

For years, Google’s Universal Analytics has been an absolute must-have tool for marketers seeking comprehensive insights into their customers. However, as of July 1, 2023, Universal Analytics is bowing out for good, making way for the more advanced and feature-rich Google Analytics 4 (GA4).

However, the transition from Universal Analytics to GA4 may require a learning curve, particularly in understanding how to set up and interpret the new event-based model.

So without further ado, let’s dive into how to set up GA4 ecommerce data, focusing on enhanced dimensions and metrics to improve conversion rates.

What’s new and different about GA4?

GA4 ecommerce is a powerful analytics tool that offers advanced tracking and measurement capabilities for ecommerce websites. It helps simplify the tracking of ecommerce events through a simple snippet of code. 

The best part? It can capture user events across multiple platforms. For instance, once you’ve implemented GA4 ecommerce, you can measure any of the following ecommerce actions:

  • The addition or removal of a product from a shopping cart
  • When a user begins the checkout process
  • Applying promotional code at checkout
  • Any item selected from a list
  • Details on viewed items
  • Purchases and refunds

And the idea behind GA4 ecommerce is that it has better integration with other marketing and advertising tools to provide detailed reports on customer behavior and preferences for actionable insights.

So what does the “new and improved” GA4 offer that Universal Analytics doesn’t? Here are the quick and fast differences between Universal Analytics and GA4:

FeatureUniversal AnalyticsGA4
Data Collection and ProcessingUses sessions and hits (pageviews, events) as its primary data model.Event-driven. Captures data as a stream of events with parameters, providing more granular insights for ecommerce.
User-Centric ReportsPrimarily focuses on sessions.Provides a holistic view of customer interactions across devices and platforms.
Ecommerce ReportingEcommerce data is divided into standard ecommerce (basic transaction and product data) and enhanced ecommerce (additional info like product impressions, promotions, and user actions).Combines these data types and allows for more customized, flexible, and detailed reporting.
Predictive MetricsDoesn’t provide predictive metrics.Introduces predictive metrics, like potential revenue from a group of customers or the likelihood of customers to ‌churn.
Integration with Google AdsCan integrate with Google Ads.Allows for more refined audience creation and targeting.

In short, GA4 offers a more user-centric, event-based model that provides more comprehensive and flexible reporting options. This, coupled with predictive metrics and enhanced integration with Google Ads, makes it a powerful tool for understanding your customer’s shopping experience.

With the background out of the way, let’s dive into how to set up some of these new ecommerce tracking features. 

Before you start

Make sure you’ve successfully implemented the Google tag on your website and that you have access to both Analytics and the source code of your site.

Are you ready to revolutionize your online business with the power of GA4 eCommerce, unlocking new insights and boosting your sales to unprecedented heights?

Step 1: Create a GA4 property

If you haven’t done so already, you’ll need to create a new GA4 property in Google Analytics. 

Here’s how:

  1. Sign in to Google Analytics
  2. Hover your mouse over the gear icon, click ‘Admin’, and choose the account where you want to create the property
  3. Click the blue ‘Create Property’ button
How to create GA4 property.

Screenshot by Kelly Moser

  1. Enter a name for the new property
Create a GA4 property.

Screenshot by Kelly Moser

  1. Select the reporting time zone and currency
  2. Click ‘Next’
  3. Select an industry category and choose a business size
  4. Click ‘Next’
  5. Choose your business objectives
GA4 business objectives.

Screenshot by Kelly Moser

  1. Click ‘Create’

Step 2: Add a data stream

  1. Select your property and click ‘Data Streams’
Create a GA4 datastream.

Screenshot by Kelly Moser

  1. Choose your desired source (iOS app, Android app, Web)
Data stream sources.

Screenshot by Kelly Moser

  1. Type in the URL of your website and give it a Stream name for easy reference
  2. GA4 has a feature called Enhanced Measurement, which automatically collects certain types of engagement data like page views, scrolls, outbound clicks, etc. Make sure the toggle is turned on.
GA4 web stream details.

Screenshot by Kelly Moser

  1. Click the ‘Create stream’ button

Step 3: Set up data collection for your website

To start pulling in real-time data into your new Google Analytics 4 property, you’ll need to follow one of these steps to install the global site tag (gtag.js).

  • Add the Google tag to a CMS-hosted website or website builder
    • Note: Most CMSs have native integrations with GA4. All you need to do is copy your Google tag ID and paste it into the Google Analytics field in your CMS.
    • You can follow these instructions for Shopify, Wix, and WooCommerce
  • Add the Google tag directly to your HTML code

This advanced Google tag comes with new capabilities to help you achieve more and improve data quality without additional code. To find your Google tag, navigate to your newly created data stream.

Scroll to the bottom of the page, and you’ll find three options for your Google tag:

  • Configure tag settings
  • Managed connected site tags
  • View tag instructions

For adding to a CMS, choose the configure tag settings option. 

Configure tag settings.

Screenshot by Kelly Moser

Within this field, you’ll also be able to see specific instructions for your website (use the scan URL feature for simplicity) and confirm once it’s added properly.

Google tag instructions.

Screenshot by Kelly Moser

Step 4: Set up an ecommerce event

To gather ecommerce data, you need to integrate ecommerce events into your website, app, or Google Tag Manager container. 

These events need extra context to provide meaningful information. That’s why they don’t send it automatically. Sigh. After creating these events, and as users interact with your website or app, you’ll begin to see ecommerce data in your Analytics reports. 

Ecommerce reports in GA4.

Screenshot by Kelly Moser

Place an ecommerce event in your data layer

So how do you get this data to appear in Google Analytics 4? You need to build a data layer.

This step can be quite technical and often requires a developer’s help. Plus, the process will vary depending on your ecommerce platform. Always check Google’s official documentation on the GA4 ecommerce events and their parameters to implement the code correctly.

Out of all the events, the most popular (and important) metric is the “Make purchases or refunds.”

How to implement ecommerce enhanced tracking. GA4 eCommerce

Screenshot by Kelly Moser

When selecting this option in the Google documentation, here’s an example of the data layer format you need to implement:

Example code for how to track making a purchase in GA4.

Screenshot by Kelly Moser

Although this piece of code may seem complicated, focus on each line individually. For instance, we can see the transaction ID, order value, tax, shipping cost, currency, and coupon codes among the other items arrays for this order.

Use this code snippet as a template to guide you in what kind of information you need to implement Google Analytics 4 ecommerce tracking. Finally, what do you do with this code?

Well, you need to add it to your website. You can do this in a variety of ways: 

  • You can do it yourself by manually copying the code and adding it directly into your backend. Note that this is the most complicated and error-prone approach.
  • If you have a custom ecommerce website, you can ask your developer to implement your data layers for you. This is the ideal approach ‌if you don’t want to touch the development side with a ten-foot pole.
  • Use a Plugin or native integration to do the heavy lifting for you. Google Tag Manager for WordPress offers a quick and painless way to track enhanced ecommerce metrics. Note that this option is only available for certain platforms like WooCommerce.

Create a Google Analytics 4 Configuration tag

The GA4 Configuration tag loads your ecommerce data in your Google Analytics 4 property by: 

  • Establishing the settings for your GA4 tags
  • Creating Google Analytics cookies
  • Automatically collecting and sending enhanced measurement events
Google Tag Manager and GA4 data flow.

(Image Source)

Step 1: Create the GA4 configuration tag

To create a new tag, open your Google Tag Manager:

  1. Click create a new tag
  2. Give your tag a name
  3. Choose ‘Google Analytics: GA4 Configuration’ in the Tag Configuration box
  4. Configure your tag by entering your ‘G-’ ID in the field titled ‘Measurement ID’
  5. Make sure the ‘Send a page view event when this configuration loads’ option is checked to automatically send pageview events.

You can also include additional settings if you want:

  • Server-side tagging: Choose this to send all GA4 events to a Tag Manager server container instead of Google Analytics. Provide the URL of your Tag Manager server container.
  • Parameters: Add any parameters you want to configure in ‘Fields to Set.’
  • Custom properties: Add any custom user properties that you want to configure in ‘User Properties.’

Step 2: Create a trigger

  1. Set up a trigger to load the Google Analytics: GA4 Configuration when someone visits your website.
  2. To make sure the GA4 Configuration tag is activated before other triggers, use the ‘Initialization – All pages’ trigger.
  3. Save the tag configuration​​.
Setting up a trigger in GA4.

(Image Source)

Step 3: Verify that your tag works

  1. Click ‘Preview’ in Google Tag Manager to open Tag Assistant
  2. Enter your website’s URL
  3. Check if the Google Analytics: GA4 Configuration was activated when the page loaded
    • If your tag works properly, the Tag Assistant interface will show it
    • If your tag does not appear, check your tag’s trigger settings
  4. Close Preview mode when you’re done
  5. Click ‘Submit’ in your Workspace to publish your changes​
Confirming a tag in GA4.

(Image Source)

Create a Google Analytics 4 Event tag

An event helps you track particular actions on your ecommerce website or app. These event tags can help you determine when a visitor opens a page, clicks on a link, or makes a purchase.

Here’s a simplified version of the steps to create a Google Analytics 4 Event tag for an event:

  1. Open Google Analytics
  2. Click on Data Streams
  3. In the web stream details, choose the ‘Create custom events’ option
GA4 web stream details for custom event.

Screenshot by Kelly Moser

  1. Click ‘Create’
  2. Enter the name of the event (for example, “view_item_list”) in the ‘Custom event name’ field
Creating a custom event in GA4.

Screenshot by Kelly Moser

  1. For each event-level parameter, add a condition
  2. Enter a name for all your event parameters
  3. Choose your desired operator and value
  4. Add any desired modifications
  5. Finally, save and create the event

Step 5: Verify your configuration

After creating your desired ecommerce event, it’s important to verify that your data is flowing properly into your GA4 reports.

  1. Go to the ‘Realtime’ section in your GA4 property
Realtime event reports GA4.

Screenshot by Kelly Moser

  1. Click on ‘Events’
  2. Perform the actions on your website that trigger the events (e.g., make a purchase)
  3. Check that the events appear in the ‘Realtime’ section
  4. Don’t forget to check your ‘Events’ report after a few days to see double check that fresh data is populating into your newly created event name
GA4 event report.

Screenshot by Kelly Moser

Wrapping Up: GA4 eCommerce

Don’t let the daunting task of setting up GA4 ecommerce data with enhanced dimensions and metrics prevent you from unlocking the invaluable data that it provides about your users’ shopping behaviors.

With these careful step-by-step instructions, it’s a manageable process. And if you ever get stuck, Google provides plenty of ecommerce documentation and walk-through videos for your easy reference.

Remember, each metric plays a pivotal role in painting a comprehensive picture of your ecommerce performance. So embrace this robust analytics tool, and let data-driven decision-making guide your ecommerce business to greater heights.

Readers, please share this guide to setting up GA4 for GA4 eCommerce success.

About the author

Kelly Moser is the co-founder and editor at Home & Jet, a digital magazine for the modern era. She’s also an expert in freelance writing and content marketing for SaaS, Fintech, and ecommerce startups. 

​​

Would you like to share your thoughts?

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Instagram
Pinterest
fb-share-icon
LinkedIn
Share
%d bloggers like this: