Facebook and Instagram ad spend and ROAS, read by itself
Connect Meta once and give each ad account to a project. Every night Sumly reads what each campaign spent on Facebook and Instagram, so ROI shows what it cost and what the people it brought paid.
Three steps
Sumly asks Meta only for ads_read: it can see reports, never change an ad.
-
1
On Costs › Ad spend, press Connect Meta Ads and allow Sumly to read your ads' reports.
-
2
Pick the project each ad account is for and how far back the first read goes, up to two years.
-
3
In each ad's URL parameters add
utm_source=facebook&utm_medium=paid&utm_campaign={{campaign.name}}, so each campaign meets its visitors.
Or let your coding assistant do it
Paste this into Claude Code, Cursor or Codex in your project. It fits the code to how your project is built, asks you for the dashboard steps and leaves the keys to you.
See what it says
Set up Meta Ads for Sumly in this project.
Sumly (https://sumly.dev) shows revenue next to the visits and app users it came from. The full guide is https://sumly.dev/integrations/meta-ads; read it if anything below is unclear.
Steps:
1. On Costs › Ad spend, press Connect Meta Ads and allow Sumly to read your ads' reports.
2. Pick the project each ad account is for and how far back the first read goes, up to two years.
3. In each ad's URL parameters add `utm_source=facebook&utm_medium=paid&utm_campaign={{campaign.name}}`, so each campaign meets its visitors.
So each payment shows which visit it came from: A campaign whose name or id the visits carry as utm_campaign counts for that campaign on ROI. Meta's click id (fbclid) is also added to links people share, so it alone does not say a visit came from an ad; a campaign without a matching tag shows its spend under its own name.
Keep in mind: Not open yet: Meta is still reviewing Sumly's app for ads_read. Until then, import Meta Ads exports on Costs or send spend through the costs API. Meta gives access for about 60 days at a time: the page asks you to connect again before it ends. Campaigns only, not ad sets or single ads.
How to work:
- Look at how this project is built first, and fit the code to its framework and its way of doing things; the examples above are a starting point, not something to paste as is.
- Steps that happen in a dashboard (Sumly, or Meta Ads's own) are mine: tell me exactly what to click, then wait for me.
- Keys the code needs belong in environment variables, never in the code or the repository. Never ask me to paste a secret key into this chat; tell me which variable to set.
- Change only what this needs, show me the changes before you commit, and tell me how to check that it works.
What you see after connecting
Meta Ads next to every other project and provider, on the same pages.
Costs
One line per campaign, with the days read from Meta Ads.
ROI
What each campaign spent next to what the visitors it brought paid, its ROI and payback.
Overview
Profit with the ad spend taken off.
Which campaign brought them
A campaign whose name or id the visits carry as utm_campaign counts for that campaign on ROI. Meta's click id (fbclid) is also added to links people share, so it alone does not say a visit came from an ad; a campaign without a matching tag shows its spend under its own name.
How attribution works →Counts toward your plan
Nothing: costs never count toward your plan. Plans →
What you don't get
No conversions from Meta's pixel and no changes to ads: Sumly counts the payments itself, from your payment provider.
The details
What is read
- Each campaign's spend, clicks and impressions by day, from the Insights API
- The ad account's name and currency
When
- Every night, the last seven days again, as Meta corrects recent days.
- Read now on the Ad spend page, at any time.
- Costs stay in the ad account's currency and turn into euros at the European Central Bank's rate of each day.
- Each campaign and day is one cost, known by Meta's ids: read again it is updated, never added twice, and a line imported from a Meta Ads export for the same campaign and day is replaced.
Good to know
- Not open yet: Meta is still reviewing Sumly's app for ads_read. Until then, import Meta Ads exports on Costs or send spend through the costs API.
- Meta gives access for about 60 days at a time: the page asks you to connect again before it ends.
- Campaigns only, not ad sets or single ads.
Meta Ads questions
Does Sumly change my ads?
No. It asks only for ads_read, which lets it read reports and nothing else.
Why does a campaign show no visitors?
Its ads carry no utm_campaign that matches its name or id. Add URL parameters to the ads; Meta fills in {{campaign.name}} for each.
I imported Meta Ads exports before. Will they double?
No. The day and campaign read from the account replace the imported line for the same campaign and day.
What happens after 60 days?
Meta ends Sumly's access unless you connect again. The page says how many days are left and asks a week before.
Other integrations
Try it with your own projects
Sign in with Google or a code by e-mail and connect your first project. The first 14 days of a paid plan are free, with no card.
Start free trialOr look around first: open the live demo.