Skip to Content
Shopify logo
  • By business model
    • B2C for enterprise
    • B2B for enterprise
    • Retail for enterprise
    By ways to build
    • Platform overview
    • Modular commerce
    • Shop Component
    By outcome
    • Growth solutions
    • Shopify
      Platform for entrepreneurs & SMBs
    • Plus
      A commerce solution for growing digital brands
    • Enterprise
      Solutions for the world’s largest brands
  • Customer Stories
    • Everlane
      Shop Pay speeds up checkout and boosts conversions
    • Brooklinen
      Scales their wholesale business
    • ButcherBox
      Goes Headless
    • Arhaus
      Journey from a complex custom build to Shopify
    • Ruggable
      Customizes Headless ecommerce to scale with Shopify
    • Carrier
      Launches ecommerce sites 90% faster at 10% of the cost on Shopify
    • Dollar Shave Club
      Migrates from a homegrown platform and cuts tech spend by 40%
    • Lull
      25% Savings Story
    • Allbirds
      Omnichannel conversion soars
    • Shopify
      Platform for entrepreneurs & SMBs
    • Plus
      A commerce solution for growing digital brands
    • Enterprise
      Solutions for the world’s largest brands
  • Why trust us
    • Leader in the 2024 Forrester Wave™: Commerce Solutions for B2B
    • 2024 Gartner Magic Quadrant for Digital Commerce
    • Leader in the 2024 IDC B2C Commerce MarketScape vendor evaluation
    What we care about
    • Shop Component Guide
    • Shopify TCO Calculator
    • Principals of a Modern Commerce OS
    • Mastering Global Trade: How Integrated Technology Drives Cross-Border Success
    How we support you
    • Premium Support
    • Help Documentation
    • Professional Services
    • Technology Partners
    • Partner Solutions
    • Shopify
      Platform for entrepreneurs & SMBs
    • Plus
      A commerce solution for growing digital brands
    • Enterprise
      Solutions for the world’s largest brands
  • Latest Innovations
    • Editions - June 2024
    Tools & Integrations
    • Integrations
    • Hydrogen
    Support & Resources
    • Shopify Developers
    • Documentation
    • Help Center
    • Changelog
    • Shopify
      Platform for entrepreneurs & SMBs
    • Plus
      A commerce solution for growing digital brands
    • Enterprise
      Solutions for the world’s largest brands
  • Get in touch
  • Get in touch
Shopify logo
  • Blog
  • Enterprise ecommerce
  • Total cost of ownership (TCO)
  • Migrations
  • B2B Ecommerce
    • Headless commerce
    • Announcements
    • Unified Commerce
    • See All topics
Search
Type something you're looking for
Log in
Get in touch

Powering commerce at scale

Speak with our team on how to bring Shopify into your tech stack

Get in touch
blog|Business Intelligence

Google Analytics 4 Ecommerce Tracking: How To Use It

Ecommerce tracking in Google Analytics 4 can seem complicated, but it doesn’t need to be. Here are the basics to setting up your tracking.

by Michael Keenan
On this page
On this page
  • What is Google Analytics 4?
  • Google Analytics 4 vs. Universal Analytics ecommerce tracking
  • How to set up ecommerce tracking in Google Analytics 4
  • Google Analytics 4 ecommerce tracking FAQs

The platform built for future-proofing

Get in touch

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.

Click here to talk with sales about Shopify plans for enterprises

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

  • Configuration
  • Event tracking
  • Reporting

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.

GA-UA Ecommerce Settings

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. 

GA4 Funnel Analysis Template

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:

  1. 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.
  2. 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. 
  3. 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.
  4. 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.

by Michael Keenan
Published on Aug 30, 2024
Share article
  • Facebook
  • Twitter
  • LinkedIn
by Michael Keenan
Published on Aug 30, 2024

The latest in commerce

Get news, trends, and strategies for unlocking new growth.

By entering your email, you agree to receive marketing emails from Shopify.

popular posts

