About this book

Analytics help you to understand the way your users are interacting with your mobile application. Flurry provides you with a strong analytics tool to keep track of your application and to analyze your application data without much hassle. It provides an SDK for almost all platforms to gather data from all platforms of mobile and web applications. The enormous amount of data Flurry handles directly translates into unique, powerful insights into your applications.

Getting Started with Flurry Analytics is a practical, hands-on guide to instantly getting started with Flurry analytics using step-by-step exercises. You will take advantage of the real power of Flurry analytics and provides you with an example-based learning approach to help you master it quickly and efficiently.

This book starts by discussing how to set up and integrate Flurry analytics and ends by making you aware of how to track your application using Parse. You will also learn about tracking your application data using Flurry analytics to strengthen your strategies and to improve the application monetization process. You will also learn about configuration and implementation of Flurry analytics and how to make the application track all the necessary details to empower management decisions.

Publication date:
December 2013


Chapter 1. Getting Ready with Flurry

Before getting into the details of Flurry and its analytics services, we will learn the reason behind using analytics in mobile applications. Then, we will learn about its setup and integration in our project. By the end of this chapter, you will know how to set up your project on Flurry along with its integration in your project.

In this chapter, we will learn the following:

  • What, why, and how to use analytics

  • The advantages of using analytics

  • Setting up your account and application in Flurry


About Analytics

While developing mobile applications, most people start with strong strategies, great design, and solid development for their application. Above all of these, analytics serves as a measure to gauge the value of all the efforts you have put into the application's development. We all know that this is the generation of smartphones; they are going to penetrate all aspects of our lives and will have a significant impact on our day-to-day lives. This provides developers, management, and other partners an opportunity to measure user impact and behavior using application analytics. As compared to all other industries, the mobile application industry is young. Flurry provides good analytics data to help you understand the industry better.

Using analytics will help you in the following ways:

  • Start using application analytics long before pushing the application to store

  • Make a difference in how you and your users are using the application

  • Use market analysis to avoid the mistakes already committed by your competitors

  • Analytics data lasts longer than your mobile app; it helps you to understand the market structure and plan strategies accordingly


The importance of Analytics in the use of applications

Analytics allows you to analyze the impact of your application on your customers. It helps management in taking vital decisions on project scalability to meet the current market demands. It also helps project managers and management members avoid unforeseen problems.

  • How Analytics are used: Earlier, companies used historical data and evidence to forecast application trends. Nowadays, there is a revolutionary change in data information as we have the Internet and social media in place, which provide large-scale data and make it difficult to extract useful information. Analytics provides an effective means of crunching useful data from large amounts of data.

  • How Analytics improve applications: Higher level management can track the direct progress of a project by accessing charts, which easily display data and comparisons. Analytics provide directions to management by telling them whether the milestones are met and the project costing is in control. It also provides detailed analysis for a broader view. Let's say you want to know about the total time spent by a user on your application and what small shift can improve the outcome. Analytics helps management in prioritizing such tasks to maximize productivity.

  • How organizations can best use Analytics: Analytics help managers assess the viability of their applications and gauge the applications that meet the benchmarks. It's important for managers to gather all these records and data for projects important to check how these changes in the application impact customers.

  • Using Analytics for projecting outcomes: Analytical data provides better insights to an organization about delays in product delivery to customers, and how it affects the company profit.

  • Using Analytics to create strategies: Data helps in forecasting and planning resources and requirements. It also empowers organizations to see the potential in the application idea and its scope in the market. It provides a better way to create business strategies rather than assuming and forecasting to lay strategies.

Flurry is a strong and powerful analytics agent that provides a Software Development Kit (SDK) for all the major platforms such as iOS and Android. It allows developers to track their application usage and track users' activities to improve the overall user experience. Flurry easy to integrate with your project.


Note that the iOS SDK will only work with Xcode 4.5 or higher. If you need the SDK for an older version of Xcode, you can e-mail Flurry support at .

The CoreLocation framework is not required for the Flurry iOS SDK as it doesn't detect the GPS location by default. However, if developers want to track a user's location data, they can use CCLocationManager to set the GPS location data information on Flurry Analytics.

