Skip to main content

TikTok AppLog

Important

Do not integrate on your own.The TikTok channel requires formal cooperation with TikTok before you can register an application and obtain the configuration required for integration.If you need to integrate, please consult your business contact first.

Player Network supports two independent TikTok reporting channels, which use different SDKs and report to different TikTok backends. Please choose the appropriate channel based on your business needs.

AppLog (TTGP)Business SDK Analytics
SDKTTGP 内置的 TikTok SDKStandalone TikTok Business SDK
DashboardTikTok AppLog / TTGP Partner DashboardTikTok For Business Advertising Management Platform
Supported platformsiOS and AndroidAndroid only
API styleDedicated TikTokTTGPAppLog* interfaceUniversal AnalyticsInit + ReportEvent (spChannels=TikTok)
Identity mappingAutomatically map Player Network openid ↔ TTGP openidAutomatically map via TikTokBusinessSdk.identify() (requires ANALYTICS_AUTH_REPORT_ENABLE = 1)
Applicable scenariosRecommended for new integrationsUse only when requested by a TikTok business representative

For Business SDK Analytics documentation, see Configure TikTok Reporting (Business SDK).


AppLog channel​

Player Network surfaces TikTok AppLog as a fire-and-forget event-reporting channel.The channel can report predefined lifecycle events (install, launch, register, login) and custom events directly to TikTok through the bundled TikTok SDK.

Supported platforms​

AppLog is supported on:

  • iOS
  • Android

Enable switch​

The feature is controlled by the following key in INTLConfig.ini:

[TikTok]
TIKTOK_TTGP_APP_LOG_ENABLE = true
PropertyValue
Default valuetrue
Supported platformsAndroid, iOS
RequiredNo

If the switch is set to false, calls to SetCommonParams and ReportEvent return immediately without reporting any data.

Event types​

Use the numeric event type values when calling ReportEvent.

EventValueExplanation
Install1First-time installation.
Launch2Application launch.
Register3User registration.
Login4User login.
Custom5A custom event with a name and JSON parameters.

SetCommonParams​

Call SetCommonParams after the Player Network login succeeds and after the player logs in or binds TikTok. The SDK uses this call to attach identity and device context to every subsequent event.

The SDK resolves the following values automatically:

  • TTGP openid — read from the internal mapping that is persisted when TikTok login or bind succeeds.
  • Advertising ID — GAID on Android, IDFA on iOS, obtained from the device-info module.

You only need to pass the in-game user profile:

ParameterRequiredExplanation
userId NoIn-game user ID. Pass an empty string if unavailable.
userNickName NoIn-game user nickname.Pass an empty string if unavailable.
userIcon NoIn-game user avatar URL. Pass an empty string if unavailable.
INTLAPI.TikTokTTGPAppLogSetCommonParams(
userId: playerId,
userNickName: playerNickname,
userIcon: playerAvatarUrl
);
info

If no TikTok identity mapping exists when you call SetCommonParams, the TTGP openid defaults to "0".The event may still be accepted, but TikTok user attribution may be unavailable.

ReportEvent​

ReportEvent is fire-and-forget. There is no result observer; reporting failures are logged internally.

For Custom events, provide eventName and an optional paramsJson string.

// Report a predefined login event
INTLAPI.TikTokTTGPAppLogReportEvent(4);

// Report a custom event
INTLAPI.TikTokTTGPAppLogReportEvent(
eventType: 5,
eventName: "CompleteTutorial",
paramsJson: "{ \"level\": \"1\" }"
);
caution

Call SetCommonParams before you start reporting events.If ReportEvent is called before SetCommonParams, the SDK automatically calls SetCommonParams("", "", "") and logs a warning.The reported event is still sent, but user attribution may be incomplete.

Identity attribution behavior​

AppLog relies on a mapping between the Player Network openid and the TikTok TTGP openid.The SDK creates this mapping automatically when:

  • TikTok login succeeds.
  • TikTok account binding succeeds.

The mapping is removed automatically when TikTok is unbound.If the mapping is missing, the TTGP openid falls back to "0" and TikTok user attribution may be unavailable.

Testing and troubleshooting​

  1. Confirm that TIKTOK_TTGP_APP_LOG_ENABLE is set to true in INTLConfig.ini.
  2. Ensure the INTLTikTok plugin is included in the Android or iOS build.
  3. Make sure Player Network login and TikTok login or bind have both succeeded before calling SetCommonParams.
  4. Check the native device or editor logs for warnings from TikTokTTGPAppLog if events are not appearing.
  5. Custom event parameters must be valid JSON. Invalid JSON is ignored, and the event is reported without parameters.

Business SDK Analytics (standalone channel)​

The TikTok Business SDK analytics path is an independent reporting channel from AppLog independent reporting channel. It uses a standalone TikTok Business SDK, reporting data to the TikTok For Business Ads Manager platform rather than the TTGP backend. This channel only supports Android, and is configured via TIKTOK_EVENT_APPID and TIKTOK_EVENT_TT_APPID. For details, refer to Configure TikTok Reporting (Business SDK).