search ]

An In-Depth Look at Events in Google Analytics

By default, Google Analytics measures traffic on your site and tracks metrics such as pageviews, bounce rate, and more. However, if you want to track more specific interactions, such as file downloads, link clicks, form submissions, and video views, you need to implement event tracking.

So, Events in Google Analytics (old version) are user interactions with content that can be measured separately for the loading time of a web page.

Note: This post refers to events in Universal Analytics, which are called “Hits” in other words. Events in Google Analytics 4 are based on a different model.

Anatomy of Events

For an event in Analytics, there are four components:

  • Category.
  • Action.
  • Label (optional but recommended).
  • Value (optional).

For example, you can define that clicking the play button on a video on your site sends an event with the following values:

  • Category: “Videos”.
  • Action: “Play”.
  • Label: “Explanation of product XXX” (optional).
Overview of events in Google Analytics

Let’s delve into each component of events in Google Analytics:

1. Category

Category is the name you provide to group objects you want to analyze. Typically, you may use the same category multiple times for UI elements you want to group under the same category.

For instance, if you want to measure how many times users downloaded a specific video, you can use:

  • Category: “Videos”.
  • Action: “Downloaded”.
  • Label: “Changed with the wind” (optional).

In this case, there will be only one category in your Analytics reports named “Videos,” and you can see metrics on the interaction users had with all elements of that video object (Play and Downloaded actions).

However, you might have more than one individual video object on your site that you want to measure. So, consider how you want to categorize your reports before implementing events.

For example, you may want to create separate categories for different types of videos, one for Movie Videos and another for Music Videos. Additionally, you might want a separate category for video downloads:

  • Videos – Movies
  • Videos – Music
  • Downloads

In this scenario, you can see the total number of events for each of the three mentioned categories in Analytics reports. However, you won’t be able to see metrics for Videos separately from Downloads since the detailed metrics of events are grouped under each category accordingly.

Despite the flexibility of the event object model, it is highly recommended to plan the structure of reports before creating categories. If you plan to use the same category name in multiple locations, ensure that you correctly attribute the desired category name.

For example, if you plan to call the video category “Video” and then send an event with the category name “Videos” (plural) – you will end up with two separate categories.

Additionally, if you decide to change the category name for an object that has already received information for a specific category, the data for the original category will not be recalculated. Therefore, you will have metrics for the same element under two categories in the Analytics interface.

2. Action

Typically, you should use the action parameter to name the event or interaction you want to measure for a specific object. For a single category named “Videos,” you can analyze specific events using this parameter, such as:

  • Time taken for the video to load.
  • Clicks on the “Play” button.
  • Clicks on the “Pause” button.
  • Clicks on the “Stop” button.

Like categories, the name you provide for the same Action depends entirely on you. However, note two important features regarding the use of event actions in reports:

  • All actions are displayed independently of their parent category. This allows you an additional useful way to segment the event data in Analytics reports.
  • A unique event is determined by a unique action name. You can use the same action name for different categories, but this can affect how unique events are calculated.

3. Label

Labels allow you to provide additional information for events you want to analyze, such as the title of the video or the name of the downloaded file.

  • Category: “Downloads”.
  • Action: “PDF”.
  • Label: “sales-forms/orderform.pdf/”.

Like categories and actions, Analytics provides a report displaying all the labels you’ve created. Consider labels as a way to create an additional dimension for reporting on user interaction with objects on the site.

For example, suppose you have five embedded videos on a page that you want to analyze. Each one can use the category “Videos” with the action “Play,” but each one can have a different label (such as the name of the movie), so they appear as separate elements in the Analytics report:

  • Category: “Videos”, Action: “Play”, Label: “Gone With The Wind”.
  • Category: “Videos”, Action: “Play”, Label: “Huckleberry Finn”.

Like categories and actions, the name you provide for labels depends entirely on you. However, note the following points:

  • All labels are displayed independently of their parent category and actions.
  • A unique event is determined in part by a unique label name. You can duplicate label names across different categories and actions, but this can also affect how unique events are calculated.

4. Value

The Value parameter, the numeric value of the event, allows you to attribute a numerical value to an object on the page. For example, you can use this to provide the time in seconds it took for the video to load or send a monetary value when the video reaches a certain point.

  • Category: “Videos”, Action: “Video Load Time”, Label: “Gone With The Wind”, Value: downLoadTime.

The value is translated as a number, and the report summarizes the total values based on the value for each event. The report also provides the average value for the category. In the example above, the event is called for the action “Video Load Time” when the video loading is completed.

The video name is provided as a label, and the loading time is calculated for each video intended for download. You can then check the average time for all actions of type “Video Load Time” in the “Videos” category.

Suppose you have 5 unique video downloads on your site, and the loading time in seconds for each one is:

  • 10
  • 25
  • 8
  • 5
  • 5

The report will perform the following calculation with the sample numbers describing the loading time in seconds:

  • Sum of values with events: 53
  • Total Value: 53
  • Average Value: 10.6

Negative values are not supported in the Value parameter.

This concludes this post. For more information on events, also known as Events in Google Analytics, take a look at the source. Furthermore, here is how to actually send events to Google Analytics.

Roee Yossef
Roee Yossef

I develop custom WordPress themes by design. I love typography, colors & everything between, and aim to provide high performance, seo optimized websites with a clean & semantic code.


Leave a Comment

Add code using the buttons below. For example, to add PHP click the PHP button & add the code inside the shortcode. Typo? Please let us know...