Getting Started with Facebook's Analytics for Apps


At this year’s F8 Conference, Facebook introduced Facebook Analytics for Apps, a Platform that unifies analytics across multiple devices and platforms. Entering an already-crowded market space that includes the likes of analytic giants Google Analytics, Flurry, Twitter’s Fabric and Keen, the Facebook offering brings a few unique value propositions to the table.


In this article we will take a high-level view of Facebook Analytics for Apps, as well as show you how to use the SDK to get your app up-and-running with the platform.

What makes Analytics for Apps unique?

While you may have worked with various other analytic tools, Facebook’s foray into analytics brings with it strength in demographics. That is, through the sheer number of users on the social media platform, the company is able to provide deeper understanding of audience behavior by breaking down its own demographics, as well as through its Integration with Facebook ads.

Facebook has also provided a real-time demo to help you get started with the product, which will help you better hone in on the premise and theme of this article.

Cross Platform

The analytics platform can track users across multiple devices, be they mobile or desktop, to help organizations understand traffic behavior and distribution across the systems on which users work and play. For example, say a user accesses your ecommerce website on his desktop, puts a few items in his cart, then completes the transaction on a mobile device. Using the Facebook Analytics program, you can see which buttons were selcted, which products caught the user's attention on which platform, and which ads--on mobile or desktop--made the biggest impact. This kind of unified insight across all platforms present a single story that provides invaluable data.


Analytics for Apps breaks down groups of people based on certain characteristc properties, and measures these groups compared with tthe overall population. An example would be the top 10% of users under 35 years of age that use Windows Mobile.

This is done through what are called Events, which provide the ability to track and break down trends by country, age, gender, language and platform. This enables companies to gain better understanding of how specific and individual groups use your app.

Segments through Events provides powerful filters that work in conjunction with Cohorts and Funnels, which we will discuss next, to provide a more comprehensive picture.


The Cohorts Function allows you to look at a subset of the user-base demographics--such as those who reviewed product A on your website, then added product A to their cart, and followed through with the purchase. Chorts provides a historical empirical study of customer performances--or, how customers are performing now compared to one week earlier--providing you with a clearer understanding of retention, lifet-time value and repeat purchase rate.


The Funnels feature follows the sequences of interaction for groups of people, such as tracking a purchase flow, which is useful for being able to determine at what point users drop off and why. You can then use that information to, say, streamline the checkout process, focusing on improving the steps in the process where potential customers tended to abandon their carts.



If you are already running ad campaigns on the Facebook platform, Analytics for Apps also provides greater insight into the lifetime value of your ads and can help calibrate your running ads for better performance. Facebook has provided a compelling example of how this could be useful:

You could measure the lifetime value of customers acquired through different ad campaigns on different ad networks that you ran in Japan, which could help you in the future determine how much you are willing to bid per install in Japan for each ad network. (Source: Facebook)

This new attribution feature was in closed beta as this article was being written, but you can apply to sign up by clicking here.

Integrating Facebook App Events in your iOS App

Getting started with Analytics for Apps is straightforward, and we will show you how easy it is to integrate this platform into your iOS app. ’

You start off by downloading and installing the Facebook iOS SDK and dragging the Framework files into your project, as well as Xcode project navigator. An easier way would be to simply add pod Facebook-iOS-SDK to your CocoaPods dependency-management Podfile.

You will also need to register your app with Facebook, as you would normally do to use the iOS sdk.

Events for iOS

Events are the bread-and-butter of understanding how people engage with your app, and how you measure specific sets of metrics. This is done by logging significant and interesting events via your app and the iOS SDK. Currently, Facebook provides up to 14 predefined convenience events, such as added to Cart. You can also add your own custom-defined events. In your app’s AppDelegate’s applicationDidBecomeActive override method, make sure to add the following:

   // Call the 'activateApp' method to log an app event for use
    // in analytics and advertising reporting.
    [FBSDKAppEvents activateApp];   

You log ecommerce purchases by using one of the helper methods to indicate the price (as well as the form of currency, which is important if you are operating across borders):

[FBSDKAppEvents logPurchase:4.32 currency:@"USD"];

Otherwise, you log events manually, by calling the following:

[FBSDKAppEvents logEvent:FBSDKAppEventNameAddedToWishlist
          parameters:@{ FBSDKAppEventParameterNameCurrency    : @"USD",
                        FBSDKAppEventParameterNameContentType : @"coat",
                        FBSDKAppEventParameterNameContentID   : @"42112-22422-1K" } ];

FBSDKAppEventName refers to one of the predefined 14 event constants. You can also supply a set of parameters and ValueToSum (arbitrary number that represents a value –ie price or quantity) and will be used to sum-up/aggregate in analytics. Parameters are of course optional, and could be omited. You can find the complete list of event constants (and parameter constants) at:

Integrating Analytics for Apps into your Ads

Integrating app events also allows you to reach into your existing app user base for mobile app ads, tracking what actions users have taken within your app and segmenting the most active "purchasing" users. You can subsequently trigger through Facebook mobile ads to encourage those cross-selling among the more valued customers.

For now, Ads Attribution will only support the same 14 pre-defined events we mentioned earlier and, once hooked up, will report app events as different types of actions in the Ads Manager. Facebook provides an example where you would track 10 actions, eight of which would be check-outs and two registrations that are Ads Manager-specific.

Data Control & Privacy

Facebook also provides a nice tool that will allow users to control/set how much of their information on app event data should be used by the Facebook ads system (following the company’s Platform Policy). In iOS, by simply adding the following line of code, you would be able to limit the event usage:

[FBSDKAppEvents setLimitEventUsage:YES];

How this solution compares to others

We have reviewed other mobile analytics systems, including Fabric and Keen IO. Many things are similar among all of these products, but the big draw for Facebook Analytics for Apps is the big (really big) ecosystem that the social network provides. Indeed, with Facebook being the largest social network, it’s hard to compete with it on insights. The other solutions we have reviewed provide easy-to-use and capable tools, and, if your apps are not social networking-focused, they might be a good bet. Facebook Analytics for Apps is even more compelling if you use Facebook Ads for Mobile, as well.


With Facebook’s Analytics for Apps, you get the ability to hook into the social media ecosystem of millions (and millions) of users on the Facebook platform, as well as with Facebook's sophisticated  ads. And, let’s face it, analytics are all about understanding your users' demographics and segments. Facebook makes it easier with Segments and Cohorts to better understand your users, while being mindful of their privacy concerns.

Developers are spoiled by the range of analytics tools available, each with similar capabilities. But, in the end, it all comes down to how heavily you are looking to integrate your app with Facebook.

Facebook’s support for SDK capabilities has blossomed quite well since the company’s acquisition of Parse, as evidenced by the power that Facebook Analytics for Apps puts in developers' hands.

Helpful Resources

Be sure to read the next Mobile article: Increase Retention With Quettra Portrait User Interest API