Revenue Reporting (ReportRevenue) [Player Network SDK only]
[Player Network SDK only] Revenue reporting.
Supported Channels:
- Adjust
- Firebase
Supported Platforms
- Unity
- Unreal Engine
Supports
Android, iOS platform.Supports
Android, iOS platform.Function Definition
- Unity
- Unreal Engine
void ReportRevenue(
string eventName,
Dictionary<string, string> paramsDic,
string currency,
string revenueValue,
string specificChannel = "",
string extraJson = "{}");
static void ReportRevenue(
const std::string &event_name,
std::map<std::string, std::string> ¶ms,
const std::string ¤cy,
const std::string &revenue_value,
const std::string &specific_channel = "",
const std::string &extra_json = "{}");
Input Parameters
- Unity
- Unreal Engine
| Parameters | Type | Description | Note |
|---|---|---|---|
| eventName | String | Event Name For the Adjust channel, you must provide the event token to track the event. | Requir ed |
| paramsDic | Dictionary<string, string> | Parameters to Report in Key-Value Format Not required for the Adjust channel; you can pass an empty dictionary. | Required |
| currency | string | Currency code for the revenue Currency Code | Required |
| revenueValue | string | Revenue value expressed in full currency units (149.99 = $149.99) The minimum accepted value for this parameter is 0.001. | Required |
| specificChannel | string | Specify Channel 1. If no channel is specified, use an empty string.An empty string will default to reporting to the initialized channel, that is, the channel configured in ANALYTICS_REPORT_CHANNEL in INTLConfig.ini.For more information, see Access Guidelines。 2. To report to a specific channel, enter the channel name, e.g., "Facebook". 3. To report to multiple channels, separate the channel names with commas, e.g., "Facebook,Firebase". | Optional |
| extraJson | string | Extended Parameters Additional conditions for the Player Network SDK client. This parameter will not be reported to the specified channel. | Optional |
| Parameters | Type | Description | Note |
|---|---|---|---|
| event_name | std::string | Event Name For the Adjust channel, you must provide the event token to track the event. | Mandatory |
| currency | std::string | Currency code for the revenue Currency Code | Required |
| revenue_value | std::string | Revenue value expressed in full currency units (149.99 = $149.99) The minimum accepted value for this parameter is 0.001. | Mandatory |
| params | std::map<std::string, std::string> | Parameters to report in key-value format Not required for the Adjust channel; an empty dictionary can be passed. | Required |
| specific_channel | std::string | Specify Channel 1. If no channel is specified, use an empty string.An empty string will default to reporting to the initialized channel, that is, the channel configured in ANALYTICS_REPORT_CHANNEL in INTLConfig.ini.For more information, see Access Guidelines。 2. To report to a specific channel, enter the channel name, e.g., "Facebook". 3. To report to multiple channels, separate the channel names with commas, e.g., "Facebook,Firebase". | Optional |
| extra_json | std::string | Extended Parameters Additional conditions for the Player Network SDK client. This parameter will not be reported to the specified channel. | Optional |
Code Example
- Unity
- Unreal Engine
Dictionary<string, string> paramsDic = new Dictionary<string, string>();
// TODO: Add key-value pair
UnionAdapterAPI.GetReportService().ReportRevenue("h48sp8", paramsDic, "CNY", "88.88");
std::map < std::string, std::string> _params_map;
// TODO: Add key-value pair
GUA_NAMESPACE::GUAReportService::ReportRevenue("INTL_EVENT_TEST","CNY", "88.88", _params_map);