Documentation
CAPI for Meta, TikTok, and Google
Updated 17 Nov 2026
Velotrak sends an approved conversion to Meta, TikTok, or Google from an integration you create in the admin. Free allows one CAPI account per platform. Pro, Team, and Founder do not cap the count. CAPI delivery is not gated by the license.
Add an integration
Create an integration with kind capi. Credentials are encrypted in PostgreSQL. The list API does not return them.
| Platform | Fields you must set | Endpoint the sender uses |
|---|---|---|
| meta | pixel_id (digits only), token |
POST graph.facebook.com/v19.0/<pixel id>/events with the token in the JSON body |
| tiktok | pixel_id, token |
POST business-api.tiktok.com/open_api/v1.3/event/track/ with header Access-Token |
measurement_id (a G- id), api_secret |
POST www.google-analytics.com/mp/collect |
The admin labels the Meta and TikTok token “Access Token”, and the Google fields “Measurement ID” and “API Secret”. There is no test-event-code field in the product. account_id is optional and defaults to the first credential value.
Free’s cap is one active CAPI account per platform. Creating or re-enabling another one is refused. Pro, Team, and Founder store 0 for that cap, which means unlimited. The click path still delivers CAPI on every plan, including Free. The pricing page says the same thing: CAPI on all three platforms, one account each on Free.
Which events are sent
Only an approved conversion with no anomaly is queued. The goal on the conversion picks the platform event:
| Goal | Meta | TikTok | Google (GA4) |
|---|---|---|---|
| sale | Purchase | CompletePayment | purchase |
| lead | Lead | SubmitForm | generate_lead |
| install | CompleteRegistration | CompleteRegistration | sign_up |
| subscribe | Subscribe | Subscribe | subscribe |
| anything else | the goal name | the goal name | the goal name |
Value and currency are the payout in the install’s main currency. Meta also receives IP, user agent, and an fbc value built from the click’s fbclid (fb.1.<click time>.<fbclid>). It does not send fbp. TikTok receives IP, user agent, and ttclid when the click had one. Google Measurement Protocol receives value, currency, and a client id. The sender falls back to the click id when it has no separate GA client id. It does not send gclid, IP, or user agent to Google. The browser script /velotrak.js fires fbq and ttq with the same event id (a SHA1 of click id, goal, and platform). It does not fire a Google browser tag.
Which integration receives the event: the campaign’s capi_account_id, otherwise the traffic source template’s capi_account_id, otherwise every active CAPI integration for that platform. The site calls the last case “broadcast”.
Failures
The outbox retries a failed send up to 8 attempts, with delays of 1 minute, 5 minutes, 30 minutes, 2 hours, and 6 hours, then marks the job dead. The HTTP client times out at 10 seconds. A click older than 7 days is stored as expired and is not sent. A paused or deleted integration drops the job. Results show in the outbound log (GET /api/logs/outbound), including failed, retrying, dead, and expired. The conversions page is the postback that creates the approved event.