Formula

text
channel(payment) = first_touch(visitor(customer(payment))).channel

Follow each payment back to its customer, the customer to the visitor through identify, and the visitor to the source, medium, campaign, referrer and landing page of their first event.

Worked example

Inputs for the example
First visitGoogle Ads, 3 March
Second visitNewsletter, 9 March
Signup and payment$49 on 10 March
  1. The visitor’s first event carries utm_medium=cpc, so first touch is Google Ads.
  2. The $49 payment resolves to that visitor through identify.

Google Ads is credited with $49 of revenue; the newsletter gets none.

How ProductLense shows it

ProductLense stores first touch on every visitor’s first event in ClickHouse and resolves each payment to it when the payment is written, so revenue reports are plain table reads. The Sources page and the Revenue page show revenue, customers and profit by first-touch channel, source, campaign and landing page.

ProductLense needs the tracking script on your site so first touch is recorded, an identify call with your user id after signup or login, and a billing connection or the payment API so payments arrive with a customer email or user id that can be matched.

First-touch attribution: questions

What is first-touch attribution?
First-touch attribution credits a customer’s revenue to the channel, campaign and landing page of their very first recorded visit. It answers which channels start relationships that end in payment, which is the question most small SaaS teams need answered before they can judge any ad budget.
How do you calculate first-touch attribution?
Follow each payment back to its customer, the customer to the visitor through identify, and the visitor to the source, medium, campaign, referrer and landing page of their first event. For example, a visitor who first came from Google Ads and later from a newsletter credits a $49 payment to Google Ads.
Where does ProductLense show first-touch attribution?
ProductLense stores first touch on every visitor’s first event in ClickHouse and resolves each payment to it when the payment is written, so revenue reports are plain table reads. The Sources page and the Revenue page show revenue, customers and profit by first-touch channel, source, campaign and landing page.
What does ProductLense need to calculate first-touch attribution?
ProductLense needs the tracking script on your site so first touch is recorded, an identify call with your user id after signup or login, and a billing connection or the payment API so payments arrive with a customer email or user id that can be matched.
How is first-touch attribution different from last-touch attribution?
First touch credits the visit that started the relationship; last touch credits the final visit before the payment. First touch favours discovery channels such as search and content, last touch favours closing channels such as email and retargeting. ProductLense v1 uses first touch; last touch and linear are planned as a toggle in v1.1.

Free up to 10k events a month. No card.

Add the script, connect Stripe or any of 14 other billing providers, and see revenue by channel the same day.