/ Published in: ActionScript 3
URL: http://code.google.com/p/gaforflash/
Some useful tutorials for doing this can be found here ... http://inflagrantedelicto.memoryspiral.com/2009/10/presentation-for-fitc-adobe-max-2009/ http://www.insideria.com/2009/02/using-google-analytics-within.html http://tv.adobe.com/watch/under-the-hood-with-adobe/google-analytics-for-adobe-flash http://tv.adobe.com/watch/max-2008-envision/tracking-flash-cs4-applications-with-google-analytics
Expand |
Embed | Plain Text
// For Google Analytics tracking to work you need to link // to the following two SWC files in Flash CS4 and above ... // 'analytics.swc' and 'analytics_flash.swc' // Download them from here http://code.google.com/p/gaforflash/ import com.google.analytics.GATracker; import com.google.analytics.AnalyticsTracker; var tracker:AnalyticsTracker; //GATracker(display:DisplayObject, account:String, mode:String = "AS3", visualDebug:Boolean = false, config:Configuration = null, debug:DebugConfiguration = null); tracker = new GATracker(this, "UA-XXXXXXX-X", "AS3", true); // Google Analytics Event Tracking Example // trackEvent(category:String, action:String, label:String = null, value:Number); tracker.trackEvent("MyProject", "ButtonClicked", "HomeButton");
You need to login to post a comment.
