flurry--statistics and analysis of user behavior

Source: Internet
Author: User

Brief introduction

Flurry is a company that provides data statistics and analysis specifically for mobile applications. Their data statistics Analysis SDK supports platforms including iphone, IPad, Android, Windows Phone, Java me and BlackBerry. Companies using flurry services include more than 110,000 companies, including ebay, Yahoo, Hulu and Skype, and more than 360,000 applications are involved.

Using the analysis platform provided by flurry, we can easily automatically count the application usage, for example:

    1. Number of logged-in users per day (weekly or monthly), app usage
    2. Number of new users per day (weekly or monthly), number of active users
    3. Distribution of the location, age and gender of the user

Flurry can also automatically calculate the classification of mobile devices, for example:

    1. Session scale using 3g,wifi
    2. Scale using iOS system versions (e.g. iOS6.0, iOS7.0, etc.)
    3. Proportion of devices using iOS (e.g. iPhone4, iPhone5, etc.)

In addition to the above-described automatic statistics project, the Flurry SDK also provides statistical related APIs, so that we can focus on the characteristics of their products, to do targeted statistics. For example, statistics the number of times a button in the app is pressed, or the average response time of a network request.

Flurry Basic use register and download the corresponding SDK

Before using flurry, you need to go to the official website http://www.flurry.com/Register your account. Then log in to the flurry backend and select to "Applications" -> “Add a New Application" add an application that requires statistical analysis. As shown in the following:

Then, after the next screen, choose the iphone or ipad app based on your app type. As shown in the following:

Next, fill in the name and category of the app (the name is only used for the flurry background and your other apps to differentiate, don't need to be the same as the app's real name), then click "Create App" as follows:

In this case, we have successfully created a new application statistics and analysis project in the background. Click on "Download" to download the SDK that needs to be integrated in the app. The key in the hint 2 in: X28BBKTNZ9H3VYTBDBG3 is the ID that we use to identify our app when we integrate.

Integration SDK

We will unzip the downloaded SDK and see the file list below. The most important files for us in the list are the files and files in the flurry directory flurry.h libFlurry_4.3.0.a . These 2 files need to be copied to Xcode's project.

The ProjectApiKey.txt application ID that we created earlier is recorded in the file and needs to be used in the code to invoke the SDK at the beginning of the call.

Then we open the Xcode project, drag the downloaded flurry directory to the project, and add it to the project's. pch file #import "Flurry.h" , as shown in:

We then Link Binary With Libraries add the following 2 dependent frameworks in:

    • Security.framework
    • Systemconfiguration.framework.

Next we open AppDelegate.m , in the - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions method, add the code [Flurry startSession:@"X28BBKTNZ9H3VYTBDBG3"]; , as shown in:

In this way, the simplest integration of the flurry is completed. With just a few steps above, flurry can help us to complete the statistics and analysis of the basic usage data of the application.

Custom statistics Items

Flurry provides logEvent functions for implementing custom statistical items. By default, the function accepts a parameter that represents the name of the current statistic.

For example, we have 2 buttons in our interface, and we want to count the number of clicks they have on each user, which can be implemented in the following code. In this code, we define 2 custom statistical items, each with a name First Button Pressed Second Button Pressed .

12345678      
-(Ibaction)firstbuttonpressed: (id) { [flurry logevent:< Span class= "s" >@ "first button Pressed" ; }- Span class= "P" > (ibaction) secondbuttonpressed: ( id) sender { [flurry logevent:@ "Second button Pressed" ; }             /span>                

logEventFunctions also support the addition of various parameters for more granular statistics, for example, we want to count the user on the same page, click the number of different buttons to distribute, to see which buttons are more commonly used, the statistical code can be implemented as follows:

123456789        
-(Ibaction)Firstbuttonpressed:(Id)Sender{ [FlurryLogEvent:@ "button Pressed" Withparameters:@{@ "target" : @ "first" }];}-  (ibactionsecondbuttonpressed:  (id) sender {  [flurry logevent:@ "button Pressed " withparameters:@{ @ "target" : @ "second" }];                /span>                

The

logEvent function also supports statistical time, which is often used to count the time spent on a complex network operation or the user's response times for certain interfaces. For example, if we want to count the time that a user is stuck in a cue screen, you can do so with the following code:

1234567891011121314151617181920212223242526< Span class= "Line-number" >27             
//Firstviewcontroller.mFlurryusagesample//Created by Tangqiao on 13-10-25.Copyright (c) 2013 Tangqiao. All rights reserved.//#import "FirstViewController.h"#define Flurry_event_key @ "First View Controller"@implementationFirstviewcontroller-(void)Viewwillappear:(BOOL)Animated{ [SuperViewwillappear:Animated]; Start statistical time [FlurryLogEvent:Flurry_event_keyTimedYES];}- (void viewwilldisappear: (bool) animated { [super viewwilldisappear:animated]; //End statistic time  [flurry  Endtimedevent:flurry_event_key withparameters:nil ; } @end     
View Statistical results

After completing the code for the custom statistics above, we can see the corresponding statistics from the columns in the background after the application is published Events . As shown in the following:

Statistics Crashlog

Flurry starts with 4.2.3 and supports Crashlog statistics for applications. Just in the AppDelegate.m file, before calling the startSession method, the call setCrashReportingEnabled:YES can be:

12
[Flurry setCrashReportingEnabled:YES];[Flurry startSession:@"YOUR_API_KEY"];

Note here that you must call setcrashreportingenabled before startsession, otherwise you will not be able to log crashlog information! Remember!!

You can then Errors get the app's Crashlog information from the items in the background management interface.

Comparison with other statistical analysis platforms

Compared to the well-known statistical tools of Google Analytics, Flurry's advantages are:

    1. Flurry has made a number of optimizations specifically for mobile, such as a small amount of statistical traffic.
    2. Flurry not be the problem of the wall.

Flurry Disadvantages are:

    1. Google Analytics has a relatively powerful statistical function.
    2. Google Analytics can be integrated with statistical data from the Web version.

Compared with the domestic analysis platform, Flurry's advantages are:

    1. Applications using flurry are relatively more. According to Flurry and AU's official data, there are more than 360,000 applications using Flurry1, with more than 180,000 applications using the Friends League 2.
    2. Flurry is a foreign company, maintaining independence and focus, data security is higher; Au has now been acquired by Ali, when the user's application involves the domain and Ali have similar or coincident, then the statistical data has potential security issues.

The disadvantages of flurry are:

    1. Friends League is a Chinese company, so it is very friendly to the domestic developers, the relevant documents or interface is in Chinese. Flurry does not provide a background management interface or related documentation in Chinese.
    2. Flurry servers in foreign countries, in response to the speed should be relatively slower than the Allies. But in the test, the flurry server can guarantee the response time of about 500ms or better.
Summarize

This article introduces the basic functions of flurry and how to do custom statistics, and finally compares with other similar tools in the industry. I also organized the relevant sample code on GitHub, the address is: https://github.com/tangqiaoboy/FlurryUsageSample, I would like this article can help you more convenient to do statistical and analytical work of the application.

Posted by Tang Qiao Nov 14th, IOS

flurry--statistics and analysis of user behavior

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.