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
- Create a TikTok account and set up your app in TikTok For Business.
2. Obtain app configuration information
Go to TikTok For Business.
Select your app.
View the detailed information for your app.
- ID: App ID
- TikTok App ID: TikTok App ID
Step 1: Permissions and project configuration
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
Event | Trigger timing |
---|---|
LaunchApp | When app is launched |
InstallApp | When app is launched for the first time |
2DRetention | When app is opened again the next day |
Manually logged events
Event | Trigger timing |
---|---|
CreateRole | Character naming |
CompleteTutorial | Complete tutorial |
Checkout | Open the purchase interface |
Purchase | Made a purchase successfully |
Achieve Level | Reach a milestone |
Unlock Achievement | Achievements unlocked |
For more information about TikTok event reporting, see List of Supported In-App Events.
Step 3: Initialize Analytics
- Unity
- Unreal Engine
Initialize the analysis module, then call ReportEvent
to start TikTok data reporting.
Initialize the analysis module, then call ReportEvent
to start TikTok data reporting.
Data reporting acceptance
View reported data in the console
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.
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:
- Request Report Event
- eventName =
Report_Event
, paramsDic-key1
=k1
, paramsDic-value1
=v1
, paramsDic-key2
=k2
, paramsDic-value2
=v2
, spChannels=TikTok
- Install/Uninstall SDK and launch game
- View report data and export the INSTALL data table
- Expected output: Information reported successfully.
- In the console, view:
- Custom events: TikTok can query custom
Report_Event
qty add 1. - Install event: View reported INSTALL event qty add 1 (only reported once if device information is not cleared)
- Exported data verification: Contact [killuachen] to form a group for final confirmation:
- 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 ifevent_name={event_name}
is the custom event. - 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:
- Request
ReportRevenue
- eventName = (customizable), spChannels =
TikTok
, Currency =USD
, Revenue = 100 - TikTok query reporting events
- DD Platform query
AnalyticsReportRevenue
event
- Request
- Expected output: Information reported successfully.
- View
ReportRevenue
event +1 in the TikTok delivery data. TheReportRevenue
(revenue) event amount +100. - Export data verification (2-4 hours): Export data contains income event and amount data.
- DD Platform successfully queries the event reporting with
methodName
asAnalyticsReportRevenue
andmethod_id=715
.
- View
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.