App Events for React Native

App events help you understand the makeup of your users. They allow you to measure, and then target specific sets of your users with Facebook mobile app ads. You do this by logging events from your app via the Facebook SDK for React Native. An event can be a predefined event, or a custom event that you define. To learn more about app events, see

App Events - Facebook Analytics



To use the app events API, import the AppEventLogger component into your React Native app.

import {AppEventsLogger} from 'react-native-fbsdk';    

Log an Event

To log a custom event, call the logEvent method and pass it a string specifying the name of your custom event.


Log Purchase Event

For logging in-app purchases, a custom logging method is provided. To log a purchase event, call the logPurchase function and pass in the amount of the purchase and the currency code. Only log a purchase event after the purchase has been completed.

AppEventsLogger.logPurchase(1.99, 'USD');


Wikipedia: ISO 4217

for information on Currency Codes.

Verify Your Logged App Events

The Events Manager displays the events you send to Facebook Analytics. If this is the first time you launched your app with this code, you may have to wait at least 20 minutes before your events appear.
Note: Events may take up to 20 minutes to appear in the dashboard.