See which
traffic pays

Revtrail ties every payment to the visit that brought it. See revenue by channel, page and campaign, and spend your time on what sells.

Get started

Open source. Run it in the cloud or on your own server.

https://revlytics-phi.vercel.app/demo

Loading the demo…

Set up in three steps

Demo data from the DeskStock demo site, last 30 days.
  1. 1

    Add the script

    Paste one line into your site’s <head>. The script is under 6 KB gzipped and starts counting visits straight away.

    Add to your <head>
    <script defer src="https://<your-revtrail-domain>/script.js"
      data-website-id="<your-website-id>"></script>
  2. 2

    Connect Dodo Payments

    Add a webhook URL in Dodo. Revtrail matches each payment to the visit that led to it and takes refunds off automatically.

    Revtrail's Dodo Payments settings with the webhook URL to paste into Dodo
  3. 3

    See what sells

    Revenue by channel, referrer, campaign, page and country, so you know what to do more of and what to drop.

    Revenue and visitors per channel

All the usual analytics, plus revenue

Everything you expect from web analytics, with revenue next to each number.

One dashboard

Visitors, revenue, conversion rate and revenue per visitor in one view, with pages, referrers and devices below.

Visitors, revenue and conversion rate over 30 days, with a traffic chart

Revenue attribution

Each payment is tied to the visit it came from, so you can break revenue down by channel, referrer, UTM campaign and country, with first-click or last-click attribution.

Revenue and visitors per channel: direct, organic search, organic social, referral

Goals, funnels and journeys

Track sign-ups and checkouts, see where people drop off, and follow the paths that end in a sale.

Homepage-to-free-trial funnel showing how many visitors reach each step

Visitor locations

Your traffic on a world map, down to region and city. Switch to realtime to watch visits as they arrive.

World map shaded by number of visitors per country

Also included

  • Heatmaps
  • Session replays
  • Retention cohorts
  • UTM and attribution models
  • Teams
  • REST API
  • Share links

Ask your AI about your revenue

Connect Claude, Cursor or any other MCP client, then ask things like “which channel brought the most revenue last month?” The answer comes from your own Revtrail data. The assistant gets your account’s permissions, so give it a read-only API key if it should only read.

Which channel brought the most revenue last month?

Direct brought the most: $36.7k from 1,200 visitors.

MCP client config
{
  "mcpServers": {
    "revtrail": {
      "url": "https://<your-revtrail-domain>/mcp",
      "headers": { "Authorization": "Bearer <your-api-key>" }
    }
  }
}

Works on any site

If you can add a script tag, you can use Revtrail. Revenue comes from Dodo Payments.

Revenue

Dodo Payments

Payments and refunds arrive by webhook and are matched to the visit that brought the buyer.

Tracking

Any website

  • Next.js
  • React
  • Astro
  • WordPress
  • Webflow
  • Framer
  • Plain HTML

Common questions

How is a payment matched to a visit?

The script gives each visit a session id, which travels with the checkout as payment metadata. Dodo payment links get it automatically; for checkouts you create on your server, you pass it yourself. When Dodo sends the payment webhook, Revtrail adds the payment to that session, with its channel, referrer and campaign.

What if a payment has no session id?

It still counts toward your revenue, as “direct”. If you call identify() with your user id, the payment is credited to that user’s first session instead.

Which payment providers are supported?

Dodo Payments, including refunds, which are taken off your revenue. More providers are planned.

Do I need a cookie banner?

By default the script sets a first-party cookie so returning visitors are counted accurately. Depending on where you and your visitors are, that may need consent. With cookieless mode on, the script sets no cookies and most sites can skip the banner, but visitor counts reset each month. Check with your own legal advisor.

Can I host it myself?

Yes. Revtrail is open source and built on Umami (MIT licence). It runs on a single small server with Docker and Postgres.

Who owns the data?

You do. Self-hosted, it never leaves your database, and you can export it through the REST API at any time.

Does it work with AI assistants?

Yes. Revtrail has an MCP server at /mcp, so Claude, Cursor and other MCP clients can query your traffic and revenue. The connection uses an API key with your account’s permissions, so use a read-only API key unless you want the assistant to create goals or segments too.

See which channels pay

Add the script today and watch revenue by channel fill in as payments arrive.