Follow

Configuring Analytics with Flurry

Pugpig comes with support for using Flurry Analytics. You can use this feature to track the usage of your app. If you don't already have a Flurry account, see Set Up A Flurry Account

Configuring analytics

Download the latest SDK from Flurry. Login to Flurry and access this in the 'Applications' tab, 'Download SDK' button. Please note which version of Xcode the SDK works with. If you need an SDK for an older Xcode version please contact Flurry support.

This archive should contain these files:

    • ProjectApiKey.txt : This file contains the name of your project and your project's API key.
    • Analytics-README.pdf : This file containing instructions on how to use Flurry Analytics.
    • FlurryAnalytics/FlurryAnalytics.h : The required header file header file containing methods for Flurry Analytics.
    • FlurryAnalytics/libFlurryAnalytics.a : The required library containing Flurry's collection and reporting code.

There are additional folders for use with Flurry AppCircle. These optional libraries provide alternate streams of revenue for your apps. If you would like to use Flurry AppCircle please refer to AppCircle-README.pdf.

Integration

  1. In the finder, drag FlurryAnalytics/ into project's file folder. (NOTE: If you are upgrading the Flurry iOS SDK, be sure to remove any existing Flurry library folders from your project's file folder before proceeding.)
  2. Now add it to your project: File > Add Files to “Your Project” … > FlurryAnalytics
    1. Destination: select Copy items into destination group’s folder (if needed)
    2. Folders: Choose 'Create groups for any added folders'
    3. Add to targets: select all targets that the lib will be used for
  3. In your Application Delegate:

Import FlurryAnalytics

#import "FlurryAnalytics.h"

Inside “application didFinishLaunchingWithOptions:” add:

[FlurryAnalytics startSession:@"YOUR_API_KEY"];

This is where you paste your app unique API key.

Information Needed By the Server

All of the analytics happens on the client. The server does not need to be aware of it.

Exception Handling

We recommend adding an uncaught exception listener to your application (if you don't already have one) and use logError to record any application crashes. Create the following: - In your Application Delegate: Add an uncaught exception listener

void uncaughtExceptionHandler(NSException *exception) {
[FlurryAnalytics logError:@"Uncaught" message:@"Crash!" exception:exception];
} 

You then need to register this function as an uncaught exception listener as follows

- (void)applicationDidFinishLaunching:(UIApplication *)application { 
NSSetUncaughtExceptionHandler(&uncaughtExceptionHandler); 
[FlurryAnalytics startSession:@"YOUR_API_KEY"];
....
}

Note that you can name the function whatever you'd like and record whatever error information you'd like in the error name and event fields.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk