Skip to main content

Custom Event Report (ReportEvent)

AndroidiOSWindows
If you are using Unreal Engine, please refer to Unreal Engine SDK's ReportEvent.

Report custom events.For the Adjust channel, events must be registered in the Adjust dashboard and acquire an event token before successful reporting.

Supported Channels:

  • INTL
  • Adjust
  • AppsFlyer
  • Facebook
  • Firebase
  • Garena
  • TikTok
caution

Windows platform only supports INTL channel.

Function Definition

public static void ReportEvent(string eventName, Dictionary<string, string> paramsDic, string specificChannel = "", string extraJson = "{}");

Parameter Description

Parameter NameParameter TypeDescription
eventNameStringEvent Name
1. Adjust channel requires filling in the event token to track events
2. AppsFlyer channel suggests using only lowercase alphanumeric characters (a-z and 0-9) for in-app event names
3. Facebook channel requires events and parameters to consist of 2 to 40 alphanumeric characters, with each parameter value not exceeding 100 characters
4. Firebase channel requires 1 to 40 alphanumeric characters or underscores.Names must begin with a letter character.Please note that event names are case sensitive, and recording two events differing only in case will result in two different events.
5. INTL channel requires event_name not to exceed 12 characters, allowing uppercase/lowercase letters, numbers, underscores, and no spaces.
paramsDicDictionary<string, string>Parameters to report
in key-value format
Adjust channel will not use it.Can pass an empty dictionary.
specificChannelStringSpecify channel
1. If no channel is specified, you can fill in an empty string. An empty string will default to reporting to the initialized channel, that is, the reporting channel configured with ANALYTICS_REPORT_CHANNEL in the INTLConfig.ini configuration.For more information, see the Integration Guide.
2. Specify reporting to a certain channel, such as "Facebook".
3. Specify reporting to multiple channels, separated by English comma ',', e.g., "Facebook,Firebase".
extraJsonStringExtended parameters, additional judgment conditions of the Player Network SDK client, this parameter will not be reported to specified channels.

Code example

Dictionary<string, string> paramsDic = new Dictionary<string, string>();
paramsDic.Add("k1", "v1");
paramsDic.Add("k2", "v2");
paramsDic.Add("k3", "v3");
INTLAPI.ReportEvent("INTL_EVENT_TEST", paramsDic);