ReportEvent
AndroidiOSWindows
If you were looking for the method for use with Unreal Engine, see ReportEvent for Unreal Engine SDK.
If you were looking for the method for use with Unreal Engine, see ReportEvent for Unreal Engine SDK.
This API reports custom events. When users use the Adjust channel, they must register events on the Adjust dashboard in advance and obtain event tokens, to report events successfully.
Supported channels:
- INTL
- Adjust
- AppsFlyer
- Firebase
- Garena
caution
Windows platform only supports the INTL channel.
Function definition
public static void ReportEvent(string eventName, Dictionary<string, string> paramsDic, string specificChannel = "", string extraJson = "{}");
Input parameters
Parameter Name | Parameter Type | Description |
---|---|---|
eventName | string | Event name 1. For the Adjust channel, enter the event token to track the events. 2. For the AppsFlyer channel, it is recommended to use only lowercase letters and numbers (a-z and 0-9) for the in-app event names. 3. For the Facebook channel, event names and parameter names must consist of 2 to 40 letters and numbers; parameter values cannot exceed 100 characters. 4. For the Firebase channel, names must consist of 1 to 40 letters, numbers, and underscores. Names must start with a letter. Note that event names are case-sensitive, and logging two events whose names differ only by case will result in two different events. 5. For the INTL channel, event_name should not exceed 12 characters, the allowed characters include upper and lower case letters, numbers, underscores, no spaces |
paramsDic | Dictionary<string, string> | Parameters that must be reported Key-value format Not used for Adjust channel You can pass an empty dictionary. |
specificChannel | string | Specified channels 1. Set to a blank string if no channels are specified. By default, a blank string indicates that the initialized channels will be reported. That is, the reporting channels configured by ANALYTICS_REPORT_CHANNEL in the INTLConfig.ini configuration. For more information, see Integration Wizard.2. Specify a channel to report to, such as "Facebook". 3. Specify multiple channels to report to, separating them with single-byte commas, such as: "Facebook,Firebase". |
extraJson | string | Extended parameter, additional judgment conditions for Player Network SDK clients. This parameter is not reported to specified channels. |
Code sample
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);