Skip to main content

Revenue Tracking

Conversion rate is a proxy. Revenue per visitor is the real number.

A variant that gets 20% more add-to-carts but reduces average order value by 30% is a net loser. Revenue tracking shows you the full picture so you ship changes that actually grow your business.


What you see​

When revenue tracking is set up, your experiment results show:

  • Revenue per visitor for each variant (e.g. Control: $1.98 · Variant A: $2.40)
  • Total revenue attributed to each variant
  • Whether the winner is actually a winner in dollar terms

How to set it up​

Add one line of code when a purchase or conversion happens on your site:

window.datsnip.track('purchase', { revenue: 49.99 })

That's it. Datsnip automatically connects this to whichever experiment variant the visitor was assigned to.


Where to add it​

Shopify — Add to your Order Status page (Settings → Checkout → Additional scripts):

<script>
window.datsnip.track('purchase', {
revenue: {{ checkout.total_price | divided_by: 100.0 }}
})
</script>

WooCommerce — Add to your Order Received page (thank-you page).

Stripe — Add after stripe.confirmPayment() resolves successfully.

Any platform — Paste the tracking call on your order confirmation or thank-you page. The revenue amount is whatever you captured from the order.


Use as your experiment goal​

When setting up your experiment goal:

  1. Choose Custom event as the goal type
  2. Enter purchase as the event name (or whatever you used in your track() call)

Datsnip will track both conversion rate and revenue per visitor for each variant.


Ideas where revenue tracking changes the decision​

Upsell test — Testing whether an upsell popup increases total value. Without revenue tracking, you might see fewer checkout completions (lower CVR). With revenue tracking, you see whether those completions are worth more.

Pricing page — Testing annual vs monthly plan as default. Lower signup rate but higher revenue per signup? Revenue tracking reveals the true winner.

Product page — Testing a "buy now" button vs "add to cart." One drives impulsive purchases, the other drives cart building and potentially larger orders.

Bundle offers — Testing "buy 1" vs "buy 2 get 10% off." CVR might drop but revenue per visitor could be significantly higher.