Skip to main content

Send Events

caution

The version of each SDK plugin used by the game must be consistent, including the SDK version used by the launcher. If games need to upgrade a single plugin, or access different versions of Player Network SDK at the same time, reach out to the Player Network representative.

The Player Network data insight services can track predefined events for Player Network telemetry, as well as standard and custom events for game telemetry. This tracking is achieved by sending these events through the data pipeline.

Prerequisites

To view and analyze event data, an analytics platform has to configured first. Projects can choose to enable the Dashboard feature on Player Network Console. To proceed with data deployment, reach out to the Player Network representative.

The following analytics platforms are also supported for Player Network data insight services currently, and has to be configured individually:

  • DataBrain
  • AiX
  • Adjust
  • AppsFlyer
  • Facebook
  • Firebase
  • Garena

For detailed configuration steps, see Tutorials, or refer to the official documentations of each platform.

Step 1: Configure the SDK

In the ANALYTICS_REPORT_CHANNEL field of the INTLConfig.ini file, add the data analytics platforms to which the game is intended to report events.

[ANALYTICS]
ANALYTICS_REPORT_CHANNEL = INTL,AppsFlyer,Adjust,Facebook,Firebase,Garena

ANALYTICS_REPORT_CHANNEL specifies the name of the required reporting platform. INTL represents the Player Network platform. Supported third party platforms include Adjust, AppsFlyer, Facebook, Firebase, and Garena. When there are multiple reporting channels, separate them with commas.

For additional advanced configurations, refer to the following sections detailing the reporting fields and analytics fields that you can configure.

Player Network SDK Reporting
FieldDescriptionRemark
REPORT_ENABLEWhether to enable reporting
Default value: 1, enable
Optional
REPORT_COMPRESS_ENABLEWhether to enable compression
Default value: 1, enable
Optional
REPORT_KV_MAX_LOCAL_FILE_NUMMaximum number of KV log implementation files
Default value: 10
Optional
REPORT_KV_MAX_LOCAL_FILE_SIZEMaximum size of KV log implementation files
Unit: Bytes
Default value: 262144
Optional
REPORT_KV_TIME_INTERVALKV log reporting time interval
Units: Seconds
Default value: 5
Optional
REPORT_BIN_ENABLEWhether to enable binary log file reporting
Default value: 1, enable
Optional
REPORT_BIN_SEG_SIZEFile shard size of binary logs
Units: Bytes
Default value: 32768
Optional
REPORT_BIN_MAX_LOCAL_FILE_NUMMaximum quantity of binary log implementation filesOptional
REPORT_BIN_MAX_LOCAL_FILE_SIZEMaximum file size of binary logs
Units: Bytes
Optional
REPORT_BIN_TIME_INTERVALReporting time interval of binary logs
Units: Seconds
Default value: 10
Optional
REPORT_SRC_IDDefault source ID of data reporting
Default value: 1000
Optional
REPORT_LIFECYCLE_ENABLEWhether to report when the lifecycle changes
Default value: 1, enable, which indicates that a report request is triggered by a switch to the front end or the back end.
Optional
PING_TIMEOUTPing timeout interval during network quality collection
Units: Seconds
Default value: 1
Optional
REPORT_DISABLE_COLLECT_METHODMethod IDs where reporting is disabled, separated by commas (,)
Default value: Empty (Reporting enabled for all)
Recommended values: 501,703,706,721,724,731,732,902
Optional
REPORT_DISABLE_COLLECT_EVENT_NAMEEvent names for which to disable reporting, separated by comma (,)
Default value: sdk_update_start
Optional
REPORT_UA_DATA_ENABLECurrently only supports Windows
Whether to enable UA reporting
0: Disable
1: Enable
Default: 1
Optional
REPORT_UA_DATA_SHORT_CODE_FILTERCurrently only supports Windows
Configure fitler for UA short code
Short codes in the list are reported directly (multiple short codes are separated by comma (,))
Default: empty string
Optional
Player Network SDK Analytics
FieldDescriptionRemark
ANALYTICS_REPORT_CHANNELData reporting channel
INTL indicates channels owned by Player Network.
Required
ANALYTICS_AUTH_REPORT_ENABLEWhether to automatically report registration and login events.
Contact [killuachen] to confirm this configuration.
Default: 1, enabled (Disabled by default for V1.18.00 and earlier.)
Optional

Step 2: Prepare to send events

Before using any data insight functions, initialize the data insight services by calling the InitAnalytics method. Then call the IsDeviceInfoCollectEnable method with the name of the device information you want to track. This will check whether the collection of that specific device information is enabled.

IDFA authorization on iOS

For iOS 14.5 and higher, Apple requests apps to obtain user permission to collect IDFA to enhance privacy management for iOS users.

  1. Add dependency to iOS AppTrackingTransparency.framework.
  2. In the Info.plist file, add NSUserTrackingUsageDescription for the displayed player consent prompt text and configurations.
  3. Call static void RequestTrackingAuthorization(); to implement the prompt the obtain player consent for collecting IDFA.
    • This interface is designed specifically for iOS. It's developed using Xcode 12 or later and is compatible with devices running iOS 14.5 or above.
    • This interface makes a one-time request and the system saves the user's choice. No further notification will appear unless the user uninstalls and reinstalls the app.
Google Advertising ID on Android

The AD_ID permission (<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>) is necessary to collect the Google Advertising ID. Android 13 (API 33) apps that use the advertising ID must declare this in the Google Play Console. You'll need to turn on the switch in Google Play Console > Policy > App content > Advertising ID.

note

Player Network SDK has AD_ID collection enabled by default. To disable, add the below configuration to AndroidManifest.xml:

<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove" />

For more information about Google Advertising ID, see Advertising ID and AdvertisingIdClient.Info.

Step 3: Send events

Call the ReportFunnel method to report the data of a pre-defined event for calculating the conversion rate in funnel analysis.

int error_code = 0;
INTLAPI.ReportFunnel(FINTLFunnelStep.kStartAppLaunch, error_code);

Call the ReportFunnelCustomEvent method to report the data of a custom event for calculating the conversion rate in funnel analysis.

string l1_event_name = "l1_event_name";
string l2_event_name = "l2_event_name";
int error_code = 0;
INTLAnalytics.ReportFunnelCustomEvent(l1_event_name,l2_event_name, error_code);

Step 4: Validate the source data

To ensure all reported data is accurate, you should:

  • Verify that both key and value fields match the data reported, including capitalization, underscores, and spacing.
  • Check that no key or value fields have been lost during the reporting process.