Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to integrate Flurry analytics into iOS app

Tags:

ios

flurry

I have Flurry.h and libFlurry.a added to my project from the Flurry 4.1 SDK. In my app delegate I have the following in didFinishLaunchingWithOptions.

[Flurry startSession:@"[apikey]"];

I've also added [Flurry logEvent:@"callAPIPath"]; in the codebase such that it will get called 5 or 6 times in a typical session. However, I don't see any data on my Flurry dashboard. I'm testing in the iOS simulator and click the home button to quit the app since that was suggested in https://stackoverflow.com/a/12054855/99683. I've given it over 24 hours to process but still no data.

I don't see any obvious problems in the debug output.

2013-01-29 16:04:04.579 TumTiki[7578:c07] Flurry: startSession called for the first time
2013-01-29 16:04:04.580 TumTiki[7578:c07] Flurry: Start session called with apiKey[APIKEY]
2013-01-29 16:04:04.580 TumTiki[7578:c07] Flurry: Trim white space and use apiKey[APIKEY]
2013-01-29 16:04:04.581 TumTiki[7578:c07] initial network status [1] ========= 
2013-01-29 16:04:04.583 TumTiki[7578:c07] FlurrySession: Add session with startTime[2013-01-29 23:04:37 +0000] to saved sessions
2013-01-29 16:04:04.587 TumTiki[7578:c07] FlurrySession: Add crashed former session
2013-01-29 16:04:04.589 TumTiki[7578:c07] FlurrySession: Initialized session from scratch with startTime[2013-01-30 00:04:04 +0000]
2013-01-29 16:04:04.590 TumTiki[7578:c07] FlurrySession: Created active session with API[APIKEY]
2013-01-29 16:04:04.590 TumTiki[7578:c07] FlurrySession: Session reports on close enabled[1]
2013-01-29 16:04:04.590 TumTiki[7578:c07] FlurrySession: Session reports on pause enabled[1]
2013-01-29 16:04:04.591 TumTiki[7578:c07] FlurrySession: Event logging enabled[1]
2013-01-29 16:04:04.591 TumTiki[7578:c07] FlurrySession: Sending sessions to server withTimeout[0]
2013-01-29 16:04:04.593 TumTiki[7578:c07] FlurrySession: Initial timestamp[2013-01-29 18:12:18 +0000] from saved source
2013-01-29 16:04:04.594 TumTiki[7578:c07] Flurry: Finish starting session with apiKey[APIKEY]
2013-01-29 16:04:04.603 TumTiki[7578:c07] FlurrySession: Recording event eventName[callAPIPath] with parameters[(null)]
2013-01-29 16:04:04.603 TumTiki[7578:c07] FlurrySession: Event count for eventName[callAPIPath] updated to count[1]
2013-01-29 16:04:04.603 TumTiki[7578:c07] FlurrySession: Event log for eventName[callAPIPath] updated
2013-01-29 16:04:04.604 TumTiki[7578:c07] FlurrySession: Recording event eventName[callAPIPath] with parameters[(null)] complete
2013-01-29 16:04:04.660 TumTiki[7578:c07] FlurrySession: dealloc session
2013-01-29 16:04:04.687 TumTiki[7578:c07] updated network status [1] ======== 
2013-01-29 16:04:04.786 TumTiki[7578:c07] Flurry: HTTP connection delegate received response[<NSHTTPURLResponse: 0xa4b82e0>]
2013-01-29 16:04:04.787 TumTiki[7578:c07] FlurrySession: async http response code: 200
2013-01-29 16:04:04.788 TumTiki[7578:c07] FlurrySession: application sent session[1]
2013-01-29 16:04:04.788 TumTiki[7578:c07] FlurrySession: Sent 1 session(s).

[pressed home button]

2013-01-29 16:07:08.166 TumTiki[7578:c07] FlurrySession: Pause session with pauseTime[2013-01-30 00:07:08 +0000]
2013-01-29 16:07:08.166 TumTiki[7578:c07] FlurrySession: Ending session with endTime[2013-01-30 00:07:08 +0000]
2013-01-29 16:07:08.167 TumTiki[7578:c07] FlurrySession: ending all unterminated timed events with _endTime[2013-01-30 00:07:08 +0000]...
2013-01-29 16:07:08.167 TumTiki[7578:c07] FlurrySession: ...finished ending un-ended timed events.
2013-01-29 16:07:08.168 TumTiki[7578:c07] FlurrySession: Ending session with endTime[2013-01-30 00:07:08 +0000] complete
2013-01-29 16:07:08.168 TumTiki[7578:c07] Flurry: start background task
2013-01-29 16:07:08.169 TumTiki[7578:c07] FlurrySession: Sending sessions to server withTimeout[1]
2013-01-29 16:07:08.171 TumTiki[7578:c07] FlurrySession: Initial timestamp[2013-01-29 18:12:18 +0000] from saved source
2013-01-29 16:07:08.387 TumTiki[7578:c07] Flurry: HTTP connection delegate received response[<NSHTTPURLResponse: 0x1127cf30>]
2013-01-29 16:07:08.389 TumTiki[7578:c07] FlurrySession: async http response code: 200
2013-01-29 16:07:08.390 TumTiki[7578:c07] Flurry: stop background task

I'm using the API Key provided by Flurry which is a 20 character string. Is there a different application key I should be using instead? I'm doing something wrong here but haven't been able to figure it out yet.

like image 364
Michael Luton Avatar asked Jan 30 '13 00:01

Michael Luton


People also ask

What is flurry iOS SDK?

Flurry distributes the iOS SDKs via CocoaPods. CocoaPods is used to install and manage dependencies in existing Xcode projects.

What is Flurry Analytics?

Flurry Analytics features and capabilities, include: Flurry Push enables app developers to send targeted messages to re-engage and retain users across Android and iOS. Mobile developers can leverage the power of push notifications to effectively grow usage and revenue – all for free, all now available in Flurry.


3 Answers

Turns out I was using the wrong key. I needed the application-specific key which can be found with the Manage menu item on the application's dashboard.

like image 188
Michael Luton Avatar answered Oct 04 '22 15:10

Michael Luton


The debug output suggests that the sessions are getting sent across to Flurry. It would be great if you can send over your snippet of integration and API key to [email protected], and let Support take a look.

Full disclosure: I work in the Support team at Flurry

like image 20
Aman Bansal Avatar answered Oct 04 '22 15:10

Aman Bansal


20 character string is correct. Maybe a suggestion: Try in a device.

Try adding the FlurryAds.h,FlurryAdDelegate.h and libFlurryAds.a as well. These are besides the Flurry.h and libFlurry.a

like image 25
lakshmen Avatar answered Oct 04 '22 16:10

lakshmen