TikTok Events API

This guide describes how to add and configure TikTok Events API integration.

The TikTok Events API integration is a Server-to-Server (S2S) connection that shares website and app visitor events directly with TikTok. It's designed for Web-to-App and Web-to-Web (Flows) campaigns running in TikTok with event optimization.

Using TikTok Events API for Web-to-App and Web-to-Web campaigns

TikTok Events API is useful when running Web-to-App or Web-to-Web (Flows) campaigns in TikTok with event optimization.

A Web-to-App campaign is a web campaign targeted at your app's landing page, which has a link to the App Store.

This integration is part of the Web-to-App and Flows (Web-to-Web) solution. See the Web-to-App step-by-step guide for the full setup.

Requirements

  1. TikTok Pixel.
  2. Access Token for TikTok Pixel.
  3. Landing page with installed TikTok and Apphud scripts.

How to Add Integration?

Step 1 - Preparations in TikTok

Create Pixel in developer mode

In TikTok Ads Manager, create a Pixel as per TikTok documentation in developer mode:

TikTok - Create Pixel in developer mode

Generate Access Token

In Pixel settings, generate an Access Token:

TikTok - Generate Access Token

Step 2 - Authentication

In Apphud, open Connections → Integrations (the All or Attribution tab). Click Add Connection for TikTok Events API and choose a Source in the pop-up.

Enter:

  • Pixel ID (required) — your TikTok Pixel ID.
  • Access Token (required) — generated in Step 1.
Apphud - TikTok Pixel ID and Access Token

Step 3 - Additional Configuration

Environment and Revenue

Configure generic Environment and Revenue settings as described on Integrations overview → Configuration tab.

Set up filters (optional)

Navigate to Filters tab. Set up filters if needed as described on Integrations overview → Filters tab.

Step 4 - Set up Events list

Open the Events tab of the configuration. Disable unnecessary events or change event names.

Apphud - TikTok events configuration

Step 5 - Test connection (optional)

Save the connection.

For the general integration configuration testing flow see Integrations overview → Test connection.

Step 6 - Enable and save

Click Enable integration and Save.

Step 7 - Add URL parameters to your TikTok campaign

When creating a campaign in TikTok Ads Manager, you must add URL Query parameters displayed on the TikTok integration page in Apphud. Click on the field in Authentication section to copy it:

Apphud - URL parameters for TikTok campaign

See Tracking Attribution Data below for the parameter list and examples.

Tracking Attribution Data

To track attribution, add URL query parameters to your advertising URL.

Example:

campaign_name=__CAMPAIGN_NAME__&adset_name=__AID_NAME__&ad_name=__CID_NAME__&ttclid=__CLICKID__

Final Ad URL Example

Using Apphud's Landing Page (Web-to-App):

https://yourapp.siiites.com/?campaign_name=__CAMPAIGN_NAME__&adset_name=__AID_NAME__&ad_name=__CID_NAME__&ttclid=__CLICKID__

Using Your Own Website:

https://yourownwebsite.com/?campaign_name=__CAMPAIGN_NAME__&adset_name=__AID_NAME__&ad_name=__CID_NAME__&ttclid=__CLICKID__

For further details, see this TikTok guide (scroll to the bottom) and the TikTok API documentation.

Attribution Parameter Mapping

You can replace campaign_name, adset_name, and ad_name with alternative UTM parameters for campaign attribution. The mapping options are:

  • Campaign Name — one of: campaign_name, utm_campaign, c.
  • Adset Name — one of: utm_content, adset, adgroup, adgroup_name, af_adset, adgroup_id.
  • Ad Name — one of: utm_term, adname, ad, ad_id, ad_name, af_ad.

Analyze TikTok campaigns in Apphud

Since the integration is part of the Web-to-App solution, analytics is described in Ad Analytics.


Did this page help you?