DocsMeasure
Meta ad spend and ROAS
Connect Meta Ads in one click to see what each campaign, ad set and ad cost next to the sales Datacenter credits, with Meta's own numbers beside ours.
On this page
Connect Meta Ads, and the Attribution tab shows what each campaign, ad set and ad cost next to the sales Datacenter credited to it. You see return on ad spend (ROAS), cost per purchase, and what Meta says beside what Datacenter saw.
Datacenter only reads. It can never change your ads, budgets or audiences.
It is on paid plans: Solo, Studio, Agency and Custom. Free does not include it.
Connect with Meta
- Open your site, then Settings, then Integrations. Under Ad spend, click Connect next to Meta Ads.
- Log in to Meta and allow Datacenter to read your ad results.
- Back in Datacenter, tick the ad accounts to read. Accounts that spent in the last 90 days are ticked for you.
- Click Start. A progress bar shows the import of the last 90 days. You can leave the page.
That is all. After the import, spend updates every hour.
When the login ends
A Meta login can end, often after about 60 days. When it does, the Meta Ads row says Reconnect. Click Reconnect Meta and log in again. Your spend so far is kept, and the sync picks up where it stopped.
Other ways to connect: a System User token
A System User token never ends, which suits agencies with many clients. Open Other ways to connect on the Meta Ads page and follow these steps. Meta's screens change from time to time, so the names may differ a little.
- In Meta, open Business settings, then Users, then System users. Click Add. Name it
Datacenterand pick the Employee role. - Click Assign assets. Pick Ad accounts, tick your ad account and turn on View performance. Save.
- Click Generate token. Pick your business app. If you have none, make one first at developers.facebook.com, type Business.
- Set the expiry to Never if Meta offers it. Tick the
ads_readpermission, then generate. - Copy the token. Meta shows it only once. Paste it in Datacenter and click Connect.
Datacenter checks that the token has ads_read and can see an ad account. It is stored encrypted and never shown again.
Already use the Meta Conversions API on this site? The page offers Use the token saved for Meta Conversions API. It works when that token can also read ad results.
What Datacenter reads
For each ad account you pick, per day: spend, impressions, reach, clicks, and every action Meta reports (signups, leads, purchases, landing page views, link clicks, custom conversions and the rest) with the value Meta puts on them, in the account's currency. It reads campaigns, ad sets and ads, and what each ad set is optimized for.
- Numbers follow each ad set's own attribution setting, such as 7-day click and 1-day view, so they match Ads Manager.
- Meta reports some actions under two names, like
complete_registrationandoffsite_conversion.fb_pixel_complete_registration. Datacenter counts them once.
- The first import reads the last 90 days.
- Each hour after, it reads again from 3 days before the last sync, because Meta updates recent days late. A day read twice replaces itself. It never counts twice.
- When Meta asks Datacenter to slow down, the sync pauses and carries on later. It does not show as an error.
The Ad spend card
The card on your dashboard leads with what Ads Manager calls Results: what each ad set is optimized for, like Signups (Meta) 106 and Cost per signup (Meta) $2.25. A number Meta reports always says (Meta). A number Datacenter tracked on your site says (tracked). The two are never added together.
A cost per action divides only the spend of the platforms that report that action. With Meta and Google both spending, Cost per signup (Meta) is Meta's spend over Meta's signups, the same as Ads Manager.
Point at a day on the card's chart to see its numbers for that day. Click a number on top, or a day, to open its breakdown by platform, campaign, ad set and ad.
Open the card's menu and pick Customize to choose:
- Result: each ad set's own (the default), or one action for every row, like signups.
- Numbers on top: which ones, in what order.
- Columns: start from Performance, Signups, Sales or Delivery, then add, remove and order them. Sort by any column.
- Chart: spend, or any number with a value per day.
Reach is added up day by day, so someone reached on two days counts twice. Frequency uses the same reach.
Matching spend to sales
Spend joins the sales Datacenter credits by the tags on each ad's link:
- Campaign id first. Our Meta URL template sends
utm_id={{campaign.id}}, which matches even after you rename a campaign. - Then names.
utm_campaign,utm_termandutm_contentare matched to the campaign, ad set and ad names, written the way the link builder writes them: lowercase, with hyphens for spaces. "Spring Sale" andspring-salematch. - Then the click id and the day. A visit with Meta's
fbclidbut no tags that name an ad goes to the campaign, ad set and ad when only that one had clicks that day and the days either side. With two running, it stays untied: a click id says it came from Meta, not from which ad.
When visits from Meta arrive but cannot be tied to an ad, the Ad spend card says so in one line, with Copy parameters for the line below.
After the import, the Meta Ads page checks your active ads. If some have no Datacenter tags, it shows the one line to paste:
utm_source=facebook&utm_medium=paid-social&utm_campaign={{campaign.name}}&utm_content={{ad.name}}&utm_term={{adset.name}}&utm_id={{campaign.id}}In Ads Manager, open the ad, find URL parameters under Tracking, paste it and publish. You can select many ads and edit them together. More in Tracking ads with UTMs.
Reading the numbers
On the Attribution tab, Spend and return has a switch for Platform, Campaign, Ad set and Ad. It follows the period and the site's attribution model.
The columns follow what your site converts on. A store sees sales and money; a site where people sign up or send a form sees its main goal.
| Column | What it is |
|---|---|
| Spend | What Meta charged in the period |
| Sales, Signups or Leads | Conversions Datacenter credited to it. With a goal picked, that goal |
| Revenue | Their value. Only when the site sells or the goal has a value |
| ROAS | Revenue divided by spend. 3.0x means $3 back for each $1 |
| Cost per sale, signup or lead | Spend divided by that count |
| Conversion rate | Signups or leads per tracked visit from the ad. Shown when there is no money |
| Signups (Meta), Purchases (Meta) | What Meta counts itself for the same result. Left out when Meta counts none |
Hover the chart, tap it or move through it with the arrow keys to read one day: spend, the count, its cost and Meta's count with its cost.
Meta and Datacenter count in different ways. Meta counts views and clicks inside its own windows, and models some sales it cannot see. Datacenter counts the sales it saw on your site, your server and your store, credited by first or last touch. Both are useful. A big gap is worth a look: see When Meta counts far more.
Spend we could not match to tracked links lists campaigns with spend but no tracked visit in the period. Most often their ads have no tags. Add the URL template to fix it.
When Meta counts far more
When Meta's count is at least three times Datacenter's (and 10 or more), the card says so in one line. Some of the gap is how Meta counts: people who only saw an ad, clicks up to 7 days back, and signups on another phone or computer. Most of a big gap is usually one of these, and each has a fix:
- The signup never reaches Datacenter. If people sign up in your app or on your server, send the signup with the Events API. Check its answers: a
401means the key is missing, wrong or revoked, and nothing is counted. Make a new key on the site's Integrations page, under Events API, and put it on your server. - The signup reaches Datacenter but not the visit. People tap an ad inside Instagram or Facebook, then sign up later in Safari or Chrome. That is a new browser, so the visit from the ad and the signup do not join. Send the visitor's
_dc_idcookie asvisitor.idwith the server event (see Tying the event to a visit), and call identify right after signup, so every browser a person used joins one profile:
window.datacenter?.('identify', { email: user.email, name: user.name, id: user.id });- Visits join for one day only. In Private mode a visit and a signup join only on the same day. 90-day tracking joins them across 90 days.
- Ads without tags. Spend that no tracked visit names shows under the table with Copy the URL template. Paste it in each ad's URL parameters.
Currencies
The dashboard adds spend up in your reporting currency, converted at the European Central Bank rate for each day (see Profit, blended ROAS and currencies). This report keeps each currency on its own line, and ROAS shows only where spend and sales use the same currency. Sales sent without a currency count as US dollars, as on the rest of the report.
Disconnect
On the Meta Ads page, click Disconnect Meta. Datacenter deletes the saved login and the spend it brought in. Connect again to bring the spend back.
Something missing or wrong? Email hello@datacenter.so.