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.
Once you've implemented the SDK for your platform, you should also add code for additional app events you want to track and measure.
If you have not already done so, under Settings > Basic in the App Dashboard add a Platform for your app.
If you provide your app on multiple platforms, you should 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. After you aggregate enough app install events, you can optimize ads delivery for installs and follow-up events such as purchases or value optimization.
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. This enables you to 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 Facebook Analytics, App Events.
At this point, you can track and measure for any of the app events you implemented. With App Events, you can use `APP_INSTALLS`, `TRAFFIC`, and `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, you must resubmit your app to the app stores where it's available for download. You need to do this because you changed the source code. The app must also pass App Review.