Ad spend and ROAS

Updated 2026-11-25

How it works

Send each campaign's daily spend, and Ad spend in the dashboard shows it against the revenue Headstream credits to those campaigns from Stripe: ROAS, cost per visit, and spend that matched no tagged visits.

Spend meets revenue through utm_campaign. Tag every ad's URL with utm_campaign set to the campaign's name or its ID, and a visit from that ad, and any sale after it, counts toward that campaign. Campaigns on two platforms with the same tag split its revenue by spend, so nothing counts twice.

Spend is converted to the project's reporting currency at each day's rate.

Google Ads

Use a Google Ads script. It needs no developer token or app approval.

  1. In Ad spend, copy the script.
  2. In Google Ads, open Tools, then Bulk actions, then Scripts, and add a script.
  3. Paste it, authorize it and preview it once.
  4. Schedule it Daily. For history, set DAYS up to 1095 for the first run.

It sends the last 30 days each time, so cost adjustments are picked up. In Google Ads, set the tracking template's utm_campaign to {campaignid}, or tag each campaign by name.

The script holds a key that can only add spend to its project. Treat it like a password.

Meta, LinkedIn and others

Export a campaign report broken down by day as CSV and upload it in Ad spend. Exports from Meta Ads Manager, LinkedIn Campaign Manager and Google Ads are read as they come. The file is read in your browser, and only campaign, day, spend, clicks and impressions are sent. Sending a day again replaces it.

Agents can send spend they read from an ad platform with the MCP record_ad_spend tool, and anything else can use POST /api/v1/ad-spend.

Spend on likely bots

With a Vercel log drain, Headstream sees paid clicks whose page never ran the tracker, which almost always means a bot. Ad spend shows each campaign's spend on those clicks: its spend times their share of its clicks. Under ROAS it also shows ROAS on real clicks, which leaves that spend out. Those clicks never became visits, so they never earned credit, and the revenue stays the same.

See which marketing makes money.

10,000 events a month free · Every feature · No card

Start free
Lake Geneva · where everything the river carried comes to rest46.48° N 6.70° E