Skip to main content

Custom Event Report (ReportEvent)

[Player Network SDK & MSDK] Report custom events.For the Adjust channel, the event must be registered in the Adjust dashboard in advance to obtain the event token before it can be successfully reported.

Supported Channels:

  • Adjust
  • AppsFlyer
  • Facebook
  • Firebase

[MSDK only] Channel:

  • Beacon
  • TDM

[Player Network SDK only] Channel:

  • INTL
  • Garena

Supported platforms

Supports Android, iOS, Windows platform.
caution

The Windows platform only supports the INTL channel.

Function Definition

void ReportEvent(
string eventName,
Dictionary<string, string> paramsDic,
string spChannels = "",
bool isRealTime = true);
</TabItem>
<TabItem value="UE">
```cpp
static void ReportEvent(
const std::string &event_name,
std::map<std::string, std::string> &params,
const std::string &specific_channel = "",
bool is_real_time = true,
const std::string &extra_json = "{}");

Input Parameters

Parameter nameParameter TypeDescription
eventNameStringEvent Name
1. Adjust channel: Requires filling in the event token to track the event
2. AppsFlyer channel: It is recommended to use only lowercase letters and numbers (a-z and 0-9) for in-app event names
3. Facebook channel: Events and parameters must consist of 2 to 40 alphanumeric characters, and each parameter value cannot exceed 100 characters
4. Firebase channel: Must contain 1 to 40 alphanumeric characters or underscores.The name must start with an alphabetic character.Please note that event names are case-sensitive. Logging two events that differ only in case will result in two separate events.
paramsDicDictionary<string, string>Parameters to Report
in key-value format
Adjust channel does not use this.Can pass an empty dictionary.
Parameters cannot contain the | symbol.
spChannelsstringSpecify Channel
1. If no channel is specified, an empty string can be provided. An empty string will default to reporting to the initialized channel, as configured in MSDKConfig.ini or INTLConfig.ini.For more information, see the MSDK documentation or the Player Network documentation.
2. Specify reporting to a particular channel, for example, "Facebook".
3. Specify reporting to multiple channels, separated by commas, for example, "Facebook, Firebase".
isRealTimeboolWhether to report in real time

Code Example

Dictionary<string, string> paramsDic = new Dictionary<string, string>();
// TODO: Add key-value pair
UnionAdapterAPI.GetReportService().ReportEvent("event", paramsDic);