App events allow you to understand the makeup of users engaging with your app, measure the performance of your Facebook mobile app ads, and reach specific sets of your users with Facebook mobile app ads. This is done by sending an event from your app via Facebook Android SDK. This event can be one of the 14 predefined events such as 'added to cart' in a commerce app or 'level achieved' in a game or other custom events.
Demographic Makeup of Mobile App Users
With just a few lines of code, you can get a demographic breakdown of your installed users including age, gender, language and country. You can also choose to send custom app events for any actions a user makes in your app (e.g. making payments, achieving a level in a game etc.) and, likewise, view demographic information for each group of users who have performed these actions.
You can easily insert these events into your apps by using the following code.
Send an installation message to Facebook. Do nothing on desktop apps at this time.
The user has achieved a level in the app.
The user has entered their payment info.
The user has added an item to their cart.
SPFacebookAnalytics.AddedToCart(54.23f, "HDFU-8452", "shoes", "USD");
The user has added an item to their wishlist.
SPFacebookAnalytics.AddedToWishlist(54.23f, "HDFU-8452", "shoes", "USD");
The user has completed registration with the app.
Facebook, Email, Twitter, etc.
The user has entered the checkout process. The valueToSum passed to logEvent should be the total price in the cart.
SPFacebookAnalytics.InitiatedCheckout(54.23f, 3, "HDFU-8452", "shoes", true, "USD");
The user has completed a purchase
SPFacebookAnalytics.Purchased (54.23f, 3, "shoes", "HDFU-8452", "USD");
The user has rated an item in the app.
SPFacebookAnalytics.Rated (4, "HDFU-8452", "shoes", 5);
The user has performed a search within the app.
SPFacebookAnalytics.Searched ("shoes", "HD", true);
The user has spent app credits
SPFacebookAnalytics.SpentCredits (120f, "shoes", "HDFU-8452");
The user has unlocked an achievement in the app.
The user has viewed a form of content in the app.
SPFacebookAnalytics.ViewedContent (54.23f, "shoes", "HDFU-8452", "USD");
Send your own custom events
Learn more in the facebook App Events Best Practices Guide.
Full use example can be found under the FacebookAnalyticsExample.cs script.