Please Click this Button

Monday, June 6, 2011

Event Tracking

What is Event Tracking?
Event Tracking is a feature of Google Analytics. You can use to track different actions of visitors who come to your website, such as clicking a button or downloading a file.

How to setup the event tracking code:
First you will obviously need to have Google Analytics installed on your website. If you already GA installed on your website you need to make sure you have the most current, up to date, script. Once your GA script is setup correct to allow tracking you are ready to setup the links you will be tracking. The syntax uses for tracking is, _trackEvent() method:

The following components are necessary for _trackEvent() method

_trackEvent(category, action, label)

*  category (required)
   The name you supply for the group of objects you want to track.

*  action (required)
   A string that is uniquely paired with each category, and commonly used to define the type of user interaction    for the   web object.

*  label (optional)
   An optional string to provide additional dimensions to the event data.

*  value (optional)
   An integer that you can use to provide numerical data about the user event.

Example: A simple example for event tracking illustrates how you might use the Tracking of a video link:

a href="#" onClick="_gaq.push(['_trackEvent', 'Videos', 'Play', 'Baby\'s First Birthday']);"

Note: Please add the starting tab < in just beginning of this example. And close it by >

In this Example events would display Videos as category, Play as the action, and Baby's First Birthday as the Label.

0 comments:

Follow me on Twitter Delicious Add on Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Best Hostgator Coupon Code