TiFlurry Module

Description

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:

Installation

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.

Usage

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.

Configuring the session

These calls must be made before calling startSession.

setContinueSessionMillis

Example:

	tiflurry.setContinueSessionMillis(5000);

logUncaughtExceptions

Example:

	tiflurry.logUncaughtExceptions(true);

startSession

Example:

	tiflurry.startSession("Your Flurry API Key");

Session reports

These have no effect on Android.

	tiflurry.setSessionReportsOnCloseEnabled(true);
   tiflurry.setSessionReportsOnPauseEnabled(true);

Https

This has no effect on Android.

	tiflurry.setSecureTransportEnabled(true);

Flurry Analytics

logEvent

    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.

Timed events

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');

logPageView

    tiflurry.logPageView();

logError

    tiflurry.logError("error id", "message");

Collecting information about the user

These are all optional

    tiflurry.setUserID("123");
    tiflurry.setAge(19);
    tiflurry.setGender("f");
    tiflurry.setGender("m");

Enabling or disabling logging

    tiflurry.setLogEnabled(false);

Ending the Flurry Analytics Session

   tiflurry.onEndSession();

Release notes

TiFlurry 1.0.1

TiFlurry 1.0

Notices

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.