Skip to main content

Reconcile Facebook Ads Costs

Facebook has no fixed click price and no zones, so a tracker on its own can't know what each ad really cost. Rinku solves this without an API connection or access token: you pass the ad ID as the zone, export a report from Ads Manager, and upload it with Reconciliation. Each ad then gets its real spend in Analytics, and optimization rules can evaluate ads the same way they evaluate zones.

1. Create a Facebook traffic source​

  1. Go to Sources and click New Source, then choose Custom.
  2. Name it, for example Facebook.
  3. In Input parameters, next to Network source (net_source), enter:
{ad.id}

Enter the macro without the outer braces. Rinku wraps the value in its own { } when it builds the campaign URL, so {ad.id} becomes {{ad.id}}, which is the macro Facebook replaces with the ID of the ad. If you enter {{ad.id}}, the URL will contain {{{ad.id}}} and the IDs won't match your report.

You can remove the other parameters if you don't use them.

Facebook traffic source with the ad ID macro in net_source

Ad sets instead of ads

To reconcile by ad set, enter {adset.id} instead and export your report at the ad set level. Use one level per source, because the file is matched against whatever net_source contains.

2. Create the campaign​

  1. Create a campaign with this source.
  2. Choose the CPC pricing model and enter any cost above zero, for example 0.05. The value doesn't need to be accurate: it is the base the coefficient scales, and the import replaces it with the real spend. With a cost of 0, reconciliation has nothing to scale and costs stay at 0. The pricing model can't be changed after the campaign is created.
  3. Save and check the Campaign URL. It should end with:
?net_source={{ad.id}}
  1. Use this URL as the website URL of your Facebook ads.

3. Export the report from Ads Manager​

  1. Open the Ads tab in Ads Manager and set the date range you want to reconcile.
  2. In Columns → Customize columns, make sure the table includes Ad ID, Link clicks and Amount spent.
  3. Click Export and choose CSV.

Upload the CSV as it is. Don't open and resave it in Excel: spreadsheet apps can round 18-digit ad IDs, and rounded IDs won't match.

4. Upload the file​

  1. In Campaigns, click Upload stats on the campaign and choose the CSV.
  2. Map the columns:
Rinku fieldAds Manager column
Source (net_source)Ad ID
ClicksLink clicks
CostsAmount spent
  1. Uncheck Apply to the whole campaign period and set the same dates as your export, in UTC. Leave it checked only if the file covers the whole life of the campaign.
  2. Click Import.

Stats upload with Ad ID mapped to net_source

When the task is completed, open it to check the result: every ad from the file should be matched, with a coefficient per ad.

Reconciliation result with a coefficient for each Facebook ad

Daily routine​

Each morning, export yesterday's report from Ads Manager and upload it with yesterday's dates. Facebook may adjust spend for a day or two after delivery: if the numbers change, upload the same day again. Rinku recalculates from the original cost, so nothing is counted twice.

Troubleshooting​

What you seeCause and fix
{{ad.id}} appears as a source in AnalyticsFacebook didn't replace the macro for those clicks, for example clicks from a preview or a link used outside Ads Manager. They can't be matched to an ad. Check that the ads use the campaign URL with net_source={{ad.id}}
The campaign URL contains {{{ad.id}}}The source token was entered with double braces. Change it to {ad.id} in the source settings
All rows are unmatchedThe IDs in the file differ from net_source. Compare with Analytics → group by Source, check that the file wasn't resaved in Excel and that the period covers the clicks
Costs became 0The campaign has no cost set, or the Amount spent column contains currency symbols or thousands separators
Costs didn't changeThe campaign uses the CPA model. Use CPC for campaigns you reconcile

Next steps​