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 name | When it fires | Shop analogy |
|---|---|---|
view_item | A shopper opens a product page | Picks up an item to look at it |
add_to_cart | They add the item to the cart | Drops it in the basket |
begin_checkout | They start the checkout | Walks to the till |
add_payment_info | They enter payment details | Takes out their card |
purchase | The order completes | Pays 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:
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 300Note: 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:
| Channel | Purchases | Revenue | Avg order value |
|---|---|---|---|
| 120 | ₹96,000 | ₹800 | |
| Google Ads | 80 | ₹2,00,000 | ₹2,500 |
| 100 | ₹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:
Google Ads
Ad spend: ₹40,000
Tracked revenue: ₹2,00,000 (from ecommerce tracking)
ROAS = revenue / ad spend
= 2,00,000 / 40,000
= 5xNote: 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:
- Your shop runs on a platform (Shopify, WooCommerce, a custom build) that already pushes ecommerce events into the dataLayer.
- In GTM, you add GA4 ecommerce tags that read those events and forward them — with their values — to GA4.
- In GA4, you mark
purchaseas a key event and turn on ecommerce reports. - 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?
✍️ Practice
- An order contains a ₹1,200 dress and three ₹200 scarves. Write out the value the purchase event should send.
- Using the channel table above, say which channel you would cut budget from if you cared only about revenue, and why.
🏠 Homework
- 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.