Skip to main content
Revenue9 min read

Revenue attribution: what it is, which model to use and how to do it

Revenue attribution puts a source next to every sale, so you rank channels by money instead of clicks. What it is, which model to pick, how a Stripe, Lemon Squeezy or Paddle payment gets tied to a visit, and where it stops.

Vicente TorresFounder of Vero

Traffic reports tell you where visits came from. Revenue attribution tells you where the money came from. It takes every sale your payment provider records and credits it to the marketing channel that brought the buyer, so the ranking you act on is by revenue, not by visits. This page is the overview: what revenue attribution is and how it differs from conversion tracking, which attribution model to use, how a payment gets tied to a visit on Stripe, Lemon Squeezy and Paddle, what happens to renewals and refunds, and why revenue by source is still not profit. If you want the hands-on version without cookies, read [how to attribute revenue without cookies](/blog/attribute-revenue-without-cookies).

What is revenue attribution?

Revenue attribution answers one question per sale: which visit led to this payment, and how did that visit begin? Add up the answers and you get revenue by source, by campaign, by referrer, by channel and by entry page.

The useful part is the ranking it produces. A source that sends a lot of visits and few buyers drops. A small newsletter that sends people ready to pay climbs. That is the case for ranking sources by revenue instead of visits: traffic is what a channel sends you, revenue is what it is worth.

How is revenue attribution different from conversion tracking?

Conversion tracking counts an event: a signup, a click on buy, a thank-you page reached. It tells you how many visits did the thing. It does not tell you what the thing was worth, and it fires whether or not the payment went through.

Revenue attribution starts from the payment. The amount comes from your payment provider, after it has charged the card, so a failed card, a test order or a free trial never counts as money. Then refunds come off the sale they belong to. You read what each channel actually earned, not how many times someone reached a page.

The two work together. A goal tells you where people drop on the way to pay. Revenue attribution tells you which of the people who did pay came from where.

Which attribution model should you use?

A model is the rule that decides which visit gets the credit when a buyer had more than one. First-touch credits the visit that introduced them. Last-touch credits the visit right before the payment. Linear splits the credit evenly across every visit on record, and position-based weights the first and last more than the ones in between. Data-driven models fit the weights to your own history, which needs a long memory of each person and a lot of sales.

Last-touch sounds the most direct, and on a site with a checkout it misleads the most. The visit right before payment usually begins on your own pricing page, with your own site as the referrer, so it reads as direct. Credit it, and almost every sale lands on direct.

Vero uses first touch (the first touch against last touch post covers where each one fails): a sale goes to how its visit began, its utm_source, else the host of its referrer, else direct. It is the same rule the traffic reports use, so a source on the Sources screen and the same source on the revenue screen always mean the same visits. On Pro, a separate card puts the source that found a customer beside the source that closed the sale, for sales on the same day.

No model is the truth. Each one is a way to rank where paying visits came from. Pick one, keep it, and compare channels with it over time.

How does a sale get tied to a visit?

The payment provider knows the amount. The analytics knows the visit. Attribution needs one reference that both of them see, so the visit has to travel with the checkout and come back with the payment.

In Vero, the tracker holds an ephemeral session id in memory while the page is open. When the customer goes to pay, that id is handed to the provider in a field it already offers for a reference of your own. When the payment completes, the provider sends a signed webhook, Vero checks the signature, reads the amount and the id, and links the sale to the visit, all on the server. An id counts only if it names a visit of that site.

The tracker’s checkout module adds the id to Stripe Payment Links and Lemon Squeezy checkout links on the click, so the link does the work. The core with that module weighs 1.4 KB gzipped. If you run your own checkout, your server posts the sale with the id to Vero’s ingest endpoint instead.

How do you attribute Stripe, Lemon Squeezy and Paddle revenue to marketing channels?

On Stripe, the visit rides as the client_reference_id of a Payment Link, which Stripe documents among its Payment Link URL parameters, or as a metadata.vero field on the checkout or its subscription. Stripe then sends checkout.session.completed or invoice.paid, and charge.refunded for a refund.

On Lemon Squeezy, the checkout link carries it as checkout[custom][vero], the mechanism Lemon Squeezy describes for passing custom data. The webhook returns it in meta.custom_data.vero, with order_created for a sale and subscription_payment_success for a renewal.

On Paddle, you open Paddle.js with customData: { vero: window.vero.session() }, using Paddle’s custom data on transactions. The webhook returns it in data.custom_data.vero with transaction.completed.

For each provider you paste one webhook URL into its dashboard and its signing secret into Vero. The step-by-step guide to connecting a provider covers the setup, one provider at a time. Revenue by source, campaign, referrer, channel and entry page is part of Pro. On Hobby, every sale is still stored, and you see the total and the number of sales.

What happens to renewals and refunds?

A subscription renews without anyone visiting your site, so the renewal webhook carries no visit id. Left alone, every renewal would have no source, and the channel that brings customers who stay a year would look the same as one that brings customers who cancel after a month. In Vero, a sale without a visit id inherits the source of that customer’s first attributed payment. The customer who arrived from a newsletter in January is still credited to the newsletter when month six is billed.

A refund comes off the sale it belongs to, in that sale’s proportion, so it comes off that sale’s source too. A channel whose buyers ask for their money back is scored on what it kept. Disputes are not deducted: the revenue webhooks handle refunds only, so a payment lost in a dispute counts until you refund it.

Each sale also stores its source, campaign, referrer, channel, entry page and first-touch time when it arrives. A sale from March keeps the source it had in March, whatever date range you read it in.

Revenue by source is not profit by source

A sale in Vero is what was charged, without tax, less refunds, before fees. The tax comes out using the figure each provider sends. The provider’s fee does not, because Vero does not know what the provider charged you. Read it as what your customers paid for the product, not what reached your bank.

It also says nothing about what each channel cost. A paid campaign that brings in the most revenue can still lose money once you count the ad spend. Enter each source’s monthly cost and Vero subtracts it, prorated to the period, to show profit by source. Profit by source after ad spend shows how to read it.

Where revenue attribution stops

Vero is cookie-free, so the anonymous visitor id rotates daily, and a first sale is credited to a visit from the same day. Someone who reads your post on Monday and buys on Friday is credited to how Friday’s visit began. Cookie-free analytics explains why that trade exists and what else it gives up.

A first sale with no visit on record has no source: a checkout link that never carried the id, a payment from a device the tracker never saw, or a browser whose ad blocker stopped the script. The sale still counts in your revenue. It just sits outside every source, and is never assigned to one by guesswork.

Attribution also only sees clicks that led to a visit. An ad someone saw and never clicked, a podcast mention or a recommendation from a friend shows up as whatever visit followed it, usually direct or search. How to attribute revenue without cookies works through these limits on a full demo week.

Unsure of a term? Read the glossary

Vicente Torres
Vero is built by one person in Spain. I read every waitlist entry and pick the beta accounts myself.
Vicente Torres, Founder of Vero LinkedIn
Hand-picked beta, waitlist open

Ask for a place in the beta.

Anyone can join the list. The accounts we pick get Pro free for the whole beta.

By joining you agree to receive launch updates and accept our Privacy Policy.

See the demo