If geo-tracking is only for the purpose of analytics, it is not well accepted by Apple and the app can be rejected. So be careful. If you want to geo-track the user, you should have a geo-based feature in your app; otherwise, your app may have some problems during the Appstore approval phase.

Flurry Analytics must be called in a main thread as it's supported only on the main thread.


The advantages of using Analytics

You can get detailed knowledge of customers' behavior very quickly and with little effort using Flurry's Analytics service. Here are a few advantages of using Analytics:

  • Keeps track of your app customers and provides their satisfaction with mobile analytics.

  • Provides metrics to crunch data for a business development model.

  • Flurry has been a mobile analytics company for over four years. It offers free services with no data limitations and it owns the mobile data it processes.

  • Keeps your fingers on the pulse of your business with Flurry mobile Analytics.

  • Helps you to know your customers better.

  • Helps you in customer acquisition management, ad attribution management, and targeting in nature and retargeting campaigns.

Organizations usually apply analytics to business data to develop better insight into business goals and targets. Specifically, areas covered in analytics include enterprise decision and strategy management, retail management and store analytics, web analytics, application promotion marketing, and sales analytics. All the analytics require extensive computation, powerful algorithms, and software used for analytics, which are the most common methods in today's computer science, statistics, and mathematics.

Tracking social productivity

Flurry provides you with social analytics that is very useful in current market. High engagement in social media has raised the requirements for social media marketing in organizations. Social media marketing has now become the key component for marketing. Analytics helps to determine the best social place to publicize the application and the location from where the application targets a large number of customers.

There is a list of social media giants in the market on which you should start a campaign to achieve significant results. A few of the supported platforms are Facebook, Instagram, Twitter, LinkedIn, Google +, Pinterest, and so on.

Flurry also provides you with monetary value conversions, which helps you to know which social site is more productive and which is less productive. These results will help you to customize your strategies accordingly and further strengthen your marketing in the required social media. Along with these updates, you can also focus on your weaknesses to overcome them and prove your business logic to strengthen the weak parts.

Determining unique visitors

It's sometimes important to know how many new visitors your application has to track its growth rate. It's even more helpful when we know the growth rate of the application for the time period chosen by us. Let's say that the result is 100; this means that 100 unique users visit your application everyday. This number is directly associated with your rank in search engines.

Determining user behavior

Determining user behavior is one of the most important analytics as users are the ones for whom the application is developed. Flurry Analytics provides you with a better way to understand users' behavior while they using the application, which helps you to identify which sections or screens of your application are frequently accessed by the users. This reflects user engagement level and the flow they are traversing. You will also get data that tells you the type of device that your users are using the application on, along with the time they spend using your application. This information is useful to improve marketing plans.

Monitoring the performance of your ads

We are now in the era of online media advertising, which can add success to your journey. The difficult part of the application process is reaching its customers. Many applications use ads as their main monetary source. Marketing helps you to reach and scale your user base. You will definitely capture a larger market than applications that are not marketed at all.

Ads performance is also dependent on an effective marketing campaign. Flurry provides you various advertising channels to track your ads performance. Advertising analytics help you to track all your possible advertising channels such as social ads, e-mails, and banner ads.

This feature of Flurry also helps you to track the AdWords campaign,by which a user can get a track of all the ads and the number of clicks on the ads, how many times the ads is been clicked by user and know which words or terms have better impact on users and which one is non-productive. In the AdWords marketing strategy, you can provide auto tagging to your advertising campaign, which helps you to analyze the impact of words and placement of ads on your landing page.

Flurry report data provides you with a better way of relaunching your marketing campaign with rich insight into your customers. You can pinpoint prospects with the major features and points of your products, thus allowing an effective target for your ads with proper synchronization of interests.

Determining your content sources

Flurry provides you with effective content sources to analyze the screen or section of the application that gets high-user traffic. This information can be used to determine which content is most valuable to users and to develop similar content to make the application preferable to the visitors' needs.

Evaluating traffic flow to your application

Flurry is useful in finding out information about the various sources of incoming traffic to your application to help determine your marketing strategy. You can also find popular links and keywords that are used by visitors while searching for specific products in search engines. This can be useful for maximizing the results of your e-mail marketing campaign for the success of your promotional efforts. Besides, this method of tracking users' activities on the application can be immensely useful to help you cater to the specific needs and requirements of your customers.

