More in Product analytics
- Autocapture and the AI event inbox
- Build a funnel that explains drop-off
- Identify users across web, app and mini-programs
- What is autocapture, and how does it work?
- How do I review and accept events in the inbox?
- What are unplanned events, and how do I manage them?
- When should I use a funnel instead of a goal or path?
- How do I build a funnel?
- How do I read where a funnel drops off?
- What is identified mode, and should I turn it on?
- How do I call login to identify a user?
- How is one person merged across devices?
- How does identity work on apps and mini-programs?
- How do I track clicks on outbound links?
- How do I track file downloads?
- How do I track form submissions?
- How do I track custom events?
- How do I track button clicks?
- How do I create a heatmap?
- How do I track scroll depth?
- How do I set up goals and track conversions?
- How do I query my data with SQL?
- How do I create a custom metric?
- How do I analyze accounts with groups?
- How do I connect AI agents with MCP?
- How do I ask the AI assistant about my data?
- How do I create user segments?
- How do I run an RFM analysis?
- How do I record and watch session replays?
- How do I analyze user paths?
- How do I build a retention report?
- How do I analyze how an event is distributed?
- How do I create a tracking plan?
- How do I view a user’s profile and activity?
- How do I read the lifecycle report (new, returning, resurrecting, dormant)?
- How do I compare attribution models for a conversion?
- All guides in this category
Still have a question?
Could not find it? A person reads every message, usually within a few hours on business days.
Chat with usShort answer
Send view_item, add_to_cart and begin_checkout from the browser, and send each completed order as purchase from your server with order_id, revenue and currency. Use the order ID to dedupe and send refunds with the same ID.
The events
| Event | Sent from | Required properties |
|---|---|---|
view_item | Browser | item_id |
add_to_cart | Browser | item_id |
begin_checkout | Browser | None |
purchase | Your server | order_id, revenue, currency |
refund | Your server | order_id, revenue |
The browsing steps are behaviour events: they feed the purchase funnel and cart abandonment. Revenue comes only from purchase and refund.
Send purchases from your server
- On payment success, send
purchasefrom your backend with the order ID, amount and currency. - Use the order ID as the dedupe key. If your server retries, the same order is not counted twice.
- Add line items in an
itemsarray if you want item, category and brand rankings. - For a refund, send
refundwith the same order ID.
Sending purchases from the browser loses orders when the thank-you page does not load, a blocker stops the script, or the payment page is hosted elsewhere. Server-side events are described in the developer docs.
Event and property names
The names above are the defaults. If your store already uses other names, map them in All-platform analyticsConfigurationBusiness settings on the commerce tab instead of renaming your events. Saving a new mapping rebuilds the order ledger.
The E-commerce & retail industry pack under All-platform analyticsBusinessIndustry packs adds the matching metrics, funnels, goals and dashboards in one step.
Where to see the results
All-platform analyticsBusinessCommerce & revenue shows revenue, orders, buyers, average order value, repeat rate, the per-session purchase funnel, cart abandon rate and the value left in carts. Purchases from web, app and mini program land in one ledger.
If you see cart abandonment numbers but no revenue, the browser events are arriving but no purchase has been sent from the server, or its name does not match business settings.
See also: purchase path, ecommerce KPIs and cart abandonment rate.
Did this answer your question?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.