Revenue per source, channel and campaign
Updated October 18, 2026
Visits tell you where people come from. Revenue tells you which of those places bring buyers. Send the amount with your purchase event and every panel of the report gets a Revenue column.
Send the amount
On the page that confirms a purchase, call:
window.statsdot.track('Purchase', null, { revenue: 49.90, currency: 'EUR', id: 'order-1001' });
revenueis the amount as a number, with a dot for decimals.currencyis the ISO code (EUR,USD,GBP...). Without it, the site's currency is used.id(optional) is your order or transaction number. For 7 days, a purchase with an id Statsdot has already received is ignored, so a reloaded thank-you page or a retry does not count twice, and you can delete the purchase (see below).- The event name is yours to choose:
Purchase,Subscription,Order. Create a goal for it to see conversions too.
Ready-made: the WordPress plugin sends WooCommerce orders with their total automatically, and the WooCommerce and PrestaShop guides show the code by hand.
What you see
When the period has purchases:
- a Revenue figure next to visitors and pageviews, compared with the previous period;
- a Revenue column in Sources (referrers, channels and every UTM tab, including the keyword), in Entry pages, and in countries, devices, browsers and systems.
Set the currency of your reports in the site settings, under Revenue. Purchases in another currency are recorded but not added to the totals, because Statsdot does not convert currencies.
How a purchase is credited
A purchase is credited to the visit it happened in: the source, channel, campaign and entry page of that visit. Statsdot's visitor code lasts one day (that is how it works without cookies), so a purchase is linked to the visit of the same day only.
That covers most purchases made in one sitting. It does not cover someone who comes from an ad on Monday and buys on Thursday: that purchase is credited to Thursday's visit, often direct. Tools that attribute revenue across days do it with an identifier that follows the customer, usually a cookie or the customer's account. Statsdot does not keep one.
Renewals and other payments made without a visit (charged by your payment provider) are not counted; only purchases sent from the browser are.
Delete a purchase
Test orders and mistakes can be removed with the id you sent, within 7 days: DELETE /api/v1/sites/{site}/conversions/{id} with a token that has write access (the id URL-encoded), or the MCP tool delete-conversion. The purchase and its revenue disappear from every report. After 7 days, and for purchases sent without an id, a purchase can no longer be deleted on its own.
What is sent and stored
The event name, the page, the amount, the currency and, if you send it, the id. Statsdot does not store the id itself but a keyed hash of it (HMAC with a server secret, different for each site), and only for 7 days; then it is deleted and nothing links the purchase to an order. While it exists, the link is real: Statsdot holds the key and order numbers are short, so it could recompute them, and deleting a purchase by id shows you which visit it came from. That is why the window is short. If you do not need deletions, do not send an id. Never send an email address or a customer name as the label.
API
GET /api/v1/sites/{site}/stats/overview includes revenue (in cents of the site's currency), and breakdown rows carry a revenue field when the period has purchases. See the API.