2

Possible Duplicate:
How to use Google Analytics with Phonegap without a plugin?

I want to use something like Phonegap to write an app for Android, iOS and Blackberry, as well as generate free analytics data such as session length and how often buttons are pressed. I'd like to be able to do all this in JavaScript if possible but I cannot find any analytics provider that allows this.

The only option I can see is to use Flurry which supports all those OSs. This would require some native code for each platform and a way to call this code from JavaScript. I'd rather avoid having to write native code if possible.

I tried using the web version of Google Analytics (e.g. adding JavaScript snippets to my app code) but this produces the logging error

http://www.google-analytics.com/u/ga_debug.js: Line 18 : Local file. Aborting hit.

which I assume means Google Analytics only works on actual web pages. Google Analytics for apps isn't available for Blackberry either.

Community
  • 1
  • 1
Bob Smith
  • 260
  • 3
  • 9
  • 2
    This is not a duplicate at all. My question is not specific to using Google Analytics but asking to know what analytics solutions there are. Secondly, the answer to the linked question is a hack to me that goes around Google's API; what guarantees are there that Google blocks this hack? – Bob Smith Oct 18 '12 at 09:15

1 Answers1

3

You can integrate your apps with Flurry HTML 5 SDK. This way you can write HTML 5 apps using JavaScript. Once done, you can port it to the native platform. Please note that Flurry HTML 5 SDK is currently in beta, and can be enabled for you once you register on Flurry. (Full disclosure: I work in the Support team at Flurry)

Aman Bansal
  • 1,581
  • 8
  • 14
  • I registered on Flurry half an hour ago and was trying to find my way to html5 (or js) sdk and I saw your answer :) can you please give a link to html5 sdk? – mentat Oct 17 '12 at 13:02
  • Sure! Please send us a mail at support@flurry.com with your details, and we'll do it for you :) – Aman Bansal Oct 17 '12 at 13:35
  • I did a zendesk support request on it, thx & cheers. – mentat Oct 17 '12 at 13:42
  • Cool! And this will definitely work with PhoneGap apps? What if the user is offline for some time while the app is being used? Are stats sent later when there is an internet connection? – Bob Smith Oct 17 '12 at 13:45
  • Also, how stable is it? Would it be risky to use such a beta in a commerical app? – Bob Smith Oct 17 '12 at 14:53