Revenue

How much money came in, per day and per currency, and where the people who paid first came from.

Snekot adds up the payments it is told about: how much came in over a range, each day of it, the period before for comparison, and which sources, campaigns and landing pages the paying people first arrived by.

What counts

Three events in the payments channel are money, each with a number as its amount tag and a three-letter currency:

Event Counts as
Order paid Money in
Subscription renewed Money in
Refund Money back, taken off the day the refund was made

An event with the tag test set to true is left out, as is an amount that is not a number. Every other event in the channel, such as a failed payment or a subscription starting, is shown in the feed and not counted as money.

Send them from the place that knows a payment happened, such as the handler of your payment provider’s webhook:

curl -X POST https://api.snekot.co/v1/log \
  -H "Authorization: Bearer YOUR_PRIVATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"project":"your-project","channel":"payments","event":"Order paid","user_id":"user_42","tags":{"amount":49,"currency":"USD"}}'

amount is in the currency’s own unit, as a person would say it: 49 is 49 dollars and 49.5 is 49.50. Do not send a name, an email address or a card number with it; none of them is needed.

Whose payment it is

A payment belongs to the person in its user_id. Use the same id your product gives identify and the browser script’s setUserId, and the payment lands on the person whose visits are already there.

For someone who pays without an account, send the visitor in place of a person, as for any event from a server: the visitor_id their browser keeps, or their ip and user_agent.

A payment that names no one still counts toward the total. It has no known source.

Currencies

Nothing is converted. Each currency has a total of its own, with its own days and its own period before, and the one with the most payments comes first. A converted sum would need a rate for every day, and would match nobody’s bank statement.

Where the money came from

Each paying person has a first source: the site, search engine or tagged link of their first visit on record, by the same names the Views page uses. Money is split by that first source, by the campaign that first visit was tagged with (utm_campaign), and by the page it landed on. A customer who first came from a search in March and pays in June is the search’s money in June.

What cannot be tied to a visit is said as its own figure, no known source: payments that name no one, and people with no visit on record. It is part of the total, never spread over the sources that are known.

Visitors are told apart for a day unless your site remembers them, so someone who reads today and signs up next week is known from the visit where they signed in.

In the app

  • Revenue, in the sidebar, is the page for it: the total against the period before, the payments, what was refunded and how much has no known source, each day as a line, and the referrers, campaigns and entry pages in order of what they brought. With several currencies, pick one above the line and the whole page follows it. On a phone it is under More, or the coins at the top of Charts in a browser.
  • Charts, Add chart, Revenue puts the total, the change against the period before and a line of each day on the board. With several currencies, pick one above the line.
  • Views shows a Revenue column in the Referrer, Campaign and Entry page lists once the project has payments. Press Revenue to put the rows in order of money, and Visitors to put them back. The last line of each list says how much has no known source.

Reading it

With a read key, in any range:

curl "https://api.snekot.co/v1/revenue?days=30" -H "Authorization: Bearer YOUR_READ_KEY"
{
  "from": "2026-10-27", "to": "2026-11-25", "timezone": "UTC", "bucket": "day", "connected": false,
  "currencies": [
    { "currency": "USD", "total": 219.3, "sales": 238.3, "refunded": 19, "payments": 7, "refunds": 1, "prior_total": 40,
      "series": [{ "start": "2026-10-27", "amount": 0 }, { "start": "2026-10-28", "amount": 49 }] }
  ]
}

total is sales less refunded. series has every day of the range, or every week once the range is longer than 92 days; a day with more refunded than paid is below zero.

curl "https://api.snekot.co/v1/revenue/sources?days=30" -H "Authorization: Bearer YOUR_READ_KEY"
{
  "from": "2026-10-27", "to": "2026-11-25", "timezone": "UTC", "approximate": false,
  "currencies": [
    { "currency": "USD", "total": 219.3, "payments": 7, "unknown": 30, "unknown_payments": 2,
      "sources": [{ "name": "Google", "kind": "search", "revenue": 79, "payments": 2, "payers": 1, "visitors": 312, "views": 350 }],
      "campaigns": [{ "name": "spring", "revenue": 79, "payments": 2, "payers": 1, "visitors": 40, "views": 44 }],
      "entry_pages": [{ "name": "/pricing", "revenue": 79, "payments": 2, "payers": 1, "visitors": 120, "views": 131 }] }
  ]
}

sources and unknown add up to total. Each row also has the visitors who arrived that way in the range, paying or not, so money can be read beside traffic. A key limited to channels cannot see page views, so it gets no split.

Assistants read the same two answers with the revenue and revenue_by_source tools.