The first thing you need to do is to head over to Google Analytics(GA) or a similar service unless you want to develop you own tracking system, something I will not touch with a ten feet fork in this article..
GA is pretty straight forward to set up, and once you have managed to set up tracking on the html page that will host your swf file it's time to get into the clever stuff. The thing is, to track something from ActionScript 1/2 vs AS3 are two different things. In AS2 you would simply use the
getURL("javascript:pageTracker._trackPageview('myTrackingPoint');")
. This will then add a tracking point called «myTrackingPoint» to GA, in AS3 it will look like this: ExternalInterface.call("pageTracker._trackPageview","myTrackingPoint")
. This difference can be traced back to that AS3 has a different and much more powerful interface to talk to JavaScript.To use this in an effective manner I highly suggest using some kind of folder structure when tagging your apps. Like e.g. if you have 5 buttons in your main menu, then track them like so:
ExternalInterface.call("pageTracker._trackPageview","mainmenu/button_home");
In this case GA will create a folder structure which makes navigating within the GA report much more useful.
Okay.. now your on your own..