1. Set event tracking
Call the _ trackevent () method in the source code of a webpage object, widget, or video.
_ Trackevent (category, action, opt_label, opt_value );
CATEGORY category: (required) specify a name for the object group to be tracked. Generally, the same category name can be used for related user interface elements that want to be classified into the specified category multiple times.
Action: (required) an action that has a unique ing with each category.ActionParameter to name the type of events or interactions that you want to track for a specific webpage object. For example, in a "videos" category, you can use this parameter to track multiple specific events.
Opt_lable label: (optional) it provides an optional string of extra dimensions for the event data and provides additional information for the event to be tracked, such as the title of the video in the preceding example, or the name of the file to be downloaded.
Opt_value: (optional) It can be used to provide an integer for the numerical data of user events and provide additional information for the events to be tracked, such as the title of the video in the preceding example, or the name of the file to be downloaded.
2. Event tracking
For example, to track the user interaction of the three independent controls of playing, pausing, and stopping the same video interface, you can use the following methods:
_ Gaq. Push (['_ trackevent', 'videoos', 'play', 'My Love']);
_ Gaq. Push (['_ trackevent', 'videoos', 'pause', 'My Love']);
_ Gaq. Push (['_ trackevent', 'videoos', 'stop', 'My Love']);
Videos is a category, play, pause, stop is an operation, and my love is a tag.
Ga code statistics-event tracking