Ecommerce analytics is collecting and reading the data an online store produces, from the first product view to the order and any refund, so you can decide what to change in the store, the products, and the marketing.

Share post

Ecommerce Analytics: Where the Data Comes From and How to Use It

ecommerce-website-analytics

60-Second Summary

Ecommerce analytics requires knowing what each system actually measures: your store records orders, GA4 records website behaviour, and ad/email platforms record campaign activity. This guide explains GA4’s ecommerce events, the key parameters to check, and practical steps to reconcile and act on the data.

  • Key takeaways: Your store platform is the authoritative record of orders and revenue, GA4 shows customer journeys and usually records fewer purchases; reconcile both by matching transaction_id, currency, items and refunds, and report the percentage gap.

  • Standout strategies & tactics: Implement GA4’s recommended ecommerce events (view_item_list through purchase/refund), ensure parameters (currency, items, transaction_id) are correct, use UTMs for campaign attribution, and compare a matched week/timezone when reconciling figures.

  • Real-world lessons & frameworks: Tackle one question at a time (e.g., where do shoppers drop out), make one change, and measure against your store’s historical performance; use funnels and dashboards to prioritize fixes and document the impact.

  • B2B-specific guidance: Measure at the account level by linking CRM/ERP data, track quote requests and offline orders as events (e.g., generate_lead), and use company-identification tools (like Leadfeeder) to see business-level intent across channels.

*This summary was created with AI assistance, using our original content.

It’s not always easy to get a clear picture. Your store's order report shows one revenue figure, while Google Analytics 4 (GA4) shows another. Your advertising accounts may tell a different story again. Each system measures something different, so effective ecommerce website analytics starts with understanding where the figures come from and what they mean.

In this guide, we'll explain where ecommerce data comes from and how GA4 measures each step of the buying journey. You'll learn how to check whether your numbers are accurate and use the results to make better decisions. We'll also cover the differences between B2B and consumer ecommerce.

What ecommerce analytics is

Regular web analytics tells you how visitors find your website and what they do once they arrive. Ecommerce analytics adds the store's transaction records to the mix, so you can cross-reference browsing behavior with actual purchases. Your store records which products customers buy and how much money changes hands. You can see how much customers spend, as well as what they return on the back end. Combined with your website activity, this information helps you understand how people move through the buying journey and where their actions lead to sales.

You may also hear this called ecommerce performance analytics. It's the same practice: measuring how well your online store performs using data from the website and connected systems. Ecommerce analysis covers individual product performance, as well as the results of marketing campaigns. Teams use analytics for ecommerce to compare their store's performance over time and make better decisions for the future.

The importance of analytics in ecommerce becomes clear when you start investigating parts of the buying journey that aren't working so well. For example, if a product attracts plenty of views but generates very few orders, you have a reason to examine its page more closely. Other useful capabilities include seeing where shoppers drop off and which marketing channels bring customers who buy. When you change something on the website, you can compare the results to see whether your intervention worked. You’re now basing decisions about product pages and marketing spend on customer behavior and purchases rather than gut feeling.

Where ecommerce data comes from

Ecommerce data analytics draws information from several sources, each capturing a different part of the buying journey. Your store tracks sales, while analytics and marketing systems record how shoppers interact with your website and campaigns. Good data analytics for ecommerce depends on knowing which source can answer each question.

This is particularly important for agencies, where data analytics in ecommerce often involves comparing figures across several systems. Ecommerce and data analytics teams need access to these sources to understand how website activity relates to orders.

The different types of ecommerce analytics also help you distinguish between sales performance and customer behavior. 

Source

What it records

The question it answers

What it cannot tell you on its own

Store platform

Orders, revenue, refunds, products, and customers

What sold, to whom, and for how much?

How shoppers found the store and what they did before buying

Analytics tool (Google Analytics 4 )

Sessions, traffic sources, and ecommerce events

How do shoppers arrive and move through the store?

The complete transaction record, since GA4 generally records fewer purchases than the store

Ad platforms

Campaign spending, clicks, and claimed conversions

How much did each campaign cost?

