Extension for Facebook spend
How to prepare the tracker, download the extension, create a profile key and connect a browser with Ads Manager to spend collection.
Meta Ads spend is passed to the tracker by a browser extension: it works in the browser profile where Ads Manager is open and sends spend by ad. Setup is done once on the Settings → Spend («Настройки → Расходы») tab. The section is visible to the owner and the admin.
What you need before you start
- A paid license. On a trial license, the tab shows the Open license («Открыть лицензию») button instead of the settings: you can't download the archive or create a key.
- A Chromium or Dolphin browser logged in to the ad account. Chromium version 111 or later.
- The ad ID in the campaign link. The tracker matches spend to campaigns by clicks whose selected
sub_idholds the ad ID. In the Facebook Ads source template, this issub_id_4, theadvert_idparameter. How link parameters get intosub_idis covered on the Source tokens and link parameters page. - You don't need to set a time zone: the extension takes it from the ad account. Accounts with different time zones are connected to one workspace.
Step 1: the ad ID field
- Open Settings → Spend.
- In the Ad ID field («Поле с ID объявления») list, select the
sub_idthe source passes the ad ID in.sub_id_4is selected by default;sub_id_1…sub_id_30are available. - Click Save settings («Сохранить настройки»). The message “Settings saved” («Настройки сохранены») appears.
The time zone isn't set here. Next to the field it says: “Taken from the ad account. Accounts with different time zones can be connected together: each one's spend is counted by its own days.” («Берётся из рекламного аккаунта. Аккаунты с разными поясами можно подключать вместе: расход каждого считается по его суткам.») How the days of different accounts add up into a campaign's cost is covered in Several ad accounts.
After the first accepted collection, the field and the Save settings button become unavailable. Next to the button it says: “After the first import, the field is locked to preserve history.” («После первого импорта поле фиксируется для сохранения истории.») Check the value before the first collection.
Step 2: download the extension
- On the Spend tab, click Download extension («Скачать расширение»).
- The browser saves the
micator-spend.zipfile. The panel shows the message “The archive is prepared for the domain and logo of this installation. Unpack it and load the folder into the browser.” («Архив подготовлен под домен и логотип этой установки. Распакуйте и загрузите папку в браузер.»)
The archive contains the panel address, the team name and the logo of your installation. There's no key in the archive: it's created in the next step.
Step 3: create a profile key
The key gives the extension access to spend only and is valid for 90 days. Create a separate key for each browser profile or media buyer: that way, one profile's access can be revoked without affecting the others.
- In the Connect profile («Подключить профиль») block, enter a name in the Profile / media buyer name («Название профиля / байера») field, up to 80 characters.
- Click Create key («Создать ключ»).
- Copy the key from the frame captioned “Shown once. Paste it into the extension.” («Показывается один раз. Вставьте в расширение.») The key starts with
trk_.
You can't view the key again: if it's lost, create a new one and revoke the old one.
The key stops working if the user who created it is deleted or their role is lowered below admin.
Step 4: install the extension and paste the key
- Unpack
micator-spend.zip. - Load the unpacked folder into Chromium or Dolphin as a local extension. In the extension list, it's called “Team name · Spend” («Название команды · Расходы»).
- Open the extension window. The header shows the logo, the team name and your panel address, with the heading “Meta Ads spend” («Расходы Meta Ads») below.
- Paste the key into the Extension key («Ключ расширения») field.
- Click Save («Сохранить»). The message “Settings saved” appears, the key field is cleared, and the hint in it changes to “Connected · paste a new key to replace it” («Подключено · вставьте новый ключ для замены»).
Leave the Graph API field empty: it says “Detected automatically” («Определяется автоматически»). The Days back («Дней назад») and Auto-collect every 30 minutes («Автосбор каждые 30 минут») fields are covered on the Spend collection page.
Step 5: open Ads Manager
- In the same browser profile, open Ads Manager at
adsmanager.facebook.comorbusiness.facebook.com. - Select the ad account you need.
- Open the extension window.
The window should show two lines: “Ads Manager session found” («Сессия Ads Manager найдена») and “Account” («Аккаунт») with the account number. If it says “Open Ads Manager” («Откройте Ads Manager») or “No account selected yet” («Аккаунт ещё не выбран») instead, refresh the Ads Manager page and open the extension window again.
The extension works with one account: the one opened last in Ads Manager. The tracker receives account and ad IDs, dates, currency, time zone and spend amounts; the Meta token and cookies aren't passed.
Check
- In the extension window, click Collect now («Собрать сейчас»).
- Wait for the message “Rows accepted: … · days: …” («Принято строк: … · дней: …»).
- Open Settings → Spend. In the table below the settings, rows by day appear instead of “The first collection will appear here” («Первый сбор появится здесь»). In the State («Состояние») column, the value changes from “Queued” («В очереди») to “Applied” («Применено»).
The table columns and how spend is distributed across campaigns are covered on the Spend collection page.
Disconnecting a profile and revoking the key
The button in the extension deletes the key only from the browser. In the tracker, the key is revoked separately.
- In the extension window, click Disconnect this profile («Отключить этот профиль»). The extension deletes the saved key and settings and shows “Local key deleted. To revoke access, delete the API key in the tracker.” («Локальный ключ удалён. Для отзыва доступа удалите API-ключ в трекере.»)
- In the panel, open Settings → API («Настройки → API»), the API tokens («API-токены») block.
- Find the token named “Spend · profile name” («Расходы · название профиля») with the label “Extension spend” («Расходы расширения»). The expiry is shown next to it: “Until” («До») or “Expired” («Истёк») with a date.
- Click ✕ in the token's row.
- Confirm the revocation.
With a revoked or expired key, the extension shows “Extension key is invalid or expired” («Ключ расширения недействителен или истёк») when collecting. When the key expires, create a new one on the Spend tab, paste it into the Extension key field and click Save. More in API tokens.
Troubleshooting
The spend extension is available after you pay for a license. Spend collection is disabled in the trial.
This message («Расширение для расходов доступно после оплаты лицензии. В пробной версии сбор расходов отключён.») means the installation runs on a trial license. How to switch to a paid one is covered on the Trial page.
Check the panel domain and logo in the installation configuration
This message («Проверьте домен панели и логотип в конфигурации установки») means the tracker couldn't build the archive. The panel address in the installation settings isn't written in the form https://panel.example.com, or the saved logo isn't a PNG of 270 × 57 pixels.
Invalid key
This message («Некорректный ключ») means the wrong text was pasted into the Extension key field. Copy the whole key: trk_ and the 40 characters after it, without spaces inside.
Tracker timezone must match the account: Europe/Moscow
This message («Timezone трекера должна совпадать с аккаунтом: Europe/Moscow») comes from extension versions below 1.1.0: they accept accounts of only one time zone. Download the extension again; how to do it is covered in Time zone.
Other messages are on the Spend extension: errors and how to fix them page.