When a visitor comes to your site, data is collected in many ways: visitor data via the browser header and IP address, click data from pages loading and campaign data from URL parameters, but what about actions that happen within a page? That is where “events” come in. An event is an in-page action that normally would not be tracked by analytics, but through custom code, they can be captured, measured and analyzed.
Google Analytics events allow for in-page actions to be tracked and monitored without affecting the overall page view count of the website. Unlike page views, events can be organized by three groupings: category, action and label. For purposes here, the fourth variable, value, is not being used. Events called through JavaScript code and can be part of a link, or other page actions.
A full guide to Google Analytics Events implementation can be found at: http://code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.html, but I wanted to run through some uses that I’ve found beneficial for our clients.
Content Rotators
More and more sites are including a large home page element that slides through images or news stories. While traditional page view data can show you which image/link was the most popular, having this data nicely contained in an event is valuable, especially when you want to look at the data quickly. Under traditional page view tracking, you would look at the traffic leaving the home page and see which pages were the most popular. Generally you wouldn’t have any record of exactly which pages these were or which position they were in the rotator. You could add in custom parameters like page.html?pos=1 for the first position in the rotator, but that makes your Content report messy with too many versions of a page. This tracking could be done in Flash or in AJAX/HTML.
Video Playback
Another in-page interaction that is handy to track is video playback. To keep from overwhelming the system with data, I’d recommend just tracking the video start and if the user reaches the end. If you are using a standard player, you may or may not be able to add in that tracking, but some existing players (like Flowplayer) do allow for GA tracking.
AJAX content
Tracking usage of AJAX applications or interfaces fits ideally with events. When interacting with an AJAX app, the page rarely refreshes, so traditional page view tracking doesn’t help. Using events for adding/removing, filtering results, etc. is a great use of this tool. In Google Analytics, there are some cases within AJAX where you want to “force” a page view to be logged, mostly for interactions that you want to be part of a Goal.
Filtered Search
A specific case of the AJAX-type tracking is a filtered search. For search results that allow you to pick categories or ranges (say t-shirts under $20) and instantly update your keyword search results to those groups, using events to track the selection of “t-shirts” and “under $20” is very powerful. This data then lets you see which criteria are the most popular and which drive sales or conversions.
Product Image Selection
For sites with a product catalog displaying multiple images per product, using event tracking can let you see which images are the most popular. Knowing what is popular can inform your decisions on future photo selection or even content ordering.
Hopefully this has provided a nice overview of events. In a future post, I’ll dive into the details of how to setup these events in Google Analytics.