A single agreed conversion total, because each system uses its own counting rules

Email tool

Emails sent, clicks, and revenue attributed to campaigns

What activity and revenue does email generate?

The full picture of sales beyond its own measurement rules

CRM or ERP (B2B stores)

Company accounts, quotes, contracts, and orders placed by phone or through sales reps

Which companies buy, including orders placed outside the website?

What those companies do on the website unless the records are connected

Your store platform holds the official record of orders and revenue, while GA4 records website behavior. You can also use Google Search Console to see which searches bring people to your store, or Microsoft Clarity to examine session recordings and heatmaps. For a comparison of the available products, see our guide to website analytics tools. 

GA4 ecommerce events: the measurement layer

GA4 provides ecommerce web analytics by recording events as shoppers move through the buying journey. Google recommends 14 ecommerce events, covering everything from viewing a product to completing a purchase and receiving a refund.

The 14 events, step by step through the buying journey 

Each GA4 event records a particular action, such as viewing a product or adding it to a cart. Together, they let marketers track the customer's progress through the store and see where they move forward or lose interest.

Web analytics for ecommerce depends on tracking what happens throughout the buying journey. These events provide that information and form the basis of ecommerce customer journey analytics. The table below shows the actions each event records.

Step in the buying journey

GA4 events

What it tells you

Sees a list of products, such as search results or related items

view_item_list, select_item

Which product lists attract clicks

Sees a promotion

view_promotion, select_promotion

Which banners and offers shoppers see and click

Views a product

view_item

Which products attract attention

Saves a product for later

add_to_wishlist

Which products interest shoppers before they buy

Builds the cart

add_to_cart, remove_from_cart, view_cart

What shoppers add to their carts, remove, or review

Starts checkout

begin_checkout

How many shoppers begin checkout

Provides delivery and payment details

add_shipping_info, add_payment_info

How far shoppers progress through checkout

Makes a purchase

purchase

Orders and revenue recorded by GA4

Receives a refund

refund

Which purchases are refunded

Source: Google for Developers, Measure ecommerce.

You can use these events to build a funnel showing how shoppers progress toward a purchase. For example, compare the number of shoppers who add something to their cart with those who begin checkout. A large drop gives you a useful place to investigate. Keep in mind that raw event counts won't always decrease at each stage. Someone might view several products or add multiple items to their cart before buying. Compare the same measurement across stages to get a meaningful picture of where people leave.

Check which events your store currently sends to GA4. Any missing events leave gaps in your ecommerce website analytics, making it harder to see what's happening at that point in the buying journey. 

The parameters that make the numbers usable

 GA4 events tell you what shoppers do, but the parameters attached to them provide the detail you need to make sense of the results. The “currency” parameter identifies the currency associated with an event's value, such as USD or EUR. Google requires it whenever an event sends a “value” parameter. Without the correct currency information, GA4 can calculate revenue incorrectly, making it harder to compare sales across different markets.

The “items” parameter records the products involved in an event. It can contain up to 200 items, each with information such as item_id, item_name, price, quantity, and item_category. This lets you see which products shoppers interact with and how different product categories perform. It also lets you compare product activity across the buying journey, giving you more detail than an overall purchase total.

“transaction_id” identifies the order associated with a purchase or refund event. Google requires this parameter for both events. Each order needs its own ID, allowing you to match the purchases GA4 records with the corresponding orders in your store. This becomes particularly useful when checking whether your revenue figures are accurate.

For more on setting up website measurement, see our guide on how to monitor website traffic.

The metrics this data gives you

Once you've connected your website activity with store records, you can measure how well your store converts visitors into customers and how much those customers spend. Here are the main metrics and where to find the data for each:

  • Conversion rate: GA4 sessions and purchases show how often visits result in a sale.

  • Average order value: Your store's order records show how much customers typically spend in a single transaction.

  • Cart abandonment rate: GA4 cart and checkout events help you measure how often shoppers leave before completing a purchase.

  • Customer lifetime value: Your store's customer and order history shows how much customers spend over the course of their relationship with you.

  • Customer acquisition cost: Advertising and email spending, combined with new customer records from your store, show how much you spend to acquire customers.

  • Return on ad spend: Advertising costs and revenue figures from your store or GA4 help you assess what your campaigns bring in.

  • Repeat purchase rate: Your store's customer history shows how often customers come back to buy again.

