TikTok Events API
Forward Rovenue subscription and revenue events to TikTok's server-side Events API for reliable attribution without client-side pixels.
TikTok Events API
The TikTok Events integration forwards Rovenue subscription and revenue events to the TikTok Events API (server-side), enabling reliable attribution for TikTok campaigns without depending solely on the client-side pixel.
1. Get your credentials from TikTok
- Open TikTok Events Manager.
- Select your Data Source (Web/App Pixel or SDK).
- Go to Manage → Access Token (or Settings → Access Token depending on your interface version).
- Copy:
- Access Token — the long-lived token for server-side API calls.
- Pixel Code — the alphanumeric identifier shown at the top of the Data Source page (e.g.
C8ABCDEF1234567890).
Keep these values secure. The access token grants write access to your Events data source.
2. Add the integration in Rovenue
- In the Rovenue dashboard, navigate to Apps (left sidebar).
- Find TikTok Events in the integrations grid and click it.
- The side drawer opens. Fill in the Credentials step:
- Pixel Code — paste the Pixel Code from step 1.
- Access Token — paste the access token from step 1.
- Click Validate — Rovenue calls the TikTok Events API test endpoint to verify the credentials are accepted.
- Proceed through the remaining drawer steps (event mapping, test event code, enable).
- Click Save to activate the integration.
3. Identity context & consent
When your SDK passes an identityContext with an event, the following fields are forwarded to TikTok Events API:
| Field | Forwarded as | Hashing |
|---|---|---|
email | user_data.em | SHA-256 (lowercased + trimmed before hashing) |
phone | user_data.ph | SHA-256 (digits only before hashing) |
externalId | user_data.external_id | SHA-256 (trimmed before hashing) |
ip | context.ip | Forwarded verbatim — not hashed |
userAgent | context.user_agent | Forwarded verbatim — not hashed |
ttclid / ttp | context.ttclid / properties.ttp | Forwarded verbatim — not hashed |
fbp / fbc | Not sent to TikTok Events | N/A (Meta-specific fields) |
Consent is your responsibility.
Rovenue acts as a data processor. Your application is the data controller. You must obtain the end-user's informed consent before passing any PII in identityContext. GDPR, CCPA, KVKK, and similar regulations place the consent obligation on the controller (you), not the processor (Rovenue).
Additional guarantees:
- Rovenue never persists
identityContextfields at rest. PII is hashed in-process; raw values are not written to any database. response_bodyfrom TikTok Events API is stored but truncated to 4096 bytes.- The wire format uses camelCase JSON; each envelope carries a numeric
versionfield (currently1) and a stableeventIdfor downstream dedupe.
App store purchases (app events)
A purchase made in your app (App Store, Google Play, through the Rovenue SDK) has no web page, so TikTok can only take it as an app event:
- No TikTok app ID (the default): app purchases are not sent. Each one appears in the Delivery Log as
skippedwith the reasonapp_events_unconfigured. Web funnel purchases are not affected — they are always sent as web events with the funnel's page URL. - TikTok app ID set (optional field in the Credentials step): app purchases are sent with
event_source: "app"under that app ID, with the app ID in each event'sappblock. The IDFA goes inuser.idfaonly when the iOS user allowed tracking (App Tracking Transparencyauthorized). The Android advertising ID is never sent. - A subscriber with no iOS or Android platform (for example one created by the web SDK) cannot be sent as an app event: it is skipped with the reason
no_app_platform.
App trial starts. With a TikTok app ID set (and the action source app), a free trial started in your app (App Store or Google Play) is sent as a StartTrial app event, with the same IDFA rule as purchases, when StartTrial is enabled in the connection's events step. Without an app ID, trial starts are not sent and leave nothing in the Delivery Log. Only a trial start goes out this way: cancellations, refunds, expiries and other subscription changes are never sent to TikTok. A Stripe trial (web checkout or a web funnel) is never an app event: on a connection with an app ID it is skipped as not_an_app_store_trial, and a web funnel trial reaches TikTok once, through the funnel's own conversion. A redelivered trial start keeps the same event_id, so TikTok counts it once. Trial starts from before the connection was enabled are not replayed.
Send Test Event follows the same rule: on an app connection with a TikTok app ID it sends an iOS app event (tracking not allowed, no IDFA) with your test event code; without an app ID it is skipped as app_events_unconfigured.
The app event format is unverified against TikTok until the owner's live probe: Rovenue's tests check it against TikTok's published field list, not against TikTok itself. Use a test_event_code and TikTok's Diagnostics tab to confirm your first app events arrive.
Sandbox events
Sandbox purchases (TestFlight, Google Play license testers, Stripe test mode) are not sent to TikTok by default, so test traffic never shows up as real conversions or revenue. This covers every event Rovenue sends: revenue, subscription, credit and funnel events all carry the environment of the purchase or key behind them.
- To send them anyway (for example to a test property), turn on Send sandbox events in the connection's Activate step. TikTok receives them like production events, so keep them away from your production reporting.
- Each sandbox event Rovenue holds back appears in the connection's Delivery Log as
skippedwith the reasonsandbox_event, so a test purchase that never arrives is explained there. - An event whose environment Rovenue cannot work out is handled like a sandbox event: it is never sent as production.
4. Verify events are arriving
- Go back to TikTok Events Manager.
- Select your Data Source and open the Diagnostics tab (sometimes labelled Test Events).
- In the Rovenue drawer's Test step, you set a
test_event_code. Trigger a real event from your app or use the Rovenue Send Test Event button. - The Diagnostics tab should show the event within a few seconds, confirming the full pipeline is working.
If events are not appearing:
- Verify the Pixel Code and Access Token are correct (use Validate in the drawer).
- Check Apps → TikTok Events → Delivery Log in Rovenue for HTTP status codes and error messages.
- Ensure
enabledEventsin the connection includes the event type you are sending. - TikTok Events API returns a
codefield in its JSON response — code0means success; any other value is an error. The delivery log shows the raw response body.