
Event Tracking
Part of Ecommerce measurement planning
Defining purchase, refund and repeat-customer events
Define qualifying purchases, processed refunds and repeat customers with clear order, timing and identity rules.
Define purchases, refunds and repeat customers from the store’s transaction history before using those labels in an analytics report. Specify when an order qualifies, when an adjustment takes effect and how orders are linked to a customer.
Define a qualifying purchase
Choose the milestone that fits the business question: order placed, payment confirmed or another documented status. Align the order ID, occurrence time, currency and amount definition with that choice. If counting retained orders, specify how later cancellations change the result.
Google Analytics describes ecommerce events such as purchase or refund, and notes that currency is set at event level when value is sent, with items presented as an array. This event format does not make its value equivalent to every store sales total. Shopify sales reports include pending, cancelled and unpaid orders in gross sales and exclude test and deleted orders; gross sales are before taxes, shipping, discounts and sales reversals.
Purchase, Refund and Repeat Customer Definitions Across Platforms
- Qualifying Purchase (Google Analytics)Event triggered at order placed, payment confirmed, or other documented status. Currency set at event level; value not necessarily equivalent to store sales total.
- Qualifying Purchase (Shopify)Included in gross sales if not pending, cancelled, unpaid, or deleted. Gross sales exclude taxes, shipping, discounts, and sales reversals.
- Actual Refund (Google Analytics)Refund event with currency at event level; items presented as array. Reflects completed refund, not request or approval.
- Actual Refund (Shopify)Sales reversal with negative monetary value. Do not treat every reversal as a return or subtract twice.
- Repeat Customer (Shopify)Customer with earlier qualifying purchase. Uses stable customer key; unlinked guest orders do not confirm new identity.
Define an actual refund
Choose the transaction-system milestone at which a refund is processed or posted. Keep a request or approval that has not changed the transaction separate from a completed refund. Distinguish a full refund from a partial item refund, and retain the original order ID and affected item details where available.
Google Analytics describes ecommerce events such as purchase or refund, with currency set at event level for value and items presented as an array. Shopify defines sales reversals as all order adjustments that result in negative monetary value. Do not treat every sales reversal as a return or subtract it again from an amount that already includes it.
Define repeat status from order history
Choose a stable customer key and a qualifying first purchase. Count an order as a repeat purchase when the same resolved customer has an earlier qualifying order. State whether the sequence uses order time, payment confirmation or another milestone. If records have the same timestamp, use a documented tie-break rule.
Keep orders with uncertain identity in an unknown group. An unlinked guest order does not prove the shopper is new. Report repeat orders separately from distinct customers who have repeated: one customer can place several repeat orders. If a customer-type field is sent with a purchase event, derive it from the documented order history.
A current customer segment is not necessarily a historical snapshot. Shopify automatically adds customers when they match segment criteria and automatically removes them when they no longer match. Preserve the classification used for a historical analysis instead of applying today’s membership to an earlier purchase.
Check example records before reporting
Apply the rules to a normal order, a cancelled order, a partial refund, a linked second order and a guest order with uncertain identity. For each, write the expected purchase count, refund amount and repeat classification. The outcome depends on the store’s records and chosen definitions.
Keep the rules beside the report: qualifying statuses, amount calculation, time zone, customer key, unknown-identity treatment and adjustment window. This lets readers explain later changes without changing what the labels mean.

