Track In-App Events
In-app events help you measure campaign performance and key performance indicators (KPIs) by tracking user actions, such as logins, registrations, tutorial completions, or level-ups in gaming apps. Singular collects these events to provide insights into user behavior and optimize marketing efforts.
Standard vs. Custom Events
Singular supports two types of events:
- Standard Events: Predefined events (e.g., sngLogin, sngContentView) recognized by Singular and often supported by ad networks for reporting and optimization. Using standard events simplifies setup, as Singular automatically adds them to your Events list without manual definition. Recommendation: Use standard events whenever possible for compatibility and ease of use. See the List of Standard Events and Attributes for standard event names and recommended attributes.
-
Custom Events: Events unique to your app (e.g., Signup, AchievementUnlocked) that don’t match Singular’s standard events.
Custom Event Limitations:
- 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.
- Event names are limited to 32 ASCII characters. Strings in non-ASCII characters have to be under 32 bytes once converted to UTF-8.
- Attributes and values are limited to 500 ASCII characters.
Work with your UA, marketing, or business team to compile a list of events and attributes based on your app’s marketing KPIs. Refer to How to Track In-App Events: Guide for Singular Attribution Customers for guidance on selecting events.
Send Events
- Use the event method to track a simple custom event with Singular's SDK.
- Use the eventWithArgs method to track a custom event with additional attributes with Singular's SDK.
Best Practices
- Use Standard Events: Prefer standard events for compatibility with ad networks and automatic recognition in Singular’s Events list.
- Validate Attributes: Check that attributes match the expected format.
- Debug Events: Enable SDK logging during development to verify events are sent correctly and are triggered at the appropriate moments in your app’s lifecycle (e.g., after a user logs in).
Note: Coordinate with your UA/marketing team to ensure tracked events align with your app’s KPIs. Test events in a development environment before deploying to production to verify data accuracy in the Singular Dashboard.
Track Revenue
Singular's React Native SDK enables you to track in-app revenue events to analyze campaign performance and ROI. Revenue data is available in Singular's reports, log exports, and postbacks, providing actionable insights into your app's monetization.
Why Track Revenue Events?
- Rich Analytics: Capture detailed transaction data to enhance Singular reports.
- Fraud Prevention: Include transaction receipts (e.g., from Google Play or Apple App Store) to validate purchases and combat in-app fraud.
- Campaign Optimization: Measure ROI by tying revenue to marketing efforts.
Best Practice: Pass the Full Purchase Object
We strongly recommend passing the purchase object returned from Android's (Google Play Billing) or iOS's (StoreKit) In-App Purchase (IAP) process. This ensures Singular receives comprehensive transaction details, including:
- Product ID
- Price
- Currency
- Transaction ID
- Receipt data (for validation)
By passing the full purchase object, you enable richer reporting and leverage Singular's fraud detection capabilities, particularly for Google Play transactions.
Capture the IAP Purchase Object
Use platform-specific IAP libraries to retrieve the purchase object:
- iOS: Use react-native-iap or similar to access StoreKit purchase details.
- Android: Use react-native-iap or the Google Play Billing Library to obtain the purchase object.
Send IAP Revenue
- Use the inAppPurchase method to track an in-app purchase event with purchase details.
- Use the inAppPurchaseWithArgs method to track an in-app purchase event with purchase details and additional custom attributes.
Send Revenue without the Purchase Object
While we strongly recommend reporting revenue events using the inAppPurchase methods for revenue validation, you can also send revenue events to Singular just by passing the currency and transaction amount.
Important: When sending revenue events without a valid purchase object, Singular does not validate the transactions.
Requirements
Note: Pass currency as a three-letter ISO 4217 currency code, e.g., "USD," "EUR", "INR".
- Use the revenue method to track a simple revenue event with a specified currency and amount.
- Use the revenueWithArgs method to track a revenue event with a specified currency, amount, and additional custom attributes.
- Use the customRevenue method to track a custom revenue event with a specified event name, currency, and amount.
- Use the customRevenueWithArgs method to track a custom revenue event with a specified event name, currency, amount, and additional custom attributes.
Send Subscription Revenue
Singular offers a comprehensive guide on how to implement subscription events using the Singular SDK. It covers in-app subscription event tracking across various platforms.
- Read our Subscription Event Technical Implementation Guide if you would like to track subscription revenue.
Send Ad Revenue
Ad Revenue Attribution helps you connect your ad revenue to the specific campaigns that brought users to your app. This gives you a clear picture of how well your ads are performing by showing the campaign cost, in-app revenue, and ad revenue all in one place. This feature also lets you send ad revenue data back to your ad networks to improve your ad performance.
- Use the adRevenue method to track ad revenue events with detailed ad data information.
- Read our detailed guide on Implementing Ad Revenue Attribution with mediation partners.
Hybrid Event Tracking
Singular recommends sending all events and revenue through the Singular SDK integrated into your app. However, Singular can collect events and revenue from other sources.
Any event NOT sent from the Singular SDK must comply with Singular's Server-to-Server Event documentation requirements and provide the matching device identifier to correctly attribute an event.
Important:
Discrepancies will occur if device identifiers used on Server-to-Server event requests do not have a matching device identifier in Singular. Be aware of the following possibilities:
- If an event request is received "before" the Singular SDK has recorded the device identifier, from an App Session, then the event request will be considered the "first session" for the unknown device, and Singular will attribute the device as an organic attribution.
- If the Singular SDK did record a device identifier, but the Singular SDK identifier differs from the device identifier specified in the Server-to-Server Event request then the event will be attributed incorrectly.
Hybrid Event Tracking Guides
Singular can collect data about revenue from your Server to help analyze the performance and ROI of your campaigns.
Requirements:
- From an in-app Registration or Login Event, capture and pass the device identifiers and store this data with the User ID on your server. Because device identifiers may change for a user, be sure to update the identifiers when a user generates an app session. This guarantees the server-side event will be attributed to the correct device.
- Server-side events are platform specific and should only be sent with the device identifier matching the device platform (e.g., IDFA or IDFV for iOS devices).
- You can use the Singular Internal BI postback mechanism to push an event in real time to your internal endpoint so that you can update the data set on the server side. See the Internal BI Postback FAQ.
- Review the Tracking Revenue section in the Server-to-Server Integration guide for details.
Follow the links below for details on how to enable these partners.