This post is a follow-up to a previous post: Using Google Analytics to track activity inside of a Flash or Flex AS3 application, I suggest reading it as it will give you in-depth details on how google analytics works.
There are two ways to embed this new functionality in your application:
Gee guys, 40k for event tracking?
The main drawback from my perspective (from someone who has been programming since the days of 33.6kbps modems to access the internet), is the size of the library. I integrated the functionality straight from source into this application which wound up gaining 40k (pounds lol!). It’s crazy. We get cool Tweening libraries at under 10k, and all this does is send requests to a “web service” or some sort, and gee, 40k! Mind you, Flex coders will think this is small….
Easy to use
Here is a quick sample, using event tracking. It is perfectly designed in my opinion when it comes to the API (Full Reference) itself, reallly simple.
I mean, this is simple. As for the result..
Event Tracking 101
In Google Analytics, event tracking happens in 4 levels of detail:
When you create an Event Tracker like so:
The phrase “Video Clip Finder” becomes the “Category” of all events tracked through that event tracker.
Then when you track a specific event like so:
The phrase “Artist Top Tracks” becomes the “Action”, the content of the variable “artistName” becomes the “Label” and the content of “topTracksAmount” becomes the “Quantifier”.
Google Analytics then does averages on the quantifier, so you could, for example, track the amount of time a certain video plays, and Google Analytics would average it for you.
Therefore, if you are doing a marketing campaign (ugh! I never do marketing gigs.. marketing is evil!!!) that plays three videos, to the selection of the user; you could see in one quick glimpse the average play time of each video. THAT is a serious advantage of Event Tracking.
That and the fact that it won’t screw up your pageviews anymore. Big value there too.
Hope you enjoyed today’s post. More to come shortly.
That was an amazing post, and it earned you a new RSS subscriber. Keep up the good work!
Great post. You can also use the events API to visualize your website’s response time how real users see it, not crawlers. You can achieve this by populating the fourth parameter (value) by the response time and then charting it using Analytics. For more details see my blog post:
Found this post extremely useful and to the point.
Very nice post, I’ve heard of using Google Analytics within flash games, but never actually looked it up. Thanks for sharing, I’ll definitely look into using this.