When you first complete app setup, you can only optimize delivery of your ads for
LINK_CLICK or clicks on the actual ad. For best results, we recommend that you add more events so you can also optimize your ad for installs or other actions such as purchases or D2 or D7 retention (opening the app again two or seven days after installing).
If you're working with a Facebook Mobile Measurement Partner, your partner can set up your app, SDKs, and App Events for you.
If you will be doing the setup and adding app events yourself, you can use this page to find out how. The basic steps are:
Facebook SDKs enable you to pass app event data from your app to Facebook. With app event data, you can accurately track and measure the actions people take in your app.
If you have not already done so, specify your app's platform in the app settings. Open the App Dashboard for your app, choose Settings > Basic, and go to the Platform section.
If you provide your app on multiple platforms, repeat this setup for each platform where your app is available. For example, if your app is available on both Android and iOS, you should set up platforms twice in your app settings - once for the Android SDK and a second time for the iOS SDK.
At this point, the SDK is set up, and your application can pass app install events to Facebook for measurement and tracking purposes. With this data, you can track and measure app installs and also optimize your ads delivery for mobile app installs. Now that you've implemented the SDK for your platform, you should also add code for additional app events you want to track and measure, such as purchases.
For full instructions and documentation on Facebook SDKs, see these guides:
In the next section, we will look at how to track more types of events.
After you verify your SDK is set up correctly, you can add additional app events to your app. By adding more events, you can track or log your app events automatically or when you make specific calls in your app.
For a complete list of the standard app events you can log, see:
You can track and measure these app events in two ways:
For more information, regardless of platform, see App Events API.
In a few cases, you may want to set up custom App Events, which track special events that are unique to your application. For full details, see App Events.
At this point, you can track and measure for any of the app events you implemented. With App Events, you can use
CONVERSIONS as your advertising objectives. You can optimize your ads for people most likely to complete an app event; see App Event Optimization.
With this App Event data, you or your measurement partner could also create custom audiences, and you can target ads to these audiences. See Marketing API, Mobile App Custom Audiences and Ads Help Center, Custom Audience from your Mobile App.
After you add a Facebook SDK and App Events to your app: