Bachalo
Bachalo

Reputation: 7219

AIR for iOS and Google analytics

There seems to be conflicting information on whether google analytics will work with an AIR for iOS application Have developed a kiosk based AIR for iOS game and need tracking, specifically image uploads to Facebook.

There is a thread here Does Google Analytics Tracking for Flash works in packaged air application for IOS?

which points to both the old gaforflash sec http://code.google.com/p/gaforflash/downloads/list

and also this native extension https://github.com/alebianco/ANE-Google-Analytics

which is a lot more recent. But there is a warning on the latter

'The new "app" profile on the Google Analytics dashboard won't accept any data from the trackers (1.5 and 1.5.1) currently used.'

Also there is a warning on the official Google developers page which I also assume hasn't been updated in many years

Note: Currently, Flash tracking is available for any Flash content embedded in a web page. Tracking of data sent from Adobe Air, Shockwave, or via the Flash IDE (e.g. using Test Movie) is not supported at this time.

https://developers.google.com/analytics/devguides/collection/other/flashTrackingIntro

So some confusion. Can anyone confirm whether the alebianco Native Extension will work properly?

Upvotes: 2

Views: 2132

Answers (2)

Qasim
Qasim

Reputation: 1580

Any info on whether the old GAForFlash component still works? I've been trying and so far, no dice.

I copied analytics_flash.swc to Flash CS6's components folder(and restarted the Flash IDE - it doesn't work if you don't restart), which got the GAFF component to show in the component panel. I've tried dragging the component on the stage, setting it's values in the properties panel, and then calling trackPageview:

testTracker.trackPageview("/testPage");

And the second thing I've tried so far is to instantiate the analytics plugin via code:

var GAtracker:AnalyticsTracker = new GATracker(this, GAid, "AS3", true);
GAtracker.trackPageview("/myTestPage");

In both these cases, I'd had visual-debugging turned on(by passing the 4th variable as true when instantiating via code, and via the property panel otherwise). And in the visual-debugger everything seemed alright, and I got "Gif Request #x sent" after each analytics call. But nothing showed in Google Analytics' online portal. While setting up analytics, I'd selected that the app was a "mobile app" rather than a "web-page", and it'd given me links to GA's droid/iOS SDK. GAForFlash's official documentation says it may not work with AIR apps, as mentioned above. But when I published it with an HTML wrapper Not sure if the problem is with my implementation, or with GAForFlash...

Upvotes: 0

alebianco
alebianco

Reputation: 2555

My extension (https://github.com/alebianco/ANE-Google-Analytics) has been updated a few months ago, it now supports the new app profiles gracefully :)

Upvotes: 7

Related Questions