For the formulas, benchmarks, and help choosing the most important figures to track, see our guide to ecommerce metrics and kpis.

How to check the data is right

 Your GA4 revenue and store revenue figures will not match exactly. These ecommerce analytics best practices will help you measure the difference and understand what's causing it.

1. Compare a week of GA4 purchases with your store’s orders

Choose the same seven-day period and time zone for both systems. GA4 will generally record fewer purchases because some visitors decline consent, use ad blockers, or complete orders without the purchase event firing. Under basic consent mode, Google tags send no data until consent is granted. Advanced consent mode allows tags to send consent information and measurements without cookies when visitors decline. Our guide to cookieless website analytics explains how these choices affect measurement. 

2. Check transaction_id

Every purchase event should have a unique transaction ID that matches an order in your store. Missing or duplicated IDs can make it harder to reconcile GA4 purchases with your actual sales records. 

3. Check currency

Every event that sends a value must also send the correct currency. Check that the currency matches the transaction, particularly if your store sells internationally. Incorrect information can distort the revenue GA4 reports. 

4. Check the items

Compare the product IDs and names in GA4 with those in your store's catalog. They need to match so you can identify the same products across both systems and trust your product-level reports. 

5. Check refunds

Confirm that refunded orders generate a refund event in GA4. If these events are missing, GA4 won't account for the money returned to customers, overstating the revenue associated with its recorded purchases.

6. Check campaign tagging

Make sure links in your email campaigns and paid ads include the correct utm parameters. Without these tags, GA4 may record visits as direct or unassigned traffic, making it harder to establish which campaigns brought customers to your store. See our guide to utm parameters for more detail.

If you're an agency analyst checking a new client's store, record the difference between GA4 revenue and store revenue as a percentage. Include that gap alongside the revenue figures in your reports, so your client can see exactly how the numbers compare. 

From data to decisions

Ecommerce performance analytics becomes useful when you start with a question about your store and find the data that will help you answer it. You can then focus on the changes most likely to boost sales.

The following ecommerce analytics use cases show how teams can use analytics in ecommerce to make better decisions.

The question

Where to look

What you might change

Where do shoppers drop out?

GA4 buying journey events

The page or checkout step where the largest drop occurs

Which products get viewed but rarely bought?

view_item and purchase events by product

Product descriptions, pricing, or images

Which promotions attract clicks but few orders?

select_promotion and purchase events

Which offers you continue running

Which channels bring paying customers?

GA4 purchases by traffic source, checked against store orders

How you allocate your marketing budget

Which products get returned?

refund events by item and the store's returns records

Product descriptions or sizing information

Which customers buy again?

Store customer and order history

The emails customers receive after their first order

The trick is to tackle one question at a time. For example, if you notice shoppers regularly add products to their carts but leave before completing checkout, investigate where they drop off and decide which part of the process needs attention. Make one change, then check the results a few weeks later. 

Compare your findings against your store's own historical performance. That gives you a more useful picture of whether things are improving. Be careful about jumping to conclusions. A drop in purchases tells you where to investigate, but you'll need to examine the relevant part of the buying journey before deciding what to change.

You can use a web analytics dashboard to keep the questions your team asks every week on one screen. Then use a web analytics report to document your monthly findings and the changes you've made. This approach to ecommerce business analytics gives you a way to test changes against your store's own results.

B2B ecommerce analytics

Most ecommerce guides assume a consumer makes a purchase through an online checkout. In B2B, several employees may research products before their company buys anything. Customers can also order through existing accounts or place orders directly with sales representatives, so some transactions don't appear in the website's records.

How B2B stores buy differently

In B2B ecommerce, the customer is usually a company. Several employees might research products before anyone places an order. They could visit the store repeatedly over several weeks, sometimes using different devices. Standard website analytics records these visits as separate interactions, making it difficult to see how much interest comes from the same business. For a B2B seller, understanding activity at the company level is particularly important. 

