Google Analytics For Flash

13,096 views

Published on

How to install and use Google Analytics For Flash and some key concepts about web analytics.

Published in: Technology, News & Politics
3 Comments
30 Likes
Statistics
Notes
  • Hi
    i fave ActionScript2 can i use the same SWC and code?
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • There's a much easier way that requires no ActionScript code and just a couple of lines of JavaScript. It doesn't track custom events, but it gives you all the normal information like page views, traffic sources, bounce rate, time spent, popular pages and lots more.

    I wrote a short tutorial on it: http://ahrengot.com/tutorials/google-analytics-for-flash/
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • thx.. bro
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
13,096
On SlideShare
0
From Embeds
0
Number of Embeds
1,516
Actions
Shares
0
Downloads
0
Comments
3
Likes
30
Embeds 0
No embeds

No notes for slide

Google Analytics For Flash

  1. Google Analytics for Flash
  2. Dominic Gélineau Flash developer Analytics, Animation, SEO [email_address] Blog: www.zedia.net Twitter: http://www.twitter.com/zedia WE ARE HIRING [email_address]
  3. Why care about analytics? <ul><li>Because it’s cool </li></ul><ul><li>To provide data to your clients on the impact of what you are doing </li></ul><ul><li>To give you feedback on the effectivness of your work </li></ul>
  4. Why Google Analytics? <ul><li>It’s free </li></ul><ul><li>It’s widely used </li></ul><ul><li>It has a concept called event </li></ul><ul><li>It now has a library just for Flash </li></ul>
  5.  
  6.  
  7.  
  8. Basic concepts about web analytics <ul><li>PageViews </li></ul><ul><li>Events </li></ul>
  9. PageViews <ul><li>The PageViews model is based on the HTML version of a web page </li></ul><ul><li>The real idea behind a pageView is NAVIGATION </li></ul><ul><li>In HTML this is sent automaticaly every time the user changes or refresh the page </li></ul><ul><li>In Flash we have to do this manually </li></ul><ul><li>We should try and keep the same syntax </li></ul><ul><li>as HTML for consistency </li></ul>
  10. Events <ul><li>The real idea behind events is INTERACTION </li></ul><ul><li>Whenever you want to track something that is not related to navigation you should use an event. </li></ul><ul><li>In Google Analytics Events are not enabled for all profiles </li></ul><ul><li>http://code.google.com/p/gaforflash/wiki/EventTrackingRequest </li></ul>
  11.  
  12. Google Analytics for Flash Library <ul><li>http://code.google.com/p/gaforflash/ </li></ul><ul><li>Just search Google for «Google Analytics for Flash» </li></ul>
  13. How to install it <ul><li>Flex and Flash CS4 can import SWC </li></ul><ul><li>Flash CS3 can’t </li></ul><ul><li>Download the library from SVN </li></ul><ul><li>Put the SWC file in this folder: </li></ul><ul><li>C:Program FilesAdobeAdobe Flash CS3languageConfigurationComponents </li></ul><ul><li>Macintosh HD:Applications:Adobe Flash CS3:Configuration:Components </li></ul>
  14.  
  15. Sample Code import com.google.analytics.AnalyticsTracker; import com.google.analytics.GATracker; var _tracker:AnalyticsTracker = new GATracker ( main, “UA-7777777-7”, “AS3”); _tracker.trackPageview(yourSectionName + “/”);
  16. More on Events <ul><li>_tracker.trackEvent(“English”, “Client Quiz”, “Question 3”, value); </li></ul><ul><li>Category, Action, Label, value </li></ul><ul><li>Only the two first are mandatory </li></ul><ul><li>Value is an integer </li></ul><ul><li>No standards, no real guidelines </li></ul>
  17. 2 Modes: AS3 vs Bridge <ul><li>The library can work in two modes, AS3 or Bridge. Each of them has there advantages. </li></ul>
  18. AS3 Mode <ul><li>Stand Alone mode </li></ul><ul><li>Doesn’t require javascript </li></ul><ul><li>Usefull for full Flash website </li></ul><ul><li>Usefull when you don’t control the HTML that wraps the swf like for widgets or games </li></ul>
  19. Bridge Mode <ul><li>var _tracker:AnalyticsTracker = new GATracker (main, “window.PageTracker”, “Bridge”); </li></ul><ul><li>Integrates better when the Flash part of a website is minor </li></ul><ul><li>Enables more of the Google Analytics API like E-commerce </li></ul><ul><li>allowScriptAccess = always </li></ul>
  20. Visual Debug <ul><li>var _tracker:AnalyticsTracker = new GATracker (main, “ UA-7777777-7 ”, “AS3”, true);    </li></ul><ul><li>One of the coolest features of GA for Flash </li></ul><ul><li>Permits you to see in real time what is being sent to Google </li></ul><ul><li>Clear advantage over the old way, which was to wait 3 hours and check to see if everything worked </li></ul>
  21. Visual Debug Screenshot
  22. What should you track <ul><li>Too much is like not enough </li></ul><ul><li>Tracking errors is really helpful </li></ul>
  23. One draw back <ul><li>The library will add 40k to your project </li></ul><ul><li>Might not be the best thing for all project </li></ul><ul><li>Like banners </li></ul>
  24. Links <ul><li>Google Code – http://code.google.com/p/gaforflash/ </li></ul><ul><li>Developer group – http://groups.google.com/group/ga-for-flash?pli= 1 </li></ul><ul><li>Adobe Max presentation on GA for Flash – http://tv.adobe.com/#vi+f15385v1040 </li></ul>
  25. Questions?
  26. Thank you Dominic Gélineau [email_address] www.zedia.net http://www.twitter.com/zedia

×