typeoneerror
typeoneerror

Reputation: 56968

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.

Upvotes: 0

Views: 797

Answers (2)

typeoneerror
typeoneerror

Reputation: 56968

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.

Upvotes: 0

Steven Westmoreland
Steven Westmoreland

Reputation: 196

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.

Upvotes: 1

Related Questions