Why track purchases?
Tracking purchases lets you answer:- How much revenue did we make this week?
- Which marketing channel drives the most purchases?
- What’s the average order value?
- How many users bought after clicking a specific CTA?
- What’s the conversion rate from signup to purchase?
The basic purchase event
Use the event namepurchase with an amount property:
Where to fire the purchase event
Fire it after the payment API confirms success — not when the user clicks the pay button.Stripe integration example
- React (JavaScript)
- React (TypeScript)
components/Checkout.jsx
Tracking the full purchase funnel
To understand where users drop off, track every step:Subscription events
For recurring subscriptions, track both the initial purchase and renewals:E-commerce cart tracking
Recommended purchase event properties
Verifying purchases are tracked
- Make a test purchase (use Stripe’s test card
4242 4242 4242 4242) - Go to Analytiq dashboard, click Events
- Filter by event name
purchase - Verify all properties appear correctly