# Product analytics for ecommerce

Open-source product analytics for ecommerce: track add-to-cart, checkout, and purchase as well-known events, analyse the funnel, and own every event.

Source: https://pug.sh/use-cases/ecommerce

Your store’s funnel is product → cart → checkout → purchase. Pug captures those steps as standard, typed events, shows you where buyers drop, and keeps the raw data yours.

## The checkout funnel

Model product_viewed → add_to_cart → checkout_started → purchase as a funnel and see the exact step where revenue leaks.

## Standard commerce events

add_to_cart, checkout_started, and purchase are well-known event names with typed properties such as amount and currency, so the data stays clean and portable.

## Repeat-purchase retention

Group buyers by first order and see how many come back: that return curve is your repeat-purchase rate.

## Own the raw events

Self-host under AGPL-3.0 so your customers’ purchase behavior stays on your infrastructure.

## Find the leak in the funnel

Most lost revenue hides between add-to-cart and a completed order. Track those steps as events and the funnel view points straight at the worst-converting step, which is the one to fix first.

## Use standard event names

Pug recognises well-known commerce events like add_to_cart, checkout_started, and purchase. Standard, typed names keep your data clean and portable instead of locking you into bespoke labels, and the tracking-plan generator can scaffold them for you.

## Ask Claude or ChatGPT where buyers drop

Connect Pug from Claude’s connectors directory or ChatGPT’s plugins, or point any MCP client at https://api.pug.sh/mcp, and ask which checkout step lost the most buyers last week or which countries ordered most. It reads the same API as the dashboard, so its answers match your funnels. Sixteen of its seventeen tools only read; the other creates and edits dashboards, and no connection can delete or share a dashboard, erase a person, or send events.

Built on well-known events like `add_to_cart`, `checkout_started`, `purchase`. [Generate a tracking plan](https://pug.sh/tools/event-tracking-plan-generator).

[Generate a commerce tracking plan](https://pug.sh/tools/event-tracking-plan-generator)

## Common questions

### Does Pug have ecommerce-specific features?

Pug is product analytics, applied to a store’s funnel. It doesn’t ship a bespoke ecommerce suite: what it gives you is funnels, retention, segmentation, and profiles over standard commerce events like add_to_cart and purchase. For most stores, that’s the question you need answered: where do buyers drop, and who comes back.

### How do I track purchases?

Call track() with the well-known event names (add_to_cart, checkout_started, purchase), and typed properties like amount and currency. The tracking-plan generator can produce that plan with PII flags so you instrument it cleanly.

### What does Pug Cloud cost for a store?

Every page view, autocaptured click or scroll, and event you track counts as one event, so narrow autoCapture to an allowlist if you only need page views and your commerce events. The first 100k events every month are free, with 1 year of history. Past that, the Pay as you go plan is $1 a month plus $20 per million events, falling in steps to $10 per million past 100M, and keeps 5 years of history. Each step bills only the events inside it, so a month of 1M events costs $19.00 and a month of 10M costs $167.00.

### Can I keep order data off third-party servers?

Yes. Self-host Pug under AGPL-3.0 and every event (including purchases) stays on your own infrastructure.
