IT 4 BLONDES

Beautiful women doing geeky stuff

HOW TO SET UP A GOOGLE ANALYTICS EVENT?

Related Posts

23/10/2012 Categories: Google Analytics

To set up an event like bookmark you need to do two things:

1.

call the _trackEvent() method in the source code of a page object (i.e. bookmark).

The specification for the _trackEvent() method is:

_trackEvent(category, action, opt_label, opt_value, opt_noninteraction)

category (required): the name for the group of objects you want to track.

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

You can also add optional elements such as a label, value, non-interaction (if you set to "true" the event hit will not be used in calculating your bounce-rate).
example for tracking the movie link:
<a href="#" onClick="_gaq.push(['_trackEvent', 'Videos', 'Play', 'My Party']);">Play</a>

Category: Buttons
Action: BookmarkMe
Label: Bookmark
Underneath you will find the code you need to place within the code of your social media link:
onClick="_gaq.push(['_trackEvent', 'buttons', 'bookmarkMe', 'bookmark',, false]);"

example:
<a href="#" onClick="_gaq.push(['_trackEvent', 'buttons', 'bookmarkMe', 'bookmark',, false]);">Follow us on Twitter!</a>

2.

-in the correct profile choose the Goal Set you want to add the event to
-give a name to your goal and click the Event radio button
-check the goal details like underneath:

Category | that matches | buttons
Action | that matches | bookmarkMe
Label | that matches | bookmark
Value | that matches |

-If in step 1 you decided to added an optional value you should leave the “Use the actual Event Value” radio button selected and save your work