Skip to main content

Set up TikTok as an analytics platform

This article guides you on setting up TikTok as an analytics platform, allowing your game to report telemetry data directly to TikTok.

Prerequisites

  1. Create a TikTok account and set up your app in TikTok For Business.
2. Obtain app configuration information
  1. Go to TikTok For Business.

  2. Select your app.

  3. View the detailed information for your app.

    • ID: App ID
    • TikTok App ID: TikTok App ID

    Image: TikTok App ID

Step 1: Permissions and project configuration

note

Currently, event reporting for TikTok is only supported on the Android platform.

Android

User permissions

Add INTERNET and AD_ID permissions for TikTok.

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.gms.permission.AD_ID" />
Configurations

Add the following configurations in the INTLConfig.ini file:

[TikTok]
TIKTOK_EVENT_APPID = {TIKTOK_EVENT_APPID}
TIKTOK_EVENT_TT_APPID = {TIKTOK_EVENT_TT_APPID}
  • Replace {TIKTOK_EVENT_APPID} with the App ID found from TikTok For Business.
  • Replace {TIKTOK_EVENT_TT_APPID} with the TikTok App ID found from TikTok For Business.

Step 2: Configure event reporting

TikTok SDK supports reporting automatically logged events and manually logged events. The reported data generally only includes the event name, but additional parameters can be manually added. The time, device system, app version, value, and parameter information for reported events can be viewed in TikTok For Business.

Automatically logged events

EventTrigger timing
LaunchAppWhen app is launched
InstallAppWhen app is launched for the first time
2DRetentionWhen app is opened again the next day

Manually logged events

EventTrigger timing
CreateRoleCharacter naming
CompleteTutorialComplete tutorial
CheckoutOpen the purchase interface
PurchaseMade a purchase successfully
Achieve LevelReach a milestone
Unlock AchievementAchievements unlocked

For more information about TikTok event reporting, see List of Supported In-App Events.

Step 3: Initialize Analytics

Initialize the analysis module, then call ReportEvent to start TikTok data reporting.

Data reporting acceptance

View reported data in the console

caution

The events are not reported in real time, and the delay is more than 1 hour.

Go to TikTok For Business to view the tracking data.

Image: Verification 1 Image: Verification 2

Acceptance use case 1

  • Sub-function module: Reporting
  • Feature: Event Reporting
  • Test points: Event information successfully reported by TikTok
  • Prerequisites: Initialize Analytics module
  • Procedure or Input:
    1. Request Report Event
    2. eventName = Report_Event, paramsDic-key1=k1, paramsDic-value1=v1, paramsDic-key2=k2, paramsDic-value2=v2, spChannels=TikTok
    3. Install/Uninstall SDK and launch game
    4. View report data and export the INSTALL data table
  • Expected output: Information reported successfully.
    1. In the console, view:
    2. Custom events: TikTok can query custom Report_Event qty add 1.
    3. Install event: View reported INSTALL event qty add 1 (only reported once if device information is not cleared)
    4. Exported data verification: Contact [killuachen] to form a group for final confirmation:
    5. Custom events: Compare install_time={installed_at} of reported data (on the console or in exported data) to determine if this is the install time and if event_name={event_name} is the custom event.
    6. Install event: View reported Installs event qty+1 in the INSTALL data table (only reported once if device information is not cleared). activity_kind={activity_kind} adds an install.

Acceptance Use Case 2

  • Sub-function module: ReportRevenue
  • Feature: TikTok payment event reporting
  • Test points: Query report after requesting ReportRevenue (TikTok)
  • Prerequisite: Network connection is normal
  • Procedure or Input:
    1. Request ReportRevenue
    2. eventName = (customizable), spChannels = TikTok, Currency = USD, Revenue = 100
    3. TikTok query reporting events
    4. DD Platform query AnalyticsReportRevenue event
  • Expected output: Information reported successfully.
    1. View ReportRevenue event +1 in the TikTok delivery data. The ReportRevenue (revenue) event amount +100.
    2. Export data verification (2-4 hours): Export data contains income event and amount data.
    3. DD Platform successfully queries the event reporting with methodName as AnalyticsReportRevenue and method_id=715.

FAQ

  • TikTok event reporting is in debug mode by default. Data updates for the dashboard depend on the realtime performance of the background calculations. Data is usually updated in a few minutes, but can be updated on the next day in some cases. If the data is not updated after 30 minutes, check again the next day.

Error code

For more information, see TikTok Help Center.