Understanding _trackEvent Method

Contact Us or call 1-877-932-8228
Understanding _trackEvent Method

Understanding _trackEvent Method

The _trackEvent Method

The _trackEvent method consists of four different components. The following snippet shows the generic syntax for the _trackEvent method:

_gaq.push(['_trackEvent', 'category', 'action', 'optional_label', optional_value]);

The first two components i.e. (category and action) are required parameters. The label and the value parameters are optional.

Event Tracking Architecture (Category, Action, Label, Value)

Component Name Explanation
Category Used for specifying the name of the object or type of the object. Think of category as a big bucket in which certain events can belong (e.g. all the videos on your website). Takes only text values.
Action Used for capturing a particular action that a user will perform (e.g. clicking on Play button). Takes only text values.
Label Used for distinguishing different items. Within a particular category (i.e. within the video category) you can label different videos (e.g. Iron Man 2 Trailer). The label field is optional.

This parameter takes only numerical values. The value field can help monetize an event. This is an optional parameter.