The checkout process can also look very different. Wholesale stores and trade portals often let customers order through existing accounts, sometimes at prices agreed with individual businesses. Other buyers request a quote before committing to a purchase. If you only measure completed online transactions, you'll miss these expressions of buying interest. A quote request could represent a valuable sales opportunity, even though no money has changed hands yet.

Some customers place repeat orders directly with sales representatives or over the phone. The business records these transactions in its CRM or ERP, so they never appear as purchases in GA4. This creates a gap in the store's online reporting, especially when you're trying to understand the value of existing customers. B2B measures such as revenue per account and reorder rate can help here, and we cover those in our separate guide to ecommerce metrics and KPIs.

Measure the account, not the shopper

To get a more accurate picture of B2B ecommerce analytics, measure activity at the company level. Connect your website data with the account records in your CRM or ERP. That way, you can assign purchases made through the online store, a sales representative, or over the phone to the same company. You can then see how much business each account generates across its different ordering channels, including purchases that GA4 doesn't record. 

You'll also need to track quote requests. If customers request a price before ordering, record that action as a website event. Google's recommended lead generation events include generate_lead, which lets you count inquiries from potential customers even when they haven't placed an order.

You can use website intelligence to understand which companies research your store before anyone logs in or buys. Leadfeeder uses reverse ip lookup to identify visiting businesses at the company level, without identifying individual shoppers. Its Web Visitors tool lets you identify visiting companies and see which pages they've viewed, including wholesale pricing or trade account pages. Leadfeeder Web Insights gives you a broader picture through ready-made reports showing how many companies come through each channel and page. You can also see how many of those companies fit your ideal customer profile (ICP), and the percentage they represent. These company-level figures add another perspective alongside GA4's session and user reports. Getting started takes one tracking script, ready in minutes. Install it on your store, then check Web Visitors after a week to see which companies have been looking at your wholesale pricing or trade account pages.

Frequently asked questions

What is ecommerce analytics?

Ecommerce analytics involves collecting and analyzing data from an online store and its marketing activity. By combining information on how visitors use a website with records of what they buy, marketers can understand the customer buying journey and make better decisions about their store.

What ecommerce events should I set up first?

Start with view_item, add_to_cart, begin_checkout, and purchase to track the main stages of the buying journey. You can then add the remaining recommended ecommerce events to capture more detail about shopper behavior. For B2B stores, generate_lead also lets you track quote requests.

Is GA4 enough for ecommerce analytics?

GA4 tracks website behavior and ecommerce events, but you'll also need your store's transaction records for a complete picture of orders, revenue, and refunds. B2B sellers should include CRM or ERP data to account for company purchases, quote requests, and orders placed outside the website.

Why does GA4 show less revenue than my store?

GA4 may record less revenue because some visitors decline consent or use ad blockers.  Customers could complete purchases without the relevant event firing. Missing refund events can also affect the difference between the two systems. Follow the data checks outlined earlier to investigate any discrepancies.

How is B2B ecommerce analytics different?

B2B purchases often involve several employees researching products for the same company. Buyers may request quotes or place orders through sales representatives rather than completing an online checkout. Account-level measurement connects these interactions to the company's purchasing records, giving you a fuller picture of its activity.

This week, compare seven days of GA4 purchases with your store's order report and write down the gap.

Generate quality leads from website traffic

Serban Giurgi, SEO Manager at Leadfeeder

SEO Manager @ Leadfeeder

Serban Giurgi is SEO Manager at Leadfeeder, where he leads end-to-end SEO strategy across technical, content, on-page, off-page, and international markets. His work focuses on connecting search visibility with pipeline by combining intent signals, search behaviour data, and content performance insights.

With experience scaling SEO programmes for B2B SaaS, marketplaces, and large publishers, Serban brings a practical perspective on how organic search drives qualified demand. His background in technical SEO, content quality, and visitor identification informs his approach to turning anonymous traffic into measurable revenue opportunities.

Related articles