Half your marketing is wasted. See which half.
Web analytics and revenue attribution for SaaS. Install one script, connect Stripe, and see which channels make money. Your AI agent gets what to fix next, ranked by dollars.
10,000 events a month free · Every feature · No card
- Social$2,919
- Paid search$3,752
- Email$5,003
- Organic search$7,088
Matches Stripe$20,846 of $20,846 ✓
Next fix: paid social returned $84 on $1,240. Move it to email.+$1,900/mo
Let your agent do the setup
Paste this into Claude Code, Cursor or any coding agent. It installs the script, proves it works, and asks you only when a step needs a person.
Read https://headstream.app/agent.md and set up Headstream on this site.- 01
Add one script
A 2 KB tracker records every visit, campaign and click ID.
- 02
Connect Stripe
Read-only access. Your history imports automatically.
- 03
See what pays
Revenue is credited back to the channels that earned it.
- 04
Your agent ships the fix
It gets the top fix with evidence, makes the change, and checks if it worked.
Attribution you can check against your bank account.
Every channel drains into one total, and money we can't place stays on the map as unattributed. If the total doesn't equal Stripe, the report doesn't publish.
organic search $7,088 •━━━━━━━━━━━━━━━┓ email $5,003 ━━━━━━━━━━━━━┓ ┃ paid search $3,752 ━━━━━━━━•━┓ ┃ ┃ social $2,919 ━━━━━━━┓ ┃ ┃ ┃ unattributed $2,084 ┄┄┄┄┐ ┃ ┃ ┃ ┃ └┄┄┻━━┻━━┻━━┻•━━ revenue $20,846 stripe $20,846 difference $0
Reconciled to Stripe
Attributed plus unattributed always equals your Stripe total. If it doesn't, the report won't publish.
Four attribution models
Switch between first touch, last touch, linear and U-shaped, with a lookback window you control.
Every customer's journey
Open any buyer and see each visit and payment in order, so a credit is never a black box.
Analytics included
Traffic, sources, campaigns, pages, countries and devices sit next to revenue in one dashboard.
Built for agents
Everything in the dashboard is available over MCP, REST and a CLI, including a ranked list of what to fix.
First-party tracking
Serve the script from your own domain, with long-lived visitor IDs across subdomains.
Your agent gets the fix, with receipts.
Your agent asks over MCP, the API or the CLI. Headstream reads your events and Stripe charges, then answers with what to change, what it's worth a month, and the rows behind it.
What Headstream reads
Tracker events
| time | type | path | source |
|---|---|---|---|
| Oct 3 14:02 | deploy | /pricing | github |
| Oct 3 14:09 | pageview | /pricing | |
| Oct 3 14:09 | click | plan: monthly | |
| Oct 3 14:11 | pageview | /pricing | newsletter |
+ 48,210 more rows
Stripe charges
| time | amount | plan |
|---|---|---|
| Oct 2 09:14 | $1,032.00 | annual |
| Oct 3 15:40 | $86.00 | monthly |
| Oct 3 17:02 | $86.00 | monthly |
+ 612 more charges
What your agent gets
Revenue from /pricing visitors fell 22% after the Oct 3 deploy. Annual plans fell from 31 to 9 a month once the new plan table hid the annual toggle. That's 80% of the drop.
- Annual share of checkouts 21% → 7%
- Monthly checkouts 118 → 121
- /pricing visits steady at 6,400
Fix: Restore the annual toggle on /pricing.
+$1,900/mo
22 more annual plans a month at $86 a month each
Source: Headstream tracker events, Stripe charges. Data through Nov 24, 21:33 UTC.
Example data
Numbers you can check for yourself
People stop trusting analytics when totals don't match and nobody can explain why. Every Headstream number links to its definition and the rows behind it.
Trace every payment
Follow any payment from the Stripe event to the visits that earned the credit, with a check that it all adds up.
How the paper trail works →See what tracking misses
Put "how did you hear about us?" answers next to tracked visits, and see the revenue behind each one.
Self-reported attribution →Understand the method
Read how each metric is calculated, what's left out and what no analytics tool can see.
Our methodology →
Pricing
Priced by events per month. No sales call needed.
Free
Start here$0/mo
10,000 events a month
1,000 session recordings a month
- Every feature
- Unlimited sites and teammates
- No card needed
Starter
$19/mo
50,000 events a month
2,500 session recordings a month
Everything in Free, with room to grow. Upgrade in the app when you need it.
Start freePro
$79/mo
250,000 events a month
5,000 session recordings a month
Everything in Free, with room to grow. Upgrade in the app when you need it.
Start freeGrowth
$299/mo
1,000,000 events a month
25,000 session recordings a month
Everything in Free, with room to grow. Upgrade in the app when you need it.
Start freeScale
$799/mo
5,000,000 events a month
100,000 session recordings a month
Everything in Free, with room to grow. Upgrade in the app when you need it.
Start free