Google Analytics Experts Digital State Consulting discuss Tracking Flash with Google Analytics.
In the HTML world, web analytics has become incredibly valuable and accurate. Page-tagging solutions – such as those provided by Omniture and others – provide reliable real-time information that allows us to readily gauge the impact of any significant changes.
However, HTML no longer owns the web spotlight. Flash, alongside several other web technologies, has emerged as a compelling complement and, in some cases, alternative to HTML. In the past several years, the adoption of Flash has spread from simple online advertisements to data-driven applications and entire Flash-based websites.
MINI USA, Hewlett-Packard and Volvo provide just a few great examples. Another example, of course, is macromedia.com with their recently unveiled European eCommerce store.
From a web analytics perspective, Flash opens an exciting world of measurement and analysis possibilities. From simple advertisement click-thru to thousands of eCommerce transactions, we have found it possible (and easy) to track every visitor interaction within Flash. The ROI implications of such measurement are substantial, as this level of visibility provides us with the ability to continually optimize and refine our web and marketing initiatives to deliver the best visitor experience possible.
There are as always many tools and great pieces of software for this but, as always we tend to use our favourite…. some details of how to use analytics for flash events is below.
Google Analytics lets you track any browser-based event, including Flash and JavaScript events. By using the _trackPageview function, you can assign a page filename to any Flash action and enter that filename into the appropriate goal or funnel step.
Important: Please note that your analytics tracking code and calls to _gat._getTracker must be placed on the page above the call to _trackPageview.
To track an event, call _trackPageview() with an argument specifying a name for the event. For example, calling:
pageTracker._trackPageview(“/purchase_funnel/page1.html”);
will cause each occurrence of the calling Flash event to be logged as though it were a page view under the name /purchase_funnel/page1.html. The argument must begin with a forward slash and be between quotes. The event names may be organised into any directory style structure you wish. The path/filename argument to _trackPageview doesn’t need to represent an actual URL on your website.
Flash Code Examples
on (release) {
// Track with no action
getURL(“javascript:pageTracker._trackPageview(‘/folder/file.html’);”);
}
on (release) {
//Track with action
getURL(“javascript:pageTracker._trackPageview(‘/folder/file.html’);”);
_root.gotoAndPlay(3);
myVar = “Flash Track Test”;
}
onClipEvent (enterFrame) {
getURL(“javascript:pageTracker._trackPageview(‘/folder/file.html’);”);
}
To verify that _trackPageview is being called correctly, you can check your Top Content report 24 to 48 hours after the updated tracking code has been executed. You should be able to see the assigned page name in your report.