Tools & TrackingExtra· 35 min read

Ecommerce & Revenue Tracking

Counting purchases is good; tracking the rupees behind them is better — ecommerce tracking lets GA4 report actual revenue, not just conversions.

What you will learn

  • List the standard ecommerce events in the buying journey
  • Explain why revenue tracking beats counting conversions
  • Read a revenue-based report and compute ROAS from it

From "how many" to "how much"

Earlier you learned to count conversions — 200 purchases this week. That is useful, but it hides something important: a sale of a ₹3,000 jacket and a ₹300 pair of socks both count as one purchase. If you only count purchases, you cannot tell which products, channels or campaigns actually bring in the money. Ecommerce tracking fixes this by recording the rupee value of each event, not just that it happened.

Ecommerce tracking (also called ecommerce measurement) means setting up GA4 to capture the whole shopping journey with money attached — what people viewed, added to cart, started buying, and finally purchased, including the amount.

The standard ecommerce events

GA4 has a set of agreed event names for the shopping journey. Using these exact names matters, because GA4 knows how to build revenue reports from them automatically. Here are the main ones in the order a shopper hits them:

Event nameWhen it firesShop analogy
view_itemA shopper opens a product pagePicks up an item to look at it
add_to_cartThey add the item to the cartDrops it in the basket
begin_checkoutThey start the checkoutWalks to the till
add_payment_infoThey enter payment detailsTakes out their card
purchaseThe order completesPays and leaves with the item

The crucial extra is that the purchase event carries money fields: the order value (total amount), the currency (INR), and the list of items bought. That is what turns a plain count into a revenue report.

What a revenue-aware purchase event holds

Here is the information a single purchase event records when ecommerce tracking is set up. You do not type this by hand — your shop platform sends it — but seeing it makes the idea concrete:

One purchase event carrying its rupee value and item list
purchase event
  transaction_id: ORD-5573
  value:          2100        (total rupees for this order)
  currency:       INR
  items:
    - Cotton Kurta   qty 1   price 1500
    - Cotton Socks   qty 2   price 300

Note: Because the event carries value: 2100 and the item prices, GA4 can now add up real revenue per product, per channel and per campaign — not just "1 purchase". The order total here is 1500 + 300 + 300 = 2100 rupees.

Why this changes the report

Compare two ways of reporting the same week. The conversion-only view treats every sale as equal; the revenue view shows where the money truly comes from:

ChannelPurchasesRevenueAvg order value
Instagram120₹96,000₹800
Google Ads80₹2,00,000₹2,500
Email100₹1,50,000₹1,500

If you only counted purchases, Instagram would look like the winner with 120 sales. But once you see revenue, Google Ads brings the most money (₹2,00,000) from fewer, bigger orders. The decision flips entirely — and only revenue tracking reveals it.

Revenue makes ROAS real

Remember ROAS (return on ad spend) from the metrics lesson? Without revenue tracking you have to guess the sales figure. With it, GA4 gives you the exact rupees, so ROAS becomes trustworthy:

Computing ROAS from real tracked revenue
Google Ads
  Ad spend:        ₹40,000
  Tracked revenue: ₹2,00,000   (from ecommerce tracking)

ROAS = revenue / ad spend
     = 2,00,000 / 40,000
     = 5x

Note: Because GA4 captured the actual ₹2,00,000 of revenue from purchase events, this 5x ROAS is a measured fact, not an estimate. Before ecommerce tracking you would have been multiplying a guessed order value by a count — and probably been wrong.

How it gets set up

You will rarely code these events yourself. The realistic path is:

  1. Your shop runs on a platform (Shopify, WooCommerce, a custom build) that already pushes ecommerce events into the dataLayer.
  2. In GTM, you add GA4 ecommerce tags that read those events and forward them — with their values — to GA4.
  3. In GA4, you mark purchase as a key event and turn on ecommerce reports.
  4. Revenue, average order value, and per-product reports now appear automatically.

Note: This is exactly why the GTM lesson came first: ecommerce tracking is the most common real job you will do inside GTM. The two skills work as a pair.

Tip: Use the exact GA4 event names (view_item, add_to_cart, purchase). If you invent your own names, GA4 will record the events but will not build its automatic ecommerce and revenue reports from them.

Watch out: Double-check that the value sent is the correct order total in the right currency. A common bug is sending the price of one item instead of the whole order, or sending paise instead of rupees — which quietly inflates or shrinks all your revenue numbers.

Q. Why is tracking revenue better than only counting purchases?

Answer: Counting purchases treats a ₹300 and a ₹3,000 sale as equal. Tracking revenue reveals which channels and products actually bring in the most money, which can completely change your decisions.

✍️ Practice

  1. An order contains a ₹1,200 dress and three ₹200 scarves. Write out the value the purchase event should send.
  2. Using the channel table above, say which channel you would cut budget from if you cared only about revenue, and why.

🏠 Homework

  1. For an imaginary online store, list the five ecommerce events in order and, for each, write one line describing the moment in the shopping journey it represents.
Want to learn this with a mentor?

CodingClave runs guided, project-based training (28-day, 45-day & 6-month batches).

Explore Training →