Enterprise commerceHow to Choose an Enterprise Ecommerce Platform for Your Scaling StoreTCOHow to Calculate Total Cost of Ownership for Enterprise SoftwareMigrationsEcommerce Replatforming: A Step-by-Step Guide To MigrationB2B EcommerceWhat Is B2B Ecommerce? Types + Examples
start-free-trial

Unified commerce for the world's most ambitious brands

Learn More

popular posts

Direct to consumer (DTC)The Complete Guide to Direct-to-Consumer (DTC) Marketing (2025)Tips and strategiesEcommerce Personalization: Benefits, Examples, and 7 Tactics for 2025Unified commerceHow To Sell on Multiple Channels Without the Logistical Headache (2025)Enterprise ecommerceComposable Commerce: What It Means and Is It Right for You?

popular posts

Enterprise commerce
How to Choose an Enterprise Ecommerce Platform for Your Scaling Store

TCO
How to Calculate Total Cost of Ownership for Enterprise Software

Migrations
Ecommerce Replatforming: A Step-by-Step Guide To Migration

B2B Ecommerce
What Is B2B Ecommerce? Types + Examples

Direct to consumer (DTC)
The Complete Guide to Direct-to-Consumer (DTC) Marketing (2025)

Tips and strategies
Ecommerce Personalization: Benefits, Examples, and 7 Tactics for 2025

Unified commerce
How To Sell on Multiple Channels Without the Logistical Headache (2025)

Enterprise ecommerce
Composable Commerce: What It Means and Is It Right for You?

subscription banner
The latest in commerce

Get news, trends, and strategies for unlocking unprecedented growth.

Unsubscribe anytime. By entering your email, you agree to receive marketing emails from Shopify.

Popular

Headless commerce
What Is Headless Commerce: A Complete Guide for 2025

Aug 29, 2023

Growth strategies
How To Increase Conversion Rate: 14 Tactics for 2025

Oct 5, 2023

Growth strategies
7 Effective Discount Pricing Strategies to Increase Sales (2025)

Ecommerce Operations Logistics
What Is a 3PL? How To Choose a Provider in 2025

Ecommerce Operations Logistics
Ecommerce Returns: Average Return Rate and How to Reduce It

Industry Insights and Trends
Global Ecommerce Statistics: Trends to Guide Your Store in 2025

Customer Experience
Fashion Brand Storytelling Examples to Inspire You

Mar 24, 2023

Growth strategies
SEO Product Descriptions: 7 Tips To Optimize Your Product Pages

Powering commerce at scale

Speak with our team on how to bring Shopify into your tech stack.

Get in touch
Shopify logo

Shopify

  • About
  • Careers
  • Investors
  • Press and Media
  • Partners
  • Affiliates
  • Legal
  • Service status

Support

  • Merchant Support
  • Shopify Help Center
  • Hire a Partner
  • Shopify Academy
  • Shopify Community

Developers

  • Shopify.dev
  • API Documentation
  • Dev Degree

Products

  • Shop
  • Shop Pay
  • Shopify Plus
  • Shopify Fulfillment Network
  • Linkpop
  • Shopify for Enterprise

Global Impact

  • Sustainability
  • Build Black
  • Research

Solutions

  • Online Store Builder
  • Website Builder
  • Ecommerce Website
  • Australia
    English
  • Canada
    English
  • Hong Kong SAR
    English
  • Indonesia
    English
  • Ireland
    English
  • Malaysia
    English
  • New Zealand
    English
  • Nigeria
    English
  • Philippines
    English
  • Singapore
    English
  • South Africa
    English
  • UK
    English

Choose a region & language

  • Australia
    English
  • Canada
    English
  • Hong Kong SAR
    English
  • Indonesia
    English
  • Ireland
    English
  • Malaysia
    English
  • New Zealand
    English
  • Nigeria
    English
  • Philippines
    English
  • Singapore
    English
  • South Africa
    English
  • UK
    English
  • Terms of service
  • Privacy policy
  • Sitemap
  • Privacy Choices