Mixpanel

Mixpanel E-commerce Tracking: Event Schema and Implementation Guide

Mixpanel is excellent for understanding how shoppers move through your store: which products they view, where they drop out of checkout and which customers come back. But Mixpanel doesn’t decide your events for you. The quality of every funnel and retention report depends on the schema you design before writing any code.

This guide walks through that schema, the implementation and the checks that keep the data trustworthy.

Step 1: Agree on naming before anything else

Mixpanel accepts any event name, which is exactly why projects get messy. Pick one convention and write it down:

  • Readable names such as Product Viewed, Product Added, Checkout Started, Order Completed.
  • GA4-style names such as view_item, add_to_cart, begin_checkout, purchase, if you want the same names across Mixpanel and GA4.

Neither is “correct”. What matters is consistency: one name per action, the same casing everywhere, and no synonyms. Mixing Purchase, purchase and Order Completed splits one action into three events.

Step 2: Define the core e-commerce events

A typical store needs these events. The names below use GA4-style naming as an example:

EventWhen it firesKey properties
page_viewEvery page loadpage type, page path, logged-in state
view_itemProduct page viewedproduct ID, name, category, price, currency
add_to_cartItem added to cartproduct ID, name, price, quantity, cart value
begin_checkoutCheckout startedcart value, item count, currency
add_shipping_infoShipping step completedshipping method, cart value
add_payment_infoPayment step completedpayment type, cart value
purchaseOrder confirmedorder ID, revenue, tax, shipping, discount, currency, items

Keep properties typed correctly: prices and revenue as numbers, IDs as strings, and lists of products as an array of objects. Mixpanel can only sum, average and break down properties that arrive in a consistent type.

Step 3: Choose where each property lives

Mixpanel has three places for data, and putting a value in the wrong one causes confusing reports:

  • Event properties describe one action, such as the price of the product in that add_to_cart.
  • Super properties are attached automatically to every event from that browser, such as the landing page UTM or the store currency.
  • User profile properties describe the person, such as total orders or plan type, and are updated over time.

A useful rule: if the value can change from one event to the next, it’s an event property. If it describes the visitor for the whole session, it can be a super property. If it describes the customer across sessions, put it on the profile.

Step 4: Handle identity properly

Shoppers browse anonymously, then log in or check out. To connect those journeys, call Mixpanel’s identify with your own stable customer ID when the person logs in or completes a purchase. Mixpanel then links the anonymous events on that device to the known user.

Two common mistakes:

  • Using an email address as the ID. Emails change and are personal data. Use your internal customer ID.
  • Calling identify with different IDs for the same person (for example order ID on one page, customer ID on another), which splits the customer into several profiles.

Step 5: Send purchases from the server too

Browser events can be blocked or lost when the buyer closes the tab before the thank-you page loads. For revenue you want to trust, also send purchase from your backend or a server-side container when the order is confirmed.

To stop the browser and server copies being counted twice, give both the same $insert_id (for example a value derived from the order ID). Mixpanel deduplicates events that share an $insert_id, so each order is counted once.

Keep the project token and any API secrets on the server; never put secrets in browser code.

Step 6: Validate before you trust the reports

  • Use Mixpanel’s live event view while you browse your store, and check every step fires once with the right properties.
  • Place a few real test orders and compare Mixpanel order count and revenue with your store admin.
  • Build the purchase funnel and check that each step has fewer users than the one before it. A step with more users usually means an event fires on the wrong page.
  • Re-check after theme updates, checkout changes and new apps.

A short tracking plan template

Before implementation, write one row per event:

EventTriggerProperties (type)OwnerStatus
add_to_cartAdd-to-cart button successproduct_id (string), price (number), quantity (number), currency (string)DevPlanned

This document becomes the contract between marketing, product and developers, and it is what keeps the Mixpanel project clean as it grows.

Want a clean Mixpanel setup?

I design Mixpanel tracking plans and implement e-commerce, lead and server-side events, with identity and validation built in. See Mixpanel tracking setup, or, if your data layer needs fixing first, the WordPress DataLayer 2.0 service.

Direct Implementation White-Label for Agencies

Need this implemented, audited, or white-labeled?

Whether you are an eCommerce brand owner fixing signal loss or a digital marketing agency needing a senior analytics engineer under strict NDA, I deliver 24–48h SLA turnaround with 8.5+ EMQ match rates.

✓ 24–48h Emergency SLA ✓ Strict Non-Solicitation & NDA ✓ 8.5+ Event Match Quality
Jobair Mahmud

Jobair Mahmud

AI-Driven Performance Marketing & Web Analytics Consultant

Helping eCommerce brands and marketing agencies trust their ads data, scale Smart Bidding, and eliminate wasted ad spend through bulletproof server-side tracking and PPC management.