SDK Setup and Adding App Events

After you complete app set up, you can only optimize delivery of your ads for LINK_CLICK or clicks on the actual ad. You need to set up a Facebook SDK for your app if you want to measure and track installs of your app. Set up the SDK for iOS, Android or for Javascript if your application is a Facebook web game.

SDK Setup

Facebook SDKs enable you to pass app event data from your app to Facebook. With it, 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. You should:

  • 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 set up for each platform your app is available in. 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.

  1. Download the SDK and follow the instructions for each SDK for your app.
  2. Add or import the SDK in your app, using your developer environment.
  3. Configure the SDK in your app.
  4. Add your initial app event. By default, the SDKs already provide app installs.
  5. Test the SDK setup to make sure it's working properly, by triggering a test app event.

At this point you are set up with the SDK and your application can pass app install events to Facebook for measurement and tracking purposes. With this data, you can track and measure for 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-on events such as purchases, or value optimization.

Most likely there are other specific events you want to track and measure. At this point you should go ahead and add other app events to begin tracking and measuring them.

For full instructions and documentation on Facebook SDKs, see the iOS, Android, and JavaScript SDK guides.

Adding Other App Events

After you verify your SDK is setup correctly, you can add additional app events that you care about to your app. This enables you to track or log your app events automatically or when you make specific calls in your app.

Facebook has 12 standard app events you can log:

  • Achieved level
  • Added payment info
  • Added to cart
  • Added to wishlist
  • Completed registration
  • Completed tutorial
  • Initiated checkout
  • Rated
  • Searched
  • Spent credits
  • Unlocked achievement
  • Viewed content

You can track and measure these app events in two ways:

  • Use our codeless set up tool in Facebook's Events Manager: This is a simple tool for setting up events without implementing codes. You can interact with app screen elements such as such as buttons, images or links to define event names. As your users navigate through the app and interact with these UI elements, events will be sent to Facebook.

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 which are unique to your application. For full details see Facebook Analytics, App Events.

If you're working with a Facebook Mobile Measurement Partner, your partner can setup your app, SDKs and App Events for you.

At this point you can track and measure for any of the 14 app events you implemented. With App Events, you can use APP_INSTALLS, TRAFFIC and CONVERSIONS as your advertising objectives. However Facebook does not optimize delivery of your ads to achieve your specified app event. We still optimize ads delivery for mobile app installs, however App Events can improve the chances your ad not only drives installs but it also drives post-install actions, such as purchases.

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.