Singular Unity SDK | |
---|---|
Download |
Singular Unity SDK version 2.1.2 |
Compatibility |
Unity 4.7.2+ |
Sample App | Review our sample app for an example of a complete SDK integration based on best practices. |
Integration Guides |
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 levelling up in a gaming app.
You can send events to Singular from your app using the Event 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.Event Method | |
---|---|
Description | Send user events to Singular for tracking. |
Signature |
Note: When passing dictionaries, dictionary values must have one of these types: string, int, long, float, double, null, ArrayList, Dictionary<String,object> |
Usage Example |
|
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.
Use one of the following methods to report revenue events to Singular.
Notes: Any revenue reported in a different currency will be auto-converted to your organization's preferred currency as set in your Singular account.
Option 1 (Recommended): SingularSDK.InAppPurchase
You can track revenue events by leveraging Unity IAP (In-App Purchases). This gives two important advantages:
- Singular gets all the available information about the purchase for richer reporting.
- Singular also gets the purchase receipt, which Singular uses in the back end to validate the purchase and rule out attribution fraud.
SingularSDK.InAppPurchase Method |
|
---|---|
Description | Send an IAP product to Singular to track the purchase event. |
Signature |
Notes:
|
Usage Example |
|
Option 2: Revenue and CustomRevenue
Use Revenue to pass information about a purchase to Singular "manually," by detailing the transaction currency, the transaction amount, and other optional details. CustomRevenue is very similar but allows you to also add a custom name for the revenue event.
SingularSDK.Revenue Method |
|
---|---|
Description | Send a revenue event to Singular. |
Signature |
Note: Pass currency as a three-letter ISO 4217 currency code, such as “USD”, “EUR”, “INR”.
|
Usage Example |
|
SingularSDK.CustomRevenue Method |
|
---|---|
Description | Send a revenue event with a custom name to Singular. |
Signature |
Note: Pass currency as a three-letter ISO 4217 currency code, such as “USD”, “EUR”, “INR”.
|
Usage Example |
|