views:

198

answers:

2

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.

+1  A: 

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.

Steven Westmoreland
Perhaps. In the IDE, remote communication works fine though.
Typeoneerror
I was hesitant to make the above comment... but how can the Google Analytics tracking code be accessed without ExternalInterface calls? I must be missing something.
Steven Westmoreland
It makes URLRequests to a .gif file which handles the track. From the docs: "AS3 mode is completely independent from the ga.js tracking code and contains all the Analytics tracking functionality."
Typeoneerror
http://code.google.com/p/gaforflash/source/browse/trunk/src/com/google/analytics/core/GIFRequest.as
Typeoneerror
Thanks for that. I wasn't aware of this project.
Steven Westmoreland
A: 

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.

Typeoneerror