How to Track Revenue in Google Analytics 4

Cody Schneider8 min read

You see traffic coming to your site and users clicking around, but the most important question is a simple one: is any of this turning into actual money? Tracking revenue directly inside Google Analytics 4 is the best way to connect your marketing efforts to real-world business results. This article will show you exactly how to set up ecommerce tracking and, just as importantly, where to find and analyze your revenue data in GA4's reporting interface.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Why Tracking Revenue in GA4 is a Game-Changer

Before jumping into the setup, it’s worth understanding why this is so valuable. When you properly configure revenue tracking, you’re not just looking at page views and session counts anymore. You’re unlocking a much deeper level of analysis.

  • Attribute Revenue to Marketing Channels: Finally get a clear answer to "Which marketing efforts are actually making us money?" See precisely how much revenue your SEO, paid search, email, and social media campaigns are generating.
  • Calculate True ROI: By combining spend data from your ad platforms with revenue data from GA4, you can calculate the return on investment for your campaigns and make smarter budget allocation decisions.
  • Understand Product Performance: Discover which products are your bestsellers, which ones are frequently purchased together, and which ones have the highest average revenue. This helps with inventory management and merchandising strategy.
  • Analyze User Purchase Behavior: See the average number of days or sessions it takes for a user to make a purchase, and understand the typical path they take on your site before buying.

In short, tracking revenue transforms GA4 from a tool that measures web traffic into a powerful system that measures business performance.

The Heart of GA4 Revenue Tracking: The purchase Event

Unlike its predecessor, Universal Analytics, GA4 is built around an event-based data model. Every user interaction is captured as an "event," and to track revenue, we need to focus on one specific, highly important event: the purchase event.

The purchase event is what you send to Google Analytics every time a customer successfully completes a checkout. However, just sending the event isn't enough. To make it useful, you have to include specific parameters that provide context about the transaction. The most important ones are:

  • transaction_id: A unique ID for the transaction (e.g., an order number). This prevents duplicate transactions from being counted if a user reloads the confirmation page.
  • value: The total value of the purchase, including tax and shipping.
  • currency: The currency of the transaction in a 3-letter ISO 4217 format (e.g., 'USD', 'EUR', 'GBP').
  • items: An array (a list) of all the products that were part of the transaction. This is where you pass detailed information about each item, like its name, ID, price, and quantity.

Here’s a simplified look at what the code for this event might look like when it’s sent to Google Analytics:

gtag('event', 'purchase', {
    transaction_id: 'ORDER-12345',
    value: 125.50,
    currency: 'USD',
    tax: 10.25,
    shipping: 15.00,
    items: [
     {
      item_id: 'SKU_ABC',
      item_name: 'Classic Blue T-Shirt',
      price: 25.00,
      quantity: 2
     },
     {
      item_id: 'SKU_XYZ',
      item_name: 'Stylish Baseball Cap',
      price: 25.25,
      quantity: 1
     }]
}),

The good news? You probably don't have to write this code yourself. Let's look at the most common ways to get this event firing on your site.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

How to Set Up Ecommerce Tracking: The Two Main Paths

There are two primary ways to implement GA4 revenue tracking, depending on your website’s platform and your technical comfort level.

Method 1: Using a Platform Integration (The Easy Way)

If you use a popular ecommerce platform like Shopify, WooCommerce, or BigCommerce, this is the no-sweat method. These platforms have built-in integrations or official plugins that do all the heavy lifting for you.

Their developers have already figured out how to capture all the transaction details and format them correctly into the purchase event with all the necessary parameters. All you typically need to do is enable the integration and provide your GA4 Measurement ID.

Example: Setting up on Shopify

  1. From your Shopify admin, go to Online Store > Preferences.
  2. In the Google Analytics section, click Manage pixel here.
  3. If you don't have the Google channel app installed, you'll be prompted to add it. Follow the prompts to connect your Google account.
  4. Shopify will guide you through selecting your Google account and GA4 Property. You'll simply need to find and connect your GA4 Measurement ID (it starts with "G-").

That's it! Once connected, Shopify automatically sends ecommerce events - including the critical purchase event along with all its data - to your GA4 property whenever a sale occurs.

Other platforms have similarly straightforward processes. Look for their Google Analytics or marketing integration settings to get started.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Method 2: Manual Setup with Google Tag Manager (The Advanced Way)

If you have a custom-built ecommerce site or need more control over your data, Google Tag Manager (GTM) is the way to go. This approach requires your developer to place a piece of code, known as a data layer, on your order confirmation page.

This data layer push should contain all the same information from the code example above. Once that's in place, you can use GTM to capture that information and send it to GA4.

Here’s a streamlined overview of the steps in GTM:

  1. Create Data Layer Variables: Inside GTM, you need to create variables that can read the transaction data from the data layer. You'll create a "Data Layer Variable" for transaction_id, value, currency, and items.
  2. Create a Trigger: Create a "Custom Event" trigger that fires when the purchase event is pushed to the data layer. If your developers named the event 'purchase' in the data layer, a common practice, then your trigger should be configured to fire on the custom event named 'purchase'.
  3. Create the GA4 Event Tag: This is the final piece that sends the data to Google Analytics.

Save and publish your GTM container, and you're ready to test.

Don't Skip This: Testing Your Setup

Whether you used an integration or GTM, you must test that it's working. The easiest way is to use GA4’s own DebugView (found in the Admin > DebugView section).

After enabling GTM's Preview Mode or using a debug extension for your browser, make a test purchase on your site. Watch your DebugView stream in GA4. You should see a purchase event appear in blue. Click on it, and you should see all the parameters you configured - transaction_id, items, value, etc. - with the correct information from your test order.

Where to Find Your Revenue Data in GA4

Once you’ve confirmed data is flowing, you'll want to see it in your reports. After a 24-48 hour processing period, your revenue data will begin to populate in a few key areas.

Standard Monetization Reports

The most straightforward place to start is the "Monetization" section in the left-hand navigation menu under Reports.

  • Monetization overview: This is a dashboard giving you a high-level look at your site’s performance, including a card for "Total revenue."
  • Ecommerce purchases: This report provides a breakdown of revenue at the product level. You can see which items are purchased most often (Item views vs. Adds to cart vs. a purchase) and how much revenue each product generates (Item revenue).
GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Adding Revenue to Acquisition Reports

The real power comes from seeing which channels are driving your revenue. Go to the Acquisition > Traffic acquisition report.

By default, this report shows sessions and users by channel. To add revenue metrics, click the pencil icon ("Customize report") in the top right corner. Select "Metrics," click "Add metric," and search for "Total revenue," "Transactions," and "Average purchase revenue." Add these, save your changes, and now your traffic acquisition report will show you which channels are your most profitable.

Building Custom Reports in Explore

For even deeper analysis, use the Explore tab. Explorations let you build custom reports from scratch using a drag-and-drop interface.

Here’s a quick example to build a powerful report:

  1. Navigate to Explore and select "Blank" to create a new exploration.
  2. In the "Variables" column on the left, click the "+" sign next to "Dimensions." Import dimensions like Session source / medium, Campaign, and Item name.
  3. Click the "+" sign next to "Metrics." Import metrics like Total revenue and Transactions.
  4. Drag Session source / medium from the Variables column to the "Rows" box in the Tab Settings column.
  5. Drag Total revenue and Transactions from Variables to the "Values" box in Tab Settings.

Instantly, you'll have a custom, in-depth table showing which of your specific marketing sources and campaigns are generating the most revenue. This is the level of insight that empowers you to double down on what works and cut back on what doesn't.

Final Thoughts

Setting up revenue tracking is the single most important configuration you can make in GA4. By sending a detailed purchase event, either through an easy platform integration or a more tailored Google Tag Manager setup, you unlock the ability to see exactly which products, channels, and campaigns are driving growth for your business.

Of course, digging through GA4 reports to get these answers is still a manual process. We built Graphed to remove this friction entirely. After connecting Google Analytics and your other data sources (like Shopify, Google Ads, or HubSpot), you can just ask in plain language, "Show me my total revenue by traffic source for last month," and instantly get a dashboard with the answer. We turn hours of report-building into simple conversations, so you get the insights you need in seconds, not hours.

Related Articles