Judah Phillips on Rich Internet Apps for Beginners, Part II of III: Google Analytics | LunaMetrics

Judah Phillips on Rich Internet Apps for Beginners, Part II of III: Google Analytics

/

Yesterday, famous guest blogger Judah Phillips of Reed Publishing wrote Part I of a three-part guess post for this blog. Part I was, What are Rich Internet Applications? Today, we have Part II, How to measure them with Google Analytics. (And the follow up will be, how to measure them with Unica.)

Before you read this post, you might want to read a post that Justin Cutroni published on Saturday night. He wrote about tracking clicks to pages where you make the name up, because you can’t put the code on the page. Links that take you off the page, .pdfs, etc. It is a good basis for what Judah is going to talk about: creating page names out of thin air and then using the pretend pages to track events (and hence, rich media) in GA. So here we are, lucky again to have Judah Phillips:

Since we all know about page tags, let’s get down to business with “the Google” and how it tracks “the Rich Media:”

Google Analytics enables tracking of any browser event, such as Javascript and Flash events. Those smart folks at Google have a little JavaScript function called urchinTracker() that enables event tracking. Use the JavaScript function with an argument specifying a name for the event.

For example, the function:

javascript:urchinTracker(‘/mysite/flashrichmedia/playbutton’);

logs each occurrence of that Flash event as a page view of

/mysite/flashrichmedia/playbutton.

Some caveats:
1) Always use a forward slash to begin the argument.
2) Actual pages with these filenames do not need to exist.
3) You can organize your events into any structure or hierarchy you want.

Important: Google says to place your tracking code “between the opening tag and the JavaScript call” if your pages include a call to urchinTracker(), utmLinker(), utmSetTrans(), or utmLinkPost().

For example, if the page view is the major event and the “play” event a minor event; then, your hiearchy would be Page View > Event, where the page contains an event, such that:

/mysite/ria_bittons/playbutton
/mysite/ria_bittons/pausebutton
/mysite/ria_bittons/playbutton
/mysite/ria_clips/clip

Some example of the code (from Google Help):

This one above tracks when you click and release (although technically, it just notices the release) of a flash button (and records the file you specify as a page view).

The second one is the same, but by using a function,
passing it a parameter, and
identifying the instance you want to track, you can measure when your file was used
in a specific scene in a little flash movie. So it is a more specific
method for handling event tracking in Flash.

And the third one repeats the action throughout the movie so that each time the file is loaded, it gets tracked as an event. If you were to pass a unique file at the end of the movie, you could recognize it using this method (or the other methods) to know that the whole movie was watched (as long as your session doesn’t time out).

Now wait until Google updates your analytics to see if it all worked.

Our owner and CEO, Robbin Steif, started LunaMetrics twelve years ago. She is a graduate of Harvard College and the Harvard Business School, and has served on the Board of Directors for the Digital Analytics Association. Robbin is a winner of a BusinessWomen First award, as well as a recent Diamond Award for business leadership. You should read her letter before you decide to work with us.

Contact Us.

LunaMetrics

24 S. 18th Street, Suite 100,
Pittsburgh, PA 15203

Follow Us

1.877.220.LUNA

1.412.381.5500

getinfo@lunametrics.com

Questions?
We'll get back to you
in ONE business day.