Revenue Tracking
Ovyxa attributes revenue to the traffic sources, pages, and campaigns that generated it. Every stats view — sources, pages, countries, devices — shows revenue alongside visitors so you can see what actually drives paying customers.
Revenue Dashboard Metrics
Once revenue data flows in, you get:
- Revenue Per Visitor (RPV) — total revenue divided by unique visitors, shown in the overview.
- Revenue by Source — which referrers, UTM campaigns, and channels generate the most revenue.
- Revenue by Page — which landing pages lead to purchases.
- Revenue by Country / Device — geographic and device breakdowns with revenue columns.
- New vs Refund — the timeseries chart separates new revenue from refunds.
Stripe Setup
- In your Stripe Dashboard, go to Developers → Webhooks → Add endpoint.
- Set the endpoint URL to:
https://api.ovyxa.com/api/v1/webhooks/stripe
-
Select these events:
checkout.session.completedcharge.refundedinvoice.paid
-
Copy the Signing Secret (
whsec_...) and paste it into your Ovyxa site settings under Revenue → Stripe. -
Ovyxa matches Stripe sessions to visitors via the
session_idURL parameter (see Payment Link Auto-Detection below).
LemonSqueezy Setup
- In your LemonSqueezy dashboard, go to Settings → Webhooks.
- Set the webhook URL to:
https://api.ovyxa.com/api/v1/webhooks/lemonsqueezy
- Select events:
order_created,order_refunded. - Copy the signing secret into Ovyxa site settings under Revenue → LemonSqueezy.
Paddle Setup
- In Paddle, navigate to Developer Tools → Notifications.
- Add a new notification destination with URL:
https://api.ovyxa.com/api/v1/webhooks/paddle
- Subscribe to:
transaction.completed,transaction.payment_failed,adjustment.created. - Enter the webhook secret in Ovyxa site settings under Revenue → Paddle.
Polar Setup
- In Polar, go to Settings → Webhooks.
- Add the endpoint:
https://api.ovyxa.com/api/v1/webhooks/polar
- Subscribe to:
order.created,refund.created. - Save the secret in Ovyxa site settings under Revenue → Polar.
Custom Payments API
If you use a payment provider Ovyxa does not natively support, send payment data directly:
curl -X POST https://api.ovyxa.com/api/v1/stats/payments \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"site_id": "example.com",
"amount": 4900,
"currency": "USD",
"visitor_id": "abc-123-def",
"timestamp": "2026-03-04T12:00:00Z",
"event_name": "Purchase",
"metadata": { "plan": "growth" }
}'
amountis in cents (4900 = $49.00).visitor_idties the payment to a tracked visitor (from theovyxa_vidcookie or localStorage).- To record a refund, send a negative
amountor include"type": "refund".
JavaScript API
Track revenue directly from the frontend with a custom event:
<script>
ovyxa('event', 'Purchase', {
revenue: { amount: 49.00, currency: 'USD' },
props: { plan: 'growth', method: 'credit_card' }
});
</script>
The revenue object accepts amount (number) and currency (ISO 4217 code). Revenue events appear in both the Events report and all revenue breakdowns.
Payment Link Auto-Detection
When a visitor returns from a checkout page with a session_id or checkout_session_id URL parameter, Ovyxa automatically captures it and ties it to the visitor session:
https://example.com/thank-you?session_id=cs_live_abc123
The tracking script reads this parameter on page load, stores it, and sends it with the pageview event. When the corresponding Stripe (or other provider) webhook fires, Ovyxa matches the checkout session to the visitor who started it — completing the attribution loop.
No extra code is required. Just make sure your checkout success URL includes the {CHECKOUT_SESSION_ID} template variable.
Troubleshooting
| Problem | Solution |
|---|---|
| Revenue not showing | Check that the webhook secret matches and events are selected |
| Revenue not attributed to a source | Ensure the visitor completed at least one pageview before checkout |
| Duplicate payments | Ovyxa deduplicates by provider transaction ID automatically |
| Wrong currency | All amounts are converted to your site's base currency using daily exchange rates |