1 May, 2025
How to Enable eCommerce Tracking in Google Analytics 4 (GA4)
Introduction
If you're running an online store, tracking product views, add-to-cart actions, and completed purchases is essential. With Google Analytics 4 (GA4), eCommerce tracking is more powerful and flexible than ever — but it requires proper setup.
In this guide, you'll learn how to enable eCommerce tracking in GA4, step-by-step, whether you're using Google Tag Manager (GTM) or gtag.js.
Step 1: Understand how GA4 handles eCommerce
Unlike Universal Analytics, GA4 does not require enabling eCommerce in the admin interface. Instead, it automatically processes eCommerce data when the correct events are sent to it.
So: sending the right events = enabling eCommerce tracking.
Step 2: Choose your implementation method
There are two main ways to implement eCommerce tracking in GA4:
✅ Option A: Using Google Tag Manager (GTM)
Go to your GTM workspace.
Create a new GA4 Event Tag.
Set the Event Name to one of GA4’s standard eCommerce events, such as
add_to_cart
,purchase
,view_item
, etc.Add parameters under the Event Parameters section:
items
(as a custom variable or a Data Layer variable)value
,currency
,transaction_id
for purchases
Choose an appropriate trigger (e.g., "Add to Cart" button click).
Save and publish your container.
Example Data Layer Push:
✅ Option B: Using gtag.js
Insert the event code directly on your site when the action occurs.
Example for a purchase:
Step 3: Use the Right Events and Parameters
GA4 expects standard event names for eCommerce tracking. Here are the most common ones:
Event Name - When to Use
view_item
- When a product detail page is viewedadd_to_cart
- When a product is added to the cartbegin_checkout
- When a user starts the checkout processpurchase
-When a purchase is completed
Each event should include the items
array with keys like:
item_id
item_name
price
quantity
Step 4: Test Your Setup
Go to Admin > DebugView in GA4.
Open your site with GTM debug mode or enable debug in gtag:
Trigger the eCommerce actions (e.g., add to cart or complete a test purchase).
Confirm that the events show up with the correct parameters.
Step 5: View Reports in GA4
Once events are properly sent, GA4 will automatically populate the Monetization reports:
Monetization > Overview
Monetization > Ecommerce purchases
It may take a few hours for the reports to show real data.
Final Tips
Use consistent and structured product data.
Map events correctly if you're using custom events via Admin > Events > Create Event.
Mark
purchase
or other important events as conversions in Admin > Conversions.
Conclusion
GA4’s eCommerce tracking is extremely flexible — but it won't work unless you send the right events with the right structure. Whether you’re using GTM or gtag.js
, the key is to implement view_item
, add_to_cart
, and purchase
properly.
Once set up, you’ll unlock valuable insights about your store’s performance, product popularity, and sales funnel.
Uplyt Bonus: View All Your eCommerce KPIs in One Page
Once your GA4 eCommerce tracking is active, you’ll also unlock access to the dedicated eCommerce section inside Uplyt.
There, you’ll find a clear dashboard with the most important KPIs per product:
Product views
Add to carts
Checkout starts
Units sold
Product revenue
All of this is updated automatically from your GA4 data, and simplified for you with actionable insights — whether you're a beginner or a seasoned marketer. Join Uplyt
Get ultimate task management secrets
Unlock the door to unparalleled productivity with our exclusive guide to the ultimate task.