Guide · E-commerce
E-commerce analytics setup: measuring what sells
An online store generates data at every step: which products are viewed, added to carts, purchased and returned; which channels bring buyers; where checkout loses them. Without proper e-commerce tracking, most of this is invisible, and advertising is optimised for clicks rather than revenue. This guide covers the setup and the reports worth watching.
[ 01 ]
In short
In short
- 01
Implement the standard e-commerce events with product, price and order data.
- 02
Send purchases from the server or confirm them with server-side data, so revenue in analytics matches reality.
- 03
Include refunds and cancellations, or revenue will be overstated.
- 04
Account for orders placed by phone and messenger, common in Azerbaijan.
- 05
Watch a few core reports: funnel, product performance, revenue by channel and return on ad spend.
[ 02 ]
Guide
E-commerce events
GA4 defines a standard set of e-commerce events. The essential ones:
view_item_list— a category or search results page shown;select_item— a product clicked in a list;view_item— a product page viewed;add_to_cartandremove_from_cart;begin_checkout;add_shipping_infoandadd_payment_info;purchase— with transaction ID, value, currency (AZN), tax, shipping and items;refund— full or partial.
Each event includes item data: ID, name, category, variant, price and quantity. See GA4 setup and GA4 events plan.
Reliable purchase data
Browser-based tracking misses some purchases — blockers, closed tabs, failed redirects after payment. For accurate revenue:
- trigger the purchase event only after payment is confirmed;
- deduplicate by transaction ID;
- consider sending purchases server-side, or reconciling analytics with the order system regularly.
Refunds and cancellations
Orders that are cancelled, refused on delivery or returned should be reflected as refunds. Otherwise revenue and return on ad spend are overstated — particularly for stores with many payment-on-delivery orders.
Phone and messenger orders
Many customers in Azerbaijan order by calling or writing on WhatsApp after browsing the site. These orders should be recorded in the order system with their source, and — where you can link them to a visit, for example through a reference code in the WhatsApp message — attributed to the channel that brought the customer. See end-to-end analytics.
Advertising platforms
Send purchase events with values to Google Ads and Meta, directly or through GA4, so bidding can optimise for revenue. Use server-side integrations such as Meta's Conversions API for more reliable data. Product feeds from the catalog power Shopping and dynamic ads.
Reports worth watching
- Funnel: sessions → product views → add to cart → checkout → purchase, by device and channel. Where the biggest drop is, the biggest opportunity usually is.
- Product performance: views, add-to-cart rate, purchases, revenue and returns per product.
- Revenue by channel and campaign, with cost, giving return on ad spend. See ROAS.
- New vs returning customers and repeat purchase rate.
- Search terms used in the store's search, especially those with no results.
Data quality checks
- Compare revenue and order counts in analytics with the order system weekly.
- Check currency and tax settings.
- Filter internal and test orders.
- Watch for sudden drops in events after site updates.
Privacy
Do not send personal data — names, phones, emails, addresses — to analytics. Respect consent choices and describe tracking in the privacy policy.
[ 03 ]
FAQ
Frequently asked questions
Why does GA4 show less revenue than our system?
Common reasons: blocked tracking, purchases not confirmed on the site, payment-on-delivery orders completed offline, and refunds not recorded. Reconcile regularly and improve server-side tracking.
Do we need a separate e-commerce analytics tool?
GA4 with a proper e-commerce setup covers most needs. Some stores add tools for product analytics or customer lifetime value as they grow.
How do we measure profit, not just revenue?
Combine revenue data with product costs and delivery costs from your accounting system in a dashboard. See dashboards.