Repository navigation
Dolphin Fbtool
Dolphin and Fbtool.pro have no tracker integrations of their own. Both services do exactly one thing: send costs to Keitaro via its Admin API. So "Dolphin/Fbtool support" in Orbitra is a compatible incoming endpoint that the services call, believing they are talking to Keitaro:
POST https://your-tracker.com/admin_api/v1/campaigns/CAMPAIGN_ID/update_costs
Authorization: Bearer <API_KEY>
Content-Type: application/json
{
"start_date": "2026-08-15",
"end_date": "2026-08-15",
"cost": 12.34,
"currency": "USD",
"timezone": "Europe/Berlin",
"filters": { "sub_id_4": "120212558973560058" }
}
The response follows the Keitaro shape: {"success":true, ...} or an HTTP code + {"success":false,"error":"..."}.
The endpoint is implemented in admin_api.php; routing lives in .htaccess (Apache) and
core/nginx_config.php (nginx). Regenerating the nginx config after an update
picks up the location automatically.
The endpoint accepts the tracker's personal keys (table user_api_keys) — the same ones
MCP uses.
- An admin opens ⚙ → Users → API keys.
- Creates a key with write permissions (read-only keys get
403). - The key is passed in the
Authorization: Bearer <key>orX-Api-Key: <key>header.
Dolphin → Settings → Cost export → Keitaro:
-
Tracker URL:
https://your-tracker.com - API key: the key from step 1
-
Matching: by Adset ID (default) — then the
sub_id_3filter will match the click'sadset_idparameter automatically.
Fbtool → Costs → Keitaro:
-
Admin panel URL:
https://your-tracker.com - API key: the key from step 1
- Fbtool matches by
ad.idand sends thesub_id_4filter — it will match the click'sad_idparameter automatically.
Filters match against click parameters (clicks.parameters_json). The Facebook
traffic source template puts those parameters on each click: the campaign must receive
traffic with a link containing
ad_id={{ad.id}}&adset_id={{adset.id}}&campaign_id={{campaign.id}}
In the campaign editor this is done by selecting the "Facebook Ads" source: the parameters are filled in automatically (the "Parameters" tab, the link with macros).
- The campaign's clicks over
[start_date .. end_date], narrowed by the filters. - The filter key is tried as a parameter name as-is (
ad_id,adset_id,campaign_id, …) plus the Keitaro FB-template defaults:sub_id_3→adset_id,sub_id_4→ad_id. Multiple filters are combined with AND. - The sum is converted to the tracker currency (
core/CurrencyRates.php) and split evenly across the matching clicks (flat CPC) — the same model used bycore/CostImporter.php. - Re-sending the same period overwrites the distribution instead of adding to it (the services send costs every 60–90 minutes).
- If no clicks were found, the sum is stored in
cost_recordsunder a hiddenexternal_apiconnection without attribution — so the cost does not vanish silently. Check the filters and the campaign's parameters if the cost "never arrives".
curl -X POST 'https://your-tracker.com/admin_api/v1/campaigns/10/update_costs' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{"start_date":"2026-08-15","end_date":"2026-08-15","cost":10,"currency":"USD","filters":{"ad_id":"123456"}}'The response {"success":true,"clicks":N,...} means the cost was recorded and distributed across N
clicks. clicks:0 — the cost was parked without attribution: the filter matched no
click in the period.
Added in v0.9.7.7.
Вики собирается из папки docs/ репозитория. Правки — через pull request в docs/.
Getting started
Traffic
- Campaigns & streams
- Cloaking
- Landing pages
- Tracking Client (PHP)
- PWA & Web Push
- PWA Funnel
- Conversion popups
- Content gallery
- Creatives library
- External PWA & Telegram channels
Conversions & money
- Postbacks & conversions
- Costs
- Push & pop networks
- Facebook / Meta
- Dolphin / Fbtool
- FB comment cleaner
- Sources & networks
Analytics
Infrastructure
Management
For developers