Using Analytics will help users to trace their activities and follow up, with their interests and visited channels on the application.

  • Tracking activity: Where do your visitors come from? This covers all the user activity, which includes the place from where your visitors are coming frequently along with their ways they are interacting with your application. It can be from social media, such as Twitter and LinkedIn, or through websites or blogs.

  • Track response: Are you pushing a message based on user interest and the number of visits you are getting from your message? Are your messages interesting enough and getting user attention? After launching a message on your application, how long is it staying on the application? Is your message informative enough? Count the number of times a user comes back to your application. Count the number of the people who get into your sales funnel. Are such people buying your services and have you got the sales? This includes the tracking of the user's response on your ads, and your application. This also includes the response from the user about your messages that you are pushing in your application. This section tracks the way user interacts with your messages.

  • Gather your users' demographics: You can get the age, gender, and location of your users.

  • Tracking user location when they interacted with the application: It should be as precise as possible, such as time when they interacted with your application, which day of the week they interacted, the day of the month they interacted, most visited user location while interaction, and the type of device used for interaction.

  • Tracking marketing campaign progress using split testing: You can track which marketing campaign provides the best results and which campaign provides the most conversions and sales.

  • Pointing out ineffective campaigns: Either update and improve the campaign or remove it.


Setting up an account on Flurry Analytics

Flurry provides you with the analytics features listed earlier. To get started with Flurry Analytics, you need to set up your application on Flurry. The following steps will help you to create and set up your application on Flurry.com:

  1. Set up an account at Flurry.com by signing up. Follow the steps listed on the website to do so.

  2. After signing up, create and set up your application on Flurry as shown in the following screenshot:

  3. Select iPhone or iPad as your application type and pick an application name and category for the application as shown in the following screenshot:

  4. Here you go! You have created the application successfully in Flurry.

  5. After registering successfully, you will get a unique application key, which we will use to track the application further in the project.

  6. Download the latest Flurry SDK from the link provided after creating the application on Flurry, as shown in the following screenshot:


Integrating the library with your project

Click on the download button to download the Flurry SDK for an iPhone. You will get the following files after extracting the downloaded zipped file:

  • ProjectApiKey.txt: This file holds the name of your project and your project's API key

  • Analytics-README.pdf: This file contains all the instructions to use Flurry

  • FlurryAnalytics/FlurryAnalytics.h: This is a header file that contains all the methods that are required for Flurry integration

  • FlurryAnalytics/libFlurryAnalytics.a: This is the required library that contains the files related to Flurry's collection along with its reporting code

Carry out the following steps to add the Flurry SDK to your project:

  1. Launch the finder and drag the Flurry/ folder in your Project file folder. (Note that in case you are upgrading the Flurry SDK, make sure that you remove the existing Flurry folder from the project).

  2. Now open your project and add the Flurry files by navigating to File | Add Files to <YOUR_PROJECT> to see the following screen:

  3. After adding Flurry, add the SystemConfiguration.framework file in your application. This framework is required for Reachability functions to manage your network-related operations efficiently.


Setting up basic code

To set up Flurry, open your Application Delegate file and import Flurry on top, exactly where you imported all the other header files. Then, inside your applicationDidFinishLaunching: method, call [Flurry startSession:@"YOUR_API_KEY"]; with the following code:

#import "Flurry.h"
- (void)applicationDidFinishLaunching:(UIApplication *)application { 
[Flurry startSession:@"YOUR_API_KEY"];
//your code


Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

That's it! This is all you need to configure to start receiving the basic updates and metric analytics from Flurry. The basic metrics provide you with all the items under the Usage, Audience, and Technical sections.

This includes tracking all the basic items such as the application's Usage, Audience, and Technical sections in the Flurry portal.

The previous code will allow you to access features that are explained in the following sections.


A session can be described as an end user's one-time use of the application. This tracking starts at the application launch and ends when the user forces a close or terminates the application. Flurry allows users to specify the session's start and stop times; however, it depends on the platform. Note that the session does not depend on the number of screens viewed in the application and the amount of time the application is used.

In case your users are using application in the offline mode or when they are offline, Flurry stores the data locally and pushes the data to Flurry the next time your application is open in the online mode. This is so that you do not lose any data.

Active Users

Active Users is defined as the number of users having at least one session in a given period of time, that is, days, weeks, and months. In case a user launches your application more than once, it will still be counted only once. So, for any given time interval, you will have a unique count of the active users.

New Users

When a user first begins to use your application, Flurry refers to this user as a New User. Flurry provides a unique device ID to identify the new users, and these vary depending on the platform. Flurry recognizes new users when they initiate or start using the application. If the user has downloaded the application and has not launched it, it will not be counted. If a user deletes the application and reinstalls it on the same device or upgrades the device to a new version, it will not be re-counted. However, if a user downloads the application to a new device, it will be counted again as the new user count mainly depends on the device identifier.

Session Length

This is defined as the length or duration of the total session. It's basically the time between the application's start event and end event, which may vary based on the platform used. In some cases, such as when the application crashes, we have the start time of the application event, but there is no end time recorded. Hence, the session length is unknown. Flurry does not include instances for the calculation of average and median session length. Session length can vary depending on the way you integrate the SDK in your application project and whether you follow the recommended practices.

Frequency of Use

The number of sessions with respect to unique users over a given period of time is called Frequency of Use. Flurry tracks the frequency of use of your application on an individual user basis, so that the aggregated metrics will display the real average value and their estimates.


Flurry has vast amounts of data. So to ease the reading of useful information, Flurry leverages its data to provide readers with useful benchmarks. You can track your application performance and results by comparing them against category benchmarks on the selected metrics.

Page Views

This section allows you to access the number of the application's discrete sections or screens accessed by users. You can customize and decide the way you want to define page views. We will learn about Page Views in more detail in the upcoming chapters. You can track your screens and check which pages are accessed the most.

User Paths

Flurry allows you to track the paths that users take while navigating through your application. You can track customized events and the user path. Flurry accumulates this data automatically, calculates the final figures, and provides valuable insights that can help you to check the pathways followed by the user while using your application.

Lifecycle Metrics

You can track and access groups and users, and based on the date, you can even measure their retention rates. This includes new users of the application along with the page views.

User Retention

This section crunches your data and provides you with data on the users filtered by cohort. User Retention depends on when the user has launched the application's log with that. It will measure whether they are still in the active user category of the application. This metric contains the retained user that had at least one session with your application in the past seven days from the current date.

Version Adoption

This section helps you to track the number of users that are ported to the new version of the application. It also gives you details about the evolution in usage over a period of time as the user upgrades the software version.

Demographic Estimates

This section details the gender and age of the users using your application. You can check which age group and users are your prominent customers. However, to read this in detail, you need to provide these details to Flurry using its SDK. In case you do not provide such information, Flurry will use its own algorithms to estimate these data sets.

Time of Day Reporting

It tracks the time of the day when your application was used or viewed according to its local time. Hourly reporting allows you to see the usage of your application on an hour-by-hour basis. It provides detailed and important control over the user activity.

Geographic Usage

This section helps you to get reports based on a user's geographical location and further break it down by geographical area in terms of average active users, total sessions, percentage of users retained, and the median session length.

Language Metrics

This section helps you to fetch the number of new users, active users, sessions, and the number of retained users filtered by users, device language. You can get good insight into your application's users based on geographical locations.


You can read data regarding the device on which the application is used the most. Flurry provides you with the data count for the sessions opened by any specific device type. The data received by Flurry is provided by the manufacturer of the device, but sometimes it is not available in few of the devices. Not all the devices support data sharing on Flurry.


This section provides you with the tracked reports of the number of sessions that are opened by users using specific carriers. You can filter the graphs and charts based on the specific carrier's data to get a report on the carrier your application is used on the most. Note that not all sessions and carriers can provide such data.

Firmware Versions

Flurry generates data based on the number of sessions generated by the device's firmware. You access the application's usability based on specific firmware. Note that not all firmware provides such a feature for generating a session's data.

Logging Events

Flurry allows you to log custom events to track user-specific actions made in your application, for example, browsing products, playing the radio, social media sharing, and so on. These activities help you to understand how users interact with your application. The following points will help you to capture the information.


Events can be divided into two levels based on their architecture. The top level in this hierarchy is the specific action, in our case, the playing of music using your application. Let's name this event as Playing Music. By tracking such events, you can measure the number of users who read articles from your application along with the frequency of the articles that are read from your application, and so on.

You can use the following code to track such custom events in your application:

[Flurry logEvent:@"Article_Read"];

Flurry allows you to track a maximum of 300 events for each of your applications. After adding such custom events in your application, Flurry will automatically create user paths based on the event data so you can access the path that the user is following while using your application. You can also create funnels and user segments to track the path followed by a user while using the application.

Event Parameter

Event Parameter is the next stage of the Event structure that we saw in previous topics. Flurry allows you to pass custom event parameters that define the characteristics of the event. For example, a characteristic of the Playing Music event is the artist of the album. Characteristics of the user can be their status, such as registered users, guest users, or anonymous users. These parameters will help you to easily filter the graphs and distribution data for the event based on its characteristics. This will help you to know which song is the most played song or which album has has the maximum listeners. This can also provide you with the statistical percentage, for example, you can track the percentage of users that are playing a particular album;

NSDictionary *artistParams = [NSDictionary dictionaryWithObjectsAndKeys:@"John Mayer", @"Artist", // Capture artist [email protected]"Registered", @"User_Status", // Capture user statusnil];

[Flurry logEvent:@"Artist_Played" withParameters:artistParams];

Your event can catch a maximum of 10 parameters, and each parameter can hold an infinite number of values that are associated with it. For instance, for our Artist parameters, there can be hundreds of possible values for artists who have released albums. You can track all the artists using this one parameter on Flurry.

Event Duration

Flurry provides a way to track your events with time duration and metric access to the average overall length of the event filtered by sessions and users, which are automatically recorded by Flurry based on the usage of the application. To capture the event duration along with the event and associated characteristic parameters, you can use the following log pattern of logging the event duration along with the event parameters:

NSDictionary *artistParams = [NSDictionary dictionaryWithObjectsAndKeys:@"John Mayer", @"Artist", // Capture artist [email protected]"Registered", @"User_Status", // Capture user statusnil];

[Flurry logEvent:@"Artist_Played" withParameters:artistParams timed:YES];

// In a callback of the function which captures user navigation away from artist played.
[Flurry endTimedEvent:@"Artist_Played" withParameters:nil];
// You can pass in additional
//params or update existing ones here as well


Flurry allows you to create segments as well. The concept behind segmentation is to divide your users into groups to assess their overall collective behavior. Similarly, you can also get the group's users, which are filtered based on the set of actions they take or the pathways they followed to use the application. This method will help you to create corresponding events to track such users. In the preceding example we discussed, you can browse through the Flurry portal and create a segment or a group to access only the metrics of admin-based users who are playing songs from John Mayer's album. Segments prove to be a powerful tool to locate and rapidly understand the most engaged and valuable users of the application. You will learn segmentation in more detail in the upcoming chapters.



In this chapter, we explored the requirements of using analytics in mobile application development and Flurry services to track applications and user behavior. We started by exploring the basic needs of analytics in our mobile application. Then, we learned to set up the application on the Flurry portal. Next, we learned the integration of Flurry in our iOS project along with basic setup code. Finally, we saw how to track application events using various methods.

In the next chapter, we will learn about tracking our application in more detail to gather useful data from user activities.

About the Author

  • Bhanu Birani

    Bhanu Birani has more than 7 years of experience in the software industry. He is passionate about architecting, designing, and developing complicated applications. He specializes in creating web, backend as a service, and mobile products suitable for B2B and B2C context. He has expertise in end to end development to create innovative and engaging applications for mobile devices.

    After years of programming experience in different programming languages, he started developing applications for iOS devices. He started software development around the same time as his graduation and was really interested in learning about the new technologies emerging in the market. He then joined a game development company. After contributing to the gaming domain, he started working on content-based applications and radio applications. He also contributed to hyperlocal geo-targeting using BLE (iBeacons). Over the years, he has gained experience in all phases of software development as requirement gathering, feasibility analysis, architecture design, coding and debugging, quality improvement, deployment, and maintenance.

    Browse publications by this author
Book Title
Unlock this full book FREE 10 day trial
Start Free Trial