mobile-statistic

Mobile Analytics: Integrating Flurry Analytics into iOS Application

mobile-statistic

Flurry Analytics helps to follow user behavior under the app, it’s nice to have when it’s critical to know more about most popular user transitions and steps under mobile app.  So here we are happy to share source code on how to add Flurry analytics behind the element (button). When user enters the iOS app and clicks the button, this info is collected under Flurry backend and available for business owners. So let’s start:

Step 1 – you need to create application in flurry, if you don’t have an account, you have to register, if you have an account, then go to dev.flurry.com.

1. Open Applications tab and click on Add a New Application:

01

 

2.  Select platform that you need – our example will be created on iphone:

2

3. Enter a name for your application and select the category that best fits your application:

4

 

4. Now application is created, remember your key:

 

5 (finish)

 

Step 2 – Download the Flurry iOS SDK here. Or you may download Flurry SDK right after finished adding Flurry app on site.

 

Step 3 – Add Flurry SDK and other libs to the project.

Add the following frameworks to your app’s target in Xcode:

  • libFlurry
  • libFlurryAds
  • Security.framework
  • SystemConfiguration.framework

01

 

 

Step 4 – Add project’s code modification.

AppDelegate.h

AppDelegate.m

 

Step 5 – Add the code for counting how many times user clicks on the button

ViewController.h

ViewController.m
For counting how many times user clicks on the button
add to your event-handling method code (as example i use method-handler “BtnClick” in my example app)

Note: Run app on real device, not on iOS Simulator.

 

Step 6 – Run app and click the button in UI.

Application will look like this:

01

Example how analitics data looks on Flurry account:

onKwsjK

Note: Information on Flurry server updates 2-3 times per day, so if statistic info doesn’t update immediately, it’s ok, just need to wait.

 

Source code. Source code is available from github.