Send Events
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
- 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
Field | Description | Remark |
---|---|---|
REPORT_ENABLE | Whether to enable reporting Default value: 1, enable | Optional |
REPORT_COMPRESS_ENABLE | Whether to enable compression Default value: 1, enable | Optional |
REPORT_KV_MAX_LOCAL_FILE_NUM | Maximum number of KV log implementation files Default value: 10 | Optional |
REPORT_KV_MAX_LOCAL_FILE_SIZE | Maximum size of KV log implementation files Unit: Bytes Default value: 262144 | Optional |
REPORT_KV_TIME_INTERVAL | KV log reporting time interval Units: Seconds Default value: 5 | Optional |
REPORT_BIN_ENABLE | Whether to enable binary log file reporting Default value: 1, enable | Optional |
REPORT_BIN_SEG_SIZE | File shard size of binary logs Units: Bytes Default value: 32768 | Optional |
REPORT_BIN_MAX_LOCAL_FILE_NUM | Maximum quantity of binary log implementation files | Optional |
REPORT_BIN_MAX_LOCAL_FILE_SIZE | Maximum file size of binary logs Units: Bytes | Optional |
REPORT_BIN_TIME_INTERVAL | Reporting time interval of binary logs Units: Seconds Default value: 10 | Optional |
REPORT_SRC_ID | Default source ID of data reporting Default value: 1000 | Optional |
REPORT_LIFECYCLE_ENABLE | Whether 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_TIMEOUT | Ping timeout interval during network quality collection Units: Seconds Default value: 1 | Optional |
REPORT_DISABLE_COLLECT_METHOD | Method 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_NAME | Event names for which to disable reporting, separated by comma (,) Default value: sdk_update_start | Optional |
REPORT_UA_DATA_ENABLE | Currently only supports Windows Whether to enable UA reporting 0: Disable 1: Enable Default: 1 | Optional |
REPORT_UA_DATA_SHORT_CODE_FILTER | Currently 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
Field | Description | Remark |
---|---|---|
ANALYTICS_REPORT_CHANNEL | Data reporting channelINTL indicates channels owned by Player Network. | Required |
ANALYTICS_AUTH_REPORT_ENABLE | Whether 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.
- Add dependency to iOS
AppTrackingTransparency.framework
. - In the
Info.plist
file, addNSUserTrackingUsageDescription
for the displayed player consent prompt text and configurations. - 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.
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.
- Unity
- Unreal Engine
int error_code = 0;
INTLAPI.ReportFunnel(FINTLFunnelStep.kStartAppLaunch, error_code);
int error_code = 0;
UINTLSDKAPI::ReportFunnel(step_name, error_code);
Call the ReportFunnelCustomEvent
method to report the data of a custom event for calculating the conversion rate in funnel analysis.
- Unity
- Unreal Engine
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);
FString l1_event_name = "l1_event_name";
FString l2_event_name = "l2_event_name";
int error_code = 0;
UINTLSDKAPI::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.