Skip to main content
Connect your payment provider to see which marketing channels drive revenue, not just traffic.

Why revenue attribution?

Revenue attribution helps you:
  • See ROI - Understand which campaigns drive revenue, not just traffic
  • Optimize spend - Focus your marketing budget on channels that convert
  • Measure success - Track revenue by source, campaign, and keyword
  • Make data-driven decisions - Use revenue data to guide your marketing strategy

How it works

  1. Track visitors - PostMetric tracks all visitors to your site
  2. Record payments - When a payment is completed, it’s recorded in PostMetric
  3. Link payments to visitors - Payments are linked to visitors using:
    • Visitor/session IDs (most reliable)
    • Email matching (if user identification is enabled)
    • Timestamp correlation (fallback)
  4. View revenue data - See revenue by source, campaign, and more in your dashboard

Setup methods

Webhooks automatically send payment data to PostMetric when a payment is completed. This is the most reliable method.

Method 2: API

Record payments manually using our API. This is useful for custom payment providers or server-side implementations. See our Payment API documentation for details.

Linking payments to visitors

For best results, include visitor/session IDs in your payment metadata:
// When creating a payment
const payment = await stripe.checkout.sessions.create({
  // ... payment config
  metadata: {
    visitorId: window.postMetric?.getVisitorId(),
    sessionId: window.postMetric?.getSessionId(),
  },
});

View revenue data

Once payments are linked, you can view:
  • Revenue over time - See revenue trends
  • Revenue by source - Which channels drive the most revenue
  • Revenue by campaign - Campaign performance
  • Conversion rates - Revenue per visitor by source
  • Average order value - AOV by source

Next steps