This is a Titanium module for Flurry Analytics.There is an iOS and Android version, and both are included.
Version 1.0.1 of TiFlurry integrates:
Unzip the archive and copy the ZIP files to the Titanium folder.
On Mac, this is usually ~/Library/Application Support/Titanium.
On Windows, the path varies by OS version.
Full instructions are here.
Add one or both of the module descriptors to the modules section in tiapp.xml:
<modules> ... <module platform="android" version="1.0.1">com.sofisoftwarellc.tiflurry</module> <module platform="iphone" version="1.0.1">com.sofisoftwarellc.tiflurry</module> ... </modules>
To access this module from JavaScript, you use the require statement:
var tiflurry = require("com.sofisoftwarellc.tiflurry");
The tiflurry variable becomes a reference to the Module object, and will be used to invoke further API calls.
The API is essentially the same as the Flurry API, except in JS format. However, the Android module implements a few extra methods to make the API uniform across iOS and Android.
These calls must be made before calling startSession.
Example:
tiflurry.setContinueSessionMillis(5000);
Example:
tiflurry.logUncaughtExceptions(true);
Example:
tiflurry.startSession("Your Flurry API Key");
These have no effect on Android.
tiflurry.setSessionReportsOnCloseEnabled(true); tiflurry.setSessionReportsOnPauseEnabled(true);
This has no effect on Android.
tiflurry.setSecureTransportEnabled(true);
tiflurry.logEvent("myEvent"); tiflurry.logEvent('myEvent', {key: 'value'});
These are different flavors of events. The second of these specifies event parameters that are shown on the Flurry dashboard.
A timed event records the length of time between the logEvent and the endTimedEvent. The third parameter "true" to logEvent signals the start of a timed event. The name of the event must be the same in endTimedEvent.
tiflurry.logEvent('myTimedEvent', {key: 'value'}, true); // for timed event tiflurry.endTimedEvent('myTimedEvent');
tiflurry.logPageView();
tiflurry.logError("error id", "message");
These are all optional
tiflurry.setUserID("123"); tiflurry.setAge(19); tiflurry.setGender("f"); tiflurry.setGender("m");
tiflurry.setLogEnabled(false);
tiflurry.onEndSession();
Copyright (C) 2012 Sofi Software LLC
Flurry is Copyright(c) 2012 by Flurry, Inc.
Usage of this module is subject to the Terms of Service agreement of Flurry, Inc.