Facebook Analytics for Apps quickstart guide
This guide helps you set up Facebook Analytics for Apps quickly so you can see data, analyze trends and better understand the behavior of people who use your app.
Before you start
Make sure you have a Facebook Developer account—if you don't have one already,
create one.
You'll also need to add the Facebook SDK to your app. The following guides take you through all of the necessary steps. When you're done, return here to finish setting up Analytics for Apps.
1. Log app events
App events are the key actions that people take, such as launching your app, viewing content or making a purchase.
When you integrated the Facebook SDK with your native mobile app, you probably added the code to log your first event: activateApp.
If not, you can use the code shown below.
The examples in this document are written in Objective-C. If you're using Swift, refer to App Events with the Facebook SDK for Swift.
// Add to your AppDelegate.m file
- (void)applicationDidBecomeActive:(UIApplication *)application {
// Call the 'activateApp' method to log an app event for use
// in analytics and advertising reporting.
[FBSDKAppEvents activateApp];
}Logging web activity
You can log app events for any meaningful actions people take on your website. There are many pre-defined events such as completed registration, viewed content, searched, added to cart, spent credits and more.
For websites, we recommend triggering the page view event on all pages to ensure accurate user accounts and session durations.
Analytics for Apps supports up to 1,000 unique events for your app or website, so you can also define your own custom events. Try this now by adding the following code to a button click handler in your app:
// Add to a button click handler
- (void)buttonClick:(id)sender {
// logs your custom event, feel free to use
// a string of your choosing here
[FBSDKAppEvents logEvent:@"sentFriendRequest"];
}Now launch your app and click the button where you added the above code to. Taking that action will log your first custom event.
2. Verify Your app events
You can review the most recent events logged by your app or website. To verify these events, visit Analytics for Apps. Then choose your app and go to Activity > Event Debugging.

You should see your app launch (if you're setting up an app) or the page view event (if you're setting up a website) as well as the custom event for the button click. If not, click the refresh button to load the latest events.
Once you've verified that your events are being logged correctly, then you can create your first funnel to help you measure conversion for any sequence of events you choose.
3. Take a guided tour of Facebook Analytics for Apps
Now that you're logging events, visit our guided demo app to take a tour of all of the key features that Facebook Analytics for Apps offers you and your business.
Learn More
Log more events with additional data, including purchase value, custom parameters and more.
View the Analytics for Apps help center, where you'll find frequently asked questions and watch videos that help you get the most out of your data.
Read our best practices guide for recommendations about which events to log for various types of businesses.
Visit the Analytics for Apps website for a great summary of the key features, customer stories and more.