There is library for counting page view on flash.
faforflash http://code.google.com/p/gaforflash/
The document said Air and standalone application are not supported.
But in the discussion of release 1.2, one project member said
faforflash http://code.google.com/p/gaforflash/
The document said Air and standalone application are not supported.
But in the discussion of release 1.2, one project member said
"So far gaforflash has already been used for AIR application, but on our side we didn't tested for it.".
So I checked whether I can count by using gaforflash or can't.
Environment
- Using version: gaforflash v1.0.1 (filename gaforflash-1.0.1.319.zip);
- Device iPad2 iOS4.3
- Flash CS5.5
- Air 2.6
SourceCode
import flash.display.SimpleButton;
import flash.events.MouseEvent;
import com.google.analytics.AnalyticsTracker;
import com.google.analytics.GATracker;
var gaupload_btn:SimpleButton;
var tracker:AnalyticsTracker = new GATracker( this, "UA******", "AS3", true );
gaupload_btn.addEventListener(MouseEvent.CLICK, loadclicked);
function loadclicked(e:MouseEvent):void{
tracker.trackPageview("/myGame1");
}
Result
I can count the query from iPad to Google Analytics.
Query information
- Operation System: Macintosh
- Browser: Mozilla Compatible Agent
- Browser version: 5.0
- Display :768 1024
- Flash version: 10.2
No comments:
Post a Comment