var mc:MovieClip = new MovieClip();
mc.buttonMode = true;
mc.addEventListener( MouseEvent.CLICK, trackEventHandler, false, 0, true );
function isProductionMode():Boolean
{
var runtimeEvironment:String = Capabilities.playerType;
if (runtimeEvironment == "External" || runtimeEvironment == "StandAlone"){
return false;
} else {
return true;
}
}
function trackEventHandler( e:Event ):void
{
//If the Complied Flash Player is on the HTML page, give it a Page View
if( isProductionMode() ){
navigateToURL(new URLRequest("analytics._trackPageView()"), '_self');
}
}