Unreal Engine SDK: Tracking Events and Revenue

Singular Unreal Engine SDK
Download
Singular Unreal Engine SDK version 1.0.0
Compatibility

Unreal Engine 4.23+

Integration Guides
  1. Basic Integration
  2. Tracking Events and Revenue
  3. Adding SKAdNetwork Support
  4. Advanced Options

 

Tracking Events

Singular can collect data about in-app events in order to help analyze the performance of your campaigns and measure KPIs.

For example, your organization may want to collect data about user logins, registrations, tutorial completions, or leveling up in a gaming app.

You can send events to Singular from your app using the SendEvent and SendEventWithArgs method.

Note: We highly recommend passing event names and attributes in English to guarantee compatibility with third-party partners and analytics solutions if you plan to use them.

SingularSDK SendEvent Method
Description Send a user event to Singular for tracking, with a custom event name.
Signature
public static void SendEvent(FString eventName)

Usage Example

// Send an event without any parameters, just a name
USingularSDKBPLibrary::SendEvent("Login");
SingularSDK SendEventWithArgs Method
Description Send a user event to Singular for tracking, with a custom event name and additional custom parameters.
Signature
public static void SendEventWithArgs(FString eventName, 
TMap<FString, FString> args)

Usage Example

TMap<FString, FString> args;
args.Add(TEXT("Key"), TEXT("Value"));
USingularSDKBPLibrary::SendEventWithArgs("Login", args);

Tracking Revenue

Singular can collect data about revenue gained through the app in order to help analyze the performance and ROI of your campaigns. Singular will make the data available to you in reports, log export, and postbacks.

Notes: Any revenue reported in a different currency will be auto-converted to your organization's preferred currency as set in your Singular account.

Use SendRevenue to pass information about a purchase to Singular, including a custom event name, the transaction currency, and the transaction amount. SendRevenueWithArgs is very similar but allows you to add additional custom parameters.

SingularSDK SendRevenue Method
Description Send a revenue event to Singular.
Signature
public static void SendRevenue(FString eventName,
FString currency, float amount)
Note: Pass currency as a three-letter ISO 4217 currency code, such as “USD”, “EUR”, “INR”.
Usage Example
USingularSDKBPLibrary::SendRevenue("Purchase Completed", "USD", 9.99);
SingularSDK SendRevenueWithArgs Method
Description Send a revenue event to Singular with additional custom parameters.
Signature
public static void SendRevenueWithArgs(FString eventName, 
FString currency, float amount, TMap<FString, FString> args)
Note: Pass currency as a three-letter ISO 4217 currency code, such as “USD”, “EUR”, “INR”.
Usage Example
// Send a revenue event with product details
TMap<FString, FString> args;
args.Add(TEXT("Key"), TEXT("Value"));
USingularSDKBPLibrary::SendRevenueWithArgs("Purchase Completed",
"USD", 9.99, args);
Was this article helpful?