Top 10: the 10 oldest domains on the internet Security Sandbox in Flex Builder 3
Jun 10

Recently I have found been working on a project that I need to track. The problem is, its a Flex project. Since its a new technology and its gaining speed I thought this post might be helpful to you.

There seems to be two ways to track Flex/Flash (AS3) actions in Google Analytics:

1. URLRequest
2. ExternalInterface

Here is some of my code that does my tracking for videos:

//Strip Out Spaces and Replace with Underscores

var pattern:RegExp = / /gi;

var formattedVideoTitle:String = _videoTitle.replace(pattern, “_”); //Formulate Tracking String

var trackingStr:String = “/” + _trackingPath + “/” + formattedVideoTitle;

//Two Methods Of Tracking
////////////////////////////////////////////////////////////
//URL Request Send Method
sendToURL(new URLRequest(”javascript:urchinTracker(’”+trackingStr+”‘);”);

//ExternalInterface Send Method
ExternalInterface.call(”urchinTracker”,trackingStr);
Now of course if you look at the code this means that I am tracking a video twice, so make sure you comment out one of the methods. You get to choose, although the ExternaIInterface method is new and faster, the URLRequest method is probably more legacy and will most likely work on other tracking systems.
Google Analytics Help On The Subject
http://www.google.com/support/googleanalytics/bin/answer.py?answer=55520

Great Posting On The Subject
http://blog.digitalbackcountry.com/?p=1088

Some other interesting things happening with Google Analytics and Flex are these two Flex apps:

Flex Interface to Google Analytics (Flex/AIR)
http://www.aboutnico.be/index.php/google-analytics-air-beta-sign-up/

Flex Widget for Google Analytics:
http://labs.thesedays.com/2007/05/26/apollo-google-analytics-widget-available/

via:http://www.weberdesignlabs.com/blog/?p=22

written by Flex \\ tags: , , ,

Leave a Reply