Rich in-app events for Android and iOS


Rich in-app events provide advertisers with the ability to record post-install events and attribute them to the originating media source.

When users perform registrations, complete tutorials, add items to the shopping cart, or make purchases, then in-app events data can record the events with the details.  

Rich in-app events are the ideal tool to determine the value of app users and the quality of traffic originating from different media sources. The implementation of rich in-app events is optional but we strongly recommended that you do so.

The trackEvent API

An in-app event is comprised of an event name and event parameters.

You can use any event name string of your choice. However, AppsFlyer SDK contains recommended event names via enumerations and definitions (see the Event Types tab for the list of recommended events and parameter names).

Event names are case sensitive, meaning that af_purchase and af_PURCHASE are two different events.

The length of event values are limited to 1000 characters. Don't exceed this limit. We may truncate it if you do so.


Android iOS
public static void trackEvent(Context context, String eventName, Map eventValues)

Use getApplicationContext()
Any string to define the event name.
A map of event parameters that comprise a rich event.

In-app events for hybrid apps

In cases where your app is a hybrid app, see our guide on in-app events for hybrid apps.


Each network has its own limitations regarding the permitted characters in event names. To avoid problems, use only lower-case alpha-numeric characters (a-z and 0-9) for your in-app event names.

Was this article helpful?