TikTok Events API: Server-Side Tracking Setup Guide
TikTok's Events API is the server-side tracking solution for TikTok Ads, working alongside the TikTok Pixel to ensure conversion data reaches the platform even when browser-based tracking fails. If you are spending on TikTok Ads and not using the Events API, you are likely missing 20 to 40 percent of your conversions, which means TikTok's optimization algorithm is working with incomplete data.
The Events API sends web events directly from your server to TikTok's servers, bypassing the browser entirely for the conversion event. This makes it resistant to ad blockers, browser privacy features, and the tracking limitations introduced by iOS 14.5 and later updates. TikTok uses these server-side events alongside pixel events for attribution and campaign optimization.
To get started, you need a TikTok Business Center account, a TikTok Pixel (which provides the pixel_code you will reference in API calls), and an access token generated from the TikTok Events API section in your Business Center. The API endpoint is POST https://business-api.tiktok.com/open_api/v1.3/event/track/.
Each event payload must include the pixel_code, the event name (CompletePayment, AddToCart, ViewContent, etc.), the event timestamp, and user data for matching. TikTok supports matching on hashed email (sha256), hashed phone number, TikTok click ID (ttclid), and IP address plus user agent. The ttclid parameter is especially important because it provides the most reliable match back to the original ad click.
Capturing the ttclid requires attention during implementation. When a user clicks a TikTok ad, TikTok appends a ttclid parameter to the landing page URL. You need to capture this value from the URL on the first pageview and store it (typically in a first-party cookie) so it persists through the browsing session until the conversion event. If the user clears cookies or switches devices, the ttclid is lost, which is why you should also send hashed email and phone data as backup matching signals.
Event deduplication works similarly to Meta's approach. Include an event_id in both your pixel fire and your Events API request. TikTok will match events with the same event_id and pixel_code, counting them as a single event. Without proper deduplication, you will see inflated conversion numbers in your TikTok Ads dashboard.
For Shopify merchants, the implementation pattern mirrors other server-side integrations. Capture browsing events and store attribution data (ttclid, hashed email) during the shopping session. When an order webhook fires, enrich the conversion event with the stored attribution data and send it to the Events API. The key difference from Meta's CAPI is the payload format and the specific user data fields TikTok accepts.
TikTok provides a Test Event tool in the Events Manager for validating your implementation. Send events with the test_event_code parameter during development to see them appear in real-time without affecting your production data. Check that the Event Match Quality score is high and that events are arriving within seconds of the actual conversion.
Once your Events API integration is live, monitor your TikTok Ads performance metrics for improvements. You should see more attributed conversions, a higher Event Match Quality score, and over time, better campaign optimization as TikTok's algorithm benefits from more complete conversion data. Combined with a proper attribution dashboard, you can validate that TikTok is reporting conversions accurately and adjust your budget allocation accordingly.