Flurry SDK is a native extension to use the services of Flurry analytics. Using its API a developer is able to get some insights about how the app is used by creating events, which are unique actions that users complete in the app. Events are easy to set-up and it’s possible to track anything relevant to the app context such as when a consumer makes a purchase, completes a level or uses a key feature. Additionally parameters can be added to events for much finer detail.

The extension was created to be as identical as possible to how the Flurry SDK works. A set of easy to use methods is available for use, such as a methods to start/end a user session, log an event (using a single string or an array of properties) or report errors. The SDK also has a set of properties that can be used to make the report more specific, e.g. inform the user gender, id or age.

Sample

// initialize the extension
var _ex:Flurry = new Flurry();
_ex.flurryAgent("flurryApiKeyHere", true);
// if you want to receive location information,
// you should set this property to 'true' after starting your session with flurry
_ex.reportLocation = true;
// to know about the user's age
_ex.age = 23;
// for tracking your users, you may have specified a user id for them,
// if so, you may send this ID using this property
_ex.userId = "AvFgasd192168247612";
// use this property to specify if your user is male 'true' or female 'false'
_ex.gender = true;
// set this property to 'true' if you want your app to connect to flurry
// using https protocol
_ex.useHttps = true;
// set the timeout for expiring a Flurry session
_ex.continueSessionTime = 10;
// use this property to specify a version name for your app
_ex.versionName = "myApp";
// set this property to 'true' to enable or 'false' to disable the
// internal logging for the Flurry SDK
_ex.logEnabled = true;
// set the log level of the internal Flurry SDK logging.
_ex.logLevel = 2;
// use this property to specify if you want the event logging
// to be active or not
_ex.setLogEvent = true;
// after setting the properties, use this method to start your
// flurry session
_ex.startSession();
// when you are finished with your flurry session terminate it
// with this method
_ex.endSession();
// use this property to know about the current flurry session
trace("status : " + _ex.status);
// you may use flurry to log errors, use this method and pass
// your Error ID and message
_ex.onError("ErrorID", "Error msg");
// use this method to send an Event ID
_ex.logEvent("eventID");
// end a timed event.
_ex.endTimedEvent("eventID");
// you may also send log events in form of an array of objects like below.
var obj1:Object = {event1:"value1"};
var obj2:Object = {event2:"value2"};
var obj3:Object = {event3:"value3"};
var logEvent:Array = [obj1,obj2,obj3];
_ex.logEventArray("EventID", logEvent);
// Use this method whenever you want to know your app page views.
_ex.onPageView();
// use this property to know the flurry SDK version used in this extension.
trace("flurrySdkVersion >> " + _ex.flurrySdkVersion);