How to Add Products to Google Analytics
Seeing your total revenue in Google Analytics is great, but knowing exactly which products are driving that revenue is a game-changer. By tracking individual product performance, you can discover your bestsellers, identify underperforming items, and understand how customers interact with your online store. This guide will walk you through exactly how to add product data to Google Analytics 4 and where to find the reports that matter.
Why You Should Track Product Performance in Google Analytics
Tracking high-level metrics like sessions and total sales only tells you part of the story. When you add product-level data, you unlock a much deeper understanding of your business and customer behavior. This allows you to move beyond guessing and start making data-driven decisions about your inventory, marketing, and site design.
Here are just a few critical questions you can answer with product tracking:
- Which products are your most viewed but least purchased? This could point to issues with pricing, product descriptions, or images.
- Which items are most frequently added to the cart? These are your high-intent products and are perfect candidates for upselling campaigns.
- What is the conversion rate for a specific product promotion? See if that "20% off" banner is actually driving sales for that item.
- What are your most profitable product categories? Focus your marketing budget where it will have the biggest impact.
- Where do customers abandon their journey? Do they view products but never add them to the cart? Or do they add to the cart but never complete the purchase?
Ultimately, detailed product analytics help you stock smarter, market more effectively, and optimize customer experience to boost your bottom line.
GA4 Ecommerce Events vs. Universal Analytics "Enhanced Ecommerce"
There are two key methods for tracking ecommerce data, and which one you use depends entirely on which version of Google Analytics you have. Since Universal Analytics (UA or GA3) stopped processing data in July 2023, this guide will focus primarily on the implementation for Google Analytics 4. However, understanding the old way provides helpful context.
- Universal Analytics (UA) Method: UA used a system called "Enhanced Ecommerce." It was a rigid framework with pre-defined events like Product Impressions, Product Clicks, Add to Cart, and Purchase. You had to implement a specific block of code for each action.
- Google Analytics 4 Method: GA4 uses a more flexible, event-based model. Instead of a rigid framework, Google provides "recommended events" like
view_item,add_to_cart, andpurchase. With each of these events, you send along an array of data that describes the product (or products) involved in that action. This makes implementation more straightforward, especially for modern ecommerce platforms.
Free PDF · the crash course
AI Agents for Marketing Crash Course
Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.
How to Set Up Product Tracking in Google Analytics 4
Now for the main event: actually getting your product data into GA4. Fortunately, most modern ecommerce platforms have made this incredibly simple. If you're using a custom-built site, the process requires a bit more technical work with Google Tag Manager (GTM), but it's still very manageable.
Method 1: Using an Ecommerce Platform Integration (The Easy Way)
This is the best route for 90% of online store owners. Platforms like Shopify, WooCommerce, and BigCommerce have built-in integrations or trusted plugins that automate the entire process. Once you connect your platform to GA4, they automatically send product data with all the key ecommerce events.
Example: Setting Up Product Tracking with Shopify
Shopify's integration with Google Analytics is nearly seamless and handles everything for you. By using their official app, you ensure that all GA4 ecommerce events are properly configured with product details without touching a line of code.
Here’s how to get it started:
- From your Shopify admin, go to Apps on the left-hand menu.
- Search for and install the "Google & YouTube" app if it isn't already installed. This is Shopify's official channel integration.
- Open the app and follow the prompts to connect your Google account managing Google Analytics.
- Choose the correct GA4 Property ID to connect to your store.
- That’s it! Shopify will now automatically send events like
view_item,add_to_cart, andpurchaseto your GA4 property, complete with detailed product data like Name, ID, Price, and Quantity.
Example: Setting Up Product Tracking with WooCommerce
WooCommerce, built on WordPress, relies on plugins to handle the GA4 connection. These plugins inject the necessary code and dataLayer scripts onto your site automatically.
- Choose a plugin: Popular and reliable options include the official “WooCommerce Google Analytics Integration,” "Google Listings & Ads," or "Site Kit by MonsterInsights." For this example, we'll focus on "Site Kit by MonsterInsights."
- Install and activate: Install and activate your chosen plugin from the WordPress dashboard (
Plugins>Add New). - Run the Setup Wizard: Most plugins have a user-friendly wizard to guide you through connecting your Google account and selecting your GA4 property.
- Enable Ecommerce Tracking: Within the plugin's settings, ensure that "Enhanced Ecommerce" tracking is turned on. Though it still uses the name from Universal Analytics, these modern plugins properly map to GA4's event formatting.
Once configured, the plugin will automatically fire events like add_to_cart with all necessary product information whenever a customer interacts with an item.
Method 2: Manual Implementation with Google Tag Manager (For Custom Sites)
If you're not using a major ecommerce platform or need more control over your data, setting up product tracking manually using Google Tag Manager (GTM) is the way to go. Think of GTM as a middleman that helps you manage tracking code without having to constantly edit your site's codebase.
This process relies heavily on something called a dataLayer. The dataLayer is essentially a JavaScript object on your site that holds the information you want to pass on to GTM. Your developer will need to write code that "pushes" information about products to the dataLayer at key moments like viewing a product or adding it to a cart.
Step 1: Work with a Dev to Implement the DataLayer Push
You must send ecommerce data to the dataLayer in a specific format that GA4 understands. Here’s an example of what the code could look like for an add_to_cart event:
window.dataLayer = window.dataLayer || [],
window.dataLayer.push({
'event': 'add_to_cart',
'ecommerce': {
'currency': 'USD',
'value': 29.98,
'items': [{
'item_id': 'SKU123',
'item_name': 'Cotton Casual Tee',
'affiliation': 'Apparel World',
'item_brand': 'Galaxy Garb',
'item_category': 'T-Shirt',
'price': 14.99,
'quantity': 2
}]
}
}),The most important part here is the items array. It contains the key details about each product that need to be tracked. Your developer needs to dynamically populate these values based on which product the user has just added to their cart.
Step 2: Create DataLayer Variables in GTM
Once the data is being pushed to the dataLayer, you need to tell GTM how to find and understand it. You do this by creating a Google Tag: Event Parameters variable in GTM that automatically captures the entire ecommerce object. Since most standard GA4 events now automatically look for this object, this one variable is often enough to capture all the data.
Step 3: Create a GA4 Event Tag and Trigger in GTM
Now, you need a tag that will fire and send this information to GA4.
- In GTM, create a new "Google Analytics: GA4 Event" tag.
- In the "Event Name" field, instead of hardcoding a name like
add_to_cart, you should use a built-in variable called "Event." This will dynamically use the name you passed to thedataLayer(e.g.,add_to_cart). - Last, create a "Custom Event" trigger. This trigger should be set up to watch for any events that your developer is pushing. Since Google recommends using a predefined list of events (for example,
add_to_cart), you can create a trigger that listens for all of them using a regex likeview_item|add_to_cart|purchase.
Now, whenever an add_to_cart event is pushed to the dataLayer, your trigger will activate, firing your GA4 event tag and passing all the product data along with it.
Free PDF · the crash course
AI Agents for Marketing Crash Course
Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.
Where to Find Your Product Data in Google Analytics 4
After implementation, wait about 24-48 hours to let GA4 process the new data. Then it's time to find your new reports.
The Standard Monetization Reports
For a quick overview, GA4 has a built-in ecommerce reporting section.
- In your GA4 dashboard, navigate to Reports on the left sidebar.
- Select the Monetization section and choose Ecommerce purchases.
- This report contains several cards, including a table at the bottom with product-level data. You'll see metrics for your top products, including item views, items added to cart, ecommerce purchases, and item revenue.
- You can switch between primary dimensions like Item Name, Item ID, and Item Category to view the data from different angles.
Building a Product Funnel in Explore
While the standard report is useful, the true power of GA4 lies in the Explore section. Here, you can build fully custom reports to dig deeper into your product data, like a full conversion funnel.
- Go to the Explore section and create a new Funnel exploration.
- In the Steps section on the left, add your ecommerce events in order:
- You'll immediately see a bar chart showing exactly how many users completed each step and where they dropped off. You can add a breakdown dimension like Item Name or Item Category to see the funnel for a specific product or category.
Final Thoughts
Understanding how your customers interact with products is essential for growing an ecommerce store. Setting up product tracking in GA4 is more straightforward than ever, whether you're using an easy integration from your platform like Shopify or a more hands-on approach with Google Tag Manager. The insights you unlock will be well worth the effort.
Pulling insights from Google Analytics is great, but it only tells you part of the story. To truly understand performance, you need to combine it with data from other platforms like your ad networks, email platforms, and CRM. At Graphed, we automate this data collection process. We directly connect with all your marketing and sales tools, gathering information into a single place. This allows you to create powerful reports and dashboards using just plain, conversational English - no coding, no pasting CSVs, and no complicated dashboard builders.
Related Articles
How to Create Facebook Ads API for Claude Code
Create a Meta Marketing API access token that never expires, using a system user, so Claude Code can pull Facebook ad reports and manage campaigns.
ClickHouse vs Postgres: When to Switch to Columnar
Comparing ClickHouse vs PostgreSQL means matching storage architecture to workload. Row storage wins for transactions. Columnar wins for scan-heavy analytics.
Google Ads for Orthodontists: Get More Booked Consults
Most orthodontic Google Ads campaigns waste money on low-intent searches. The problem is structure, not the platform.