I am looking for code, examples, library, components for using google analytics event tracking with my Actionscript 2 Flash movies. I can find info about AS3 on the google code site but not AS2. What is the best resource for tutorials and examples about tagging my Flash files to use the asynch google analytics code. I have found some old information about the old google analytics code.
thanks
I've had to do a lot of mainenance on AS2 projects, so I know where you're coming from. Here's what I do:
Step 1 is to get a google analytics tracking beacon set up in your HTML that your flash movie can use. Google has examples of how to do this, but here's an example of a set up that I did recently:
With the beacon set up on your page, you can now use ExternalInterface to have your flash movie send tracking messages to google. Somewhere in your flash you'll need a function that you can call up from anywhere else in your code that looks like this:
When you want to track an event, you pass in a string that accurately describes the event using google analytics syntax. Ex:
/root/loadingFinished
or something similar.Hopefully this helps! Good luck!
I have added this to my Flash projects and it seems to work so far. I have not left it long enough to check what has come through on google analytics reports yet but I will update this answer with what comes through.