---
title: "Ecommerce Analytics & Server-Side Tracking | Commerce Engine"
description: "First-party ecommerce analytics: server-side tracking, first- and last-touch attribution, live sessions, web analytics and funnels that match your orders."
canonical_url: "https://www.commercengine.io/features/analytics"
---

> Commerce Engine site index: https://www.commercengine.io/llms.txt

# Analytics

First-party ecommerce analytics built into your Commerce Engine store. Follow every visit to the order it became, credit the right campaign, and trust numbers that match your sales. More than 30 commerce events are recorded on your server from day one, from first cart to refund.

## Server-side tracking

Carts, checkouts and payments are recorded on your server, where ad blockers and closed tabs can't reach them. Add a Segment or RudderStack key and that first-party data flows to your tools, each sale counted once.

- **30+ server events**: Recorded on the server, from first cart to refund. Order Completed is sent the moment a payment is confirmed.
- **Ecommerce spec**: Events use the names Segment and RudderStack already know, so nothing needs remapping.
- **One key**: Add a write key and events start flowing.
- **Counted once**: Browser and server copies of an event share an event ID, so your tools count each sale once, and the server's copy still counts when an ad blocker stops the browser's.

**Docs:** [Analytics package guide](https://www.commercengine.io/docs/hosted-checkout/analytics)

**See also:** [Marketing & Campaigns](https://www.commercengine.io/features/marketing-and-campaigns.md)

## First and last touch attribution

Every visit becomes a session on your server. Everything in it, down to the payment confirmation, carries the campaign and ad that brought the shopper, so you see what your spend really sold.

- **Server-side sessions**: Any event within two hours keeps the visit going.
- **First and last touch**: Recorded on every session and every customer.
- **UTMs and click IDs**: Source, medium, campaign, content and ad click IDs.
- **Server events too**: Payments and orders carry the campaign of the visit they came from.

**Docs:** [Sessions API](https://www.commercengine.io/docs/admin/api-reference/analytics/retrieve-a-analytics-session)

**See also:** [Customers & Loyalty](https://www.commercengine.io/features/customers-and-loyalty.md)

## Real-time session analytics

Watch shoppers arrive, browse and pay as it happens. Open any visit to follow it step by step, or any event to see everything it carried.

- **Live stream**: Events arrive on your dashboard as they happen, newest session first, with the source and campaign that brought it.
- **Every session**: Search and filter sessions by source, campaign or customer, and follow each one step by step to the payment.
- **Every property**: Each event's full payload, pretty or raw.
- **Guest to customer**: Visits before sign-in join the customer's timeline.

**Docs:** [Live events API](https://www.commercengine.io/docs/admin/api-reference/sse/retrieve-live-events)

**See also:** [Customers & Loyalty](https://www.commercengine.io/features/customers-and-loyalty.md)

## Web analytics

See who visits, where they come from and what they read, from Instagram ads to ChatGPT answers, in your store's own dashboard.

- **Visitors and views**: Visitors, page views and who is online now, by hour, day, week or month, against the last period.
- **Four ways to group**: Source, UTM source, campaign and medium.
- **AI answers**: Visits from ChatGPT, Gemini and Claude, by name.
- **Top pages and busiest hours**: Popular pages, and a week of traffic hour by hour, plus devices.

**Docs:** [Analytics charts API](https://www.commercengine.io/docs/admin/api-reference/analytics/retrieve-analytics-chart-data)

**See also:** [Catalog & Inventory](https://www.commercengine.io/features/catalog.md)

## Product conversion funnels

Every product gets its own funnel, from cart to paid order, measured against the last period. Spot the bestseller that stalls at payment before it costs you a month.

- **Every product**: Viewed, added, checked out and bought, with revenue.
- **Every stage**: Carts created, addresses added, orders created and orders completed, with drop-off at each.
- **Any period**: Today to all time, against the one before.
- **From your orders**: Funnels built from real carts and orders, not guesses.

**Docs:** [Product analytics API](https://www.commercengine.io/docs/admin/api-reference/metrics/retrieve-product-analytics-stats)

**See also:** [Catalog & Inventory](https://www.commercengine.io/features/catalog.md)

## Ecommerce reporting

Visits, campaigns and orders live in one place, so revenue comes from your order book, not a pixel's guess. Every report agrees with the next, in your timezone.

- **One source**: Visits, orders, customers and shipments together.
- **Revenue from orders**: Gross and net, straight from your order book.
- **Your timezone**: By hour, day, week or month, against the last period.
- **Buying again**: Repeat rate and days between orders, per product.
- **Plain-language questions (coming soon)**: Ask questions about your store in your own words, answered from your events and orders together.

**Docs:** [Dynamic query API](https://www.commercengine.io/docs/admin/api-reference/analytics/dynamic-query)

**See also:** [Shipping](https://www.commercengine.io/features/shipping.md)

## Also included

Analytics runs through every part of Commerce Engine, so each team finds its numbers where it already works.

- **Customers, before and after sign-in**: Guest visits join the customer's timeline, with sessions, spend and lifetime value. [Customers & Loyalty](https://www.commercengine.io/features/customers-and-loyalty.md)
- **Top products and customers**: Best sellers by quantity and value, and your top 25 customers by orders. [Top-selling products API](https://www.commercengine.io/docs/admin/api-reference/metrics/list-all-top-selling-products)
- **Delivery performance**: Early, on time and late deliveries by state, city and courier, with time to ship. [Shipping](https://www.commercengine.io/features/shipping.md)
- **Offer redemptions**: How often each coupon is used, the discount it gave and the order value it brought. [Coupons & Promotions](https://www.commercengine.io/features/coupons-and-promotions.md)
- **Webhook delivery health**: Delivered, failed and retried deliveries, with median and 95th percentile latency. [Webhook stats API](https://www.commercengine.io/docs/admin/api-reference/metrics/retrieve-webhook-stats)
- **Marketplace payouts**: Each seller's payouts at a glance: scheduled, paid, on hold and deducted. [Multi-vendor marketplaces](https://www.commercengine.io/solutions/marketplace.md)

## Events and APIs

The server sends commerce events in the ecommerce spec Segment and RudderStack follow. In the browser, `@commercengine/analytics` maps your storefront's events to the same names and IDs. Sessions, charts and the live stream each have an Admin API.

- `Order Completed`: Sent from the payment confirmation, when the payment for an order is confirmed.
- `Checkout Started`: A shopper starts checkout.
- `Product Added`: A product goes into a cart, from the storefront or the server, counted once.
- `Order Cancelled`: An order is cancelled, so reports stay honest.

API endpoints:

- `GET /analytics/sessions`
- `GET /analytics/sessions/{id}`
- `GET /store/sse/live-events`
- `GET /analytics/charts`
- `POST /analytics/dynamic-query`
- `GET /catalog/metrics/product-analytics`
- `GET /orders/metrics/stats`
- `GET /customers/metrics/stats`

**Docs:** [Analytics package guide](https://www.commercengine.io/docs/hosted-checkout/analytics) · [Analytics API](https://www.commercengine.io/docs/admin/api-reference/analytics/list-analytics-sessions)

## FAQ

### What does Commerce Engine's analytics include?

First-party analytics built into your store: commerce events tracked on the server, sessions with first- and last-touch attribution, a live view of every session and event, web analytics, product and checkout funnels, and reports on revenue, customers and repeat buying. All of it reads from the same data as your orders.

### What is tracked on the server?

More than 30 commerce events, from Product Added and Checkout Started to Order Completed, payments, refunds, sign-ups and logins. Order Completed is sent the moment a payment is confirmed, so a sale is recorded even if the shopper closes the tab or blocks scripts.

### Which tools can receive the data?

Segment and RudderStack, by adding a write key. From there your events reach every destination they support, such as ad platforms' conversion APIs, email tools and your data warehouse. Events follow the ecommerce spec those tools already use, so nothing needs remapping.

### Won't browser and server events be counted twice?

No. Key events, including Product Added, Checkout Started, Payment Info Entered, Order Completed, Order Cancelled and Order Refunded, carry the same event ID whether the browser or the server sends them, so destinations count each one once. Your own reports use the server's copy.

### How does attribution work?

Every visit becomes a session on the server. A session carries on while events keep arriving within two hours, and it records where the shopper first landed and where they last came from: source, medium, campaign, content and ad click IDs. Every event in the session carries that context, the payment and the order included, so each sale and each customer has a first and a last touch.

### Do I need ad pixels or third-party cookies?

Not to see the journey. Commerce events are recorded on your own server, so no pixel has to fire for a sale to count, and visits are tied to sessions on your store rather than to third-party cookies. Consent stays in your hands: the analytics package reads ad click IDs only when you allow it.

### How real-time is it?

Events reach your dashboard's live view as they're recorded, and any session or event can be opened as soon as it lands. Charts and reports follow moments later, in your store's timezone, by hour, day, week or month.

### Do I still need a separate web analytics tool?

You can keep one and feed it through Segment or RudderStack. But visitors, page views, sources and campaigns, popular pages, devices and busiest hours are already in your dashboard, measured against the same orders you ship.

### Can developers query the data?

Yes. Admin APIs return sessions with their activity, chart data, product and order metrics, and a dynamic query for counts, sums and averages grouped any way you need. A server-sent events stream delivers live activity to your own tools.

### Can I ask questions about my store in plain words?

Coming soon. You'll be able to ask questions such as which campaign's buyers came back for a second order, and get an answer worked out from your events and orders together, as they are right now.

## Related

- [Marketing & Campaigns](https://www.commercengine.io/features/marketing-and-campaigns.md): Put the data to work in campaigns and offers.
- [Customers & Loyalty](https://www.commercengine.io/features/customers-and-loyalty.md): The shopper behind the sessions, and their whole history.
- [Catalog & Inventory](https://www.commercengine.io/features/catalog.md): Reviews and conversion beside each product.
- [Shipping](https://www.commercengine.io/features/shipping.md): Delivery performance against every promise.

## Get started

Tell us about your store and the tools you already use. We'll connect your events, sessions and reports with you.

- [Book a demo](https://app.youform.com/forms/qqvhuspq)
- [Start building free](https://app.commercengine.io/signup) on the Free plan
- [Read the analytics package guide](https://www.commercengine.io/docs/hosted-checkout/analytics)
