Confirming Google Analytics Install in Flash Environment using AS3 Mode
Just created a new GA account and initialized my tracker in AS3. How can I confirm that it is installed and 开发者_运维技巧working correctly? In GA web view it shows "Tracking Not Installed" but when I use the "visualDebug" parameter (set to true) in Flash, it appears to be sending OK via trackEvent
. Would it not show up as installed since it's not on the website yet (just testing in IDE)?
var visualDebug:Boolean = true;
var config:Configuration = null;
var debug:DebugConfiguration = null;
tracker = new GATracker(this, _trackerId, "AS3", visualDebug, config, debug);
// ...
/** Handles analytics tracking. */
private function onTrackEvent(event:GameShellEvent):void
{
track(_trackingCategory, event.action);
}
/** Track an event in google analytics. */
private function track(category:String, action:String):void
{
trace("[GA] tracking event", category, action, "with id", _trackerId);
tracker.trackEvent(category, action);
}
Edit
FYI, I'm using the AS3 library in "AS3" mode which sends the requests through a GIF request. This is not using the ga.js library so there's nothing to install on a website.
I've not seen this particular method of embedding Google Analytics code. However, I believe this is because you are running the content locally -- and for security reasons, remote communication is not permitted when running locally.
Ah, guess I should have RTFM more thoroughly:
Note: Currently, Flash tracking is available for any Flash content embedded in a web page. Tracking of data sent from Adobe Air, Shockwave, or via the Flash IDE (e.g. using Test Movie) is not supported at this time.
精彩评论