Quick Navigation

 

Tracking the impact of website events helps you monitor the way people interact with your website. Understanding these visitor interactions helps you measure the effectiveness of your website and any changes you make. Google Analytics makes tracking website events, such as click-throughs and downloads, simple. In this article, we will explain what event tracking in Google Analytics is and how to track events in Google Analytics.

What Is Event Tracking in Google Analytics?

Image via Flickr by perzonseo

Event tracking is a feature of Google’s free website tracking tool, Google Analytics. This tool lets you track the events that you define. Through Google Analytics Event tracking, you can track and monitor events that aren’t included in Google Analytics’ basic tracking metrics.

Subscribe to our Newsletter

Event tracking’s customization properties help you focus on the Google Analytics events that really matter to you. Event tracking helps you identify the elements of your website that work and any barriers that may impair user interaction. You can use event tracking in Google Analytics to make your website better.

Event tracking can also help you create more effective advertising campaigns. For example, you might invest in a pay-per-click advertising campaign for the type of customer inquiries with the best conversion rates and lead values.

What Are Google Events?

Google events are actions that occur on your website when visitors interact, or don’t interact, with your content. Some Google events include:

  • Clicking an internal or outbound link.
  • Playing an embedded video.
  • Completing an online form.
  • Partially completing an online form.
  • Browsing a complete page.
  • Partially browsing a page.
  • Browsing a page without clicking a link, playing a video, or filling out an online form.

As you can see, anything a website user does, or doesn’t do, is a Google event.

What are custom events in Google Analytics?

Custom events are the events you monitor through Google Analytics’ Event tracking tool. Google provides the ability to view and monitor only the events you’re interested in. For example, if you’re focusing on developing video content, you might monitor events on pages with videos, such as:

  • Visiting video pages without pressing play.
  • Partially watching videos.
  • The place where people typically click away from the video.
  • Completely watching videos.

Where Is Event Tracking in Google Analytics?

Google lists event tracking under “Behavior” on the sidebar at the left side of the Google Analytics home page. Clicking “Behavior” expands the menu to reveal further options. You’ll find “Events” under “Site Search” in this expanded menu. Click “Events” to reveal the four event tracking pages:

  • Overview.
  • Top events.
  • Pages.
  • Event flow.

Once you set up your events and people start interacting with your site, these pages will become populated with data.

How Do I Define My Event?

Google Analytics requires information about your event before you can track it. It gets this information from code referring to the following qualities:

Category

This is the element your visitor interacts with, such as form submissions. Categories must be text. Every event needs a category.

Action

This is the type of action occurring during an event, such as sign up. Actions are always text. Every event also needs an action.

Label

This is a method of categorizing your events. For example, if you have several white papers available for download on your website, you could label each one with their title so you know which ones are the most popular. Labels are optional text fields.

Value

A numeric value associated with the event. This could be a value you ascribe to an action, such as a monetary value for every new subscriber, or a number linked to the event, such as the length of a played video. Values are optional and always expressed as integers without any units of measurements.

How Do I Create an Event in Google Analytics?

One of the most common ways to create an event on Google Analytics is by inserting JavaScript code into your website. As this method uses JavaScript code, the events are often called analytics.js events.

Take the following steps to create your event using this method:

Step One: Decide How to Structure Your Reports

Deciding how to structure your reports before you start coding will help you get the most value from event tracking. Consider which events you want to track and the categories, actions, labels, and values you’ll use for each. Identify similar events which you will group using the same categories, actions, and labels. This will help you track your events over time. If you change your structure in your future, past data isn’t reorganized, so it pays to do this job right the first time.

Step Two: Connect Your Site to Google Analytics

If you haven’t already connected your website to your Google Analytics account, you’ll need to do this before you start tracking events. Log in to your Google Analytics account and click on your properties at the top of the screen. You’ll see a list of your website properties and information about them.

Google lists your tracking ID under “Properties and Apps.” This is a string with the format UA-000000-1. UA stands for Universal Analytics. The first six numbers are your account number, and the final number is the property number.

Once you know your tracking number, you’ll add code containing this number to your website so it can track your events. Add the following code under the tag of each page on your website, making sure to change GA_TRACKING_ID to your own tracking ID.

Step Three: Add Code Snippets to Elements You Want to Track

Next, you’ll add code snippets that tell Google Analytics what to track. Add your code to the header of the page where your event takes place. Code snippets for event tracking follow the format:

ga(‘send’, ‘event’, [eventCategory], [eventAction], [eventLabel], [eventValue]);

This code translates to Google Analytics send event, followed by the customized fields defining the event. To customize this code, substitute eventCategory with your event’s category, eventAction with your event’s activity, and so on. Event tracking code also needs an event handler around the event tracking code. An event handler is code that triggers your tracking event when a website visitor performs a set action. An example of completed code is:

This code sets up an event for Frank’s Cafe. Whenever someone downloads the cafe’s .pdf dinner menu, the code triggers the event. The event is worth 20. The cafe’s owner may create another event for visitors downloading the breakfast menu, for example. This event might have a value of 10, as customers enjoying breakfast tend to spend half as much.

Step Four: Verify That Your Code Is Working

After setting up events in Google Analytics, you should trigger them to make sure your code works. Complete the action you’re tracking, then visit the Google Analytics page to see if it recorded your event. Click “Behavior,” then “Events,” then “Overview” in the left sidebar to view your tracked events. If you have no events recorded, proofread your code and correct any errors. Test it again until your code works.

How to Set Up Event Tracking With Google Tag Manager

If you aren’t confident working with code, Google Tag Manager provides an alternative way to set up event tracking. Many people with large websites or interest in tracking many things also find Google Tag Manager helps them scale their event tracking efforts.

If you’ve never used Google Tag Manager before, you’ll need to sign up for an account. Click the “Create Account” button, then complete the form using your website’s details. You’ll then need to add Google’s code to the head and body of every page on your website. Then take the following steps to track an event using Google Tag Manager.

Step One: Enable Built-In Click Variables

As you’ll need Google Tag Manager’s click variables for your own tags and triggers, make sure they’re enabled. Select “Variables” in the sidebar, then the blue “Configure” button in the top right of the screen. Scroll down and tick all the click variables. Then click the close icon at the top left of the menu to apply your changes.

Step Two: Create a New Tag for the Event You Want to Track

Click “Overview” on the sidebar to return to the Google Tag Manager main page. Then click the “New tag” button to the right of the sidebar. This will create a new tag for your event.

Step Three: Configure Your Tag

The tag workspace has two clear sections. The top section is the configuration section, where you’ll set up your tag. Click inside this box, then choose “Google Analytics: Universal Analytics” as your tag type. This should be the top option.

You’ll then choose “Event” from the “Track Type” drop-down menu. Fill in your category, action, label, and value if applicable, just as you would when completing the code in the steps above. Change the Non-Interaction Hit setting to “True,” so the event doesn’t count toward your bounce rate.

Click the “Google Analytics Settings” drop-down menu and select “New Variable.” Enter your Google Analytics tracking ID in the space provided, then click the close icon. This will send the event tracking data from your website directly to Google Analytics, where you can assess it later. Click beside the configuration box to return to your main tag page.

Step Four: Specify Your Trigger

Click within the Triggering box to specify your trigger. This is the action that will activate your event. Click “All pages” so your event works throughout your site. Then click the plus icon in the top right to add new triggers. Click within the Trigger Configuration box, then scroll through the list and choose the trigger you want.

Step Five: Save the Finished Tag

Set a name for your trigger at the top of the page so you can easily use it for future events. Then click the blue “Save” button at the top right of your page to save your Google Tag. It will now send data from your website to your Google Analytics page.

What Are Event Tags?

Event tags are codes that track the number of times people view or click on Google AdWords advertisements. You might use event tags to track which ads people view most often and which ads encourage the highest number of click-throughs. You can also add extra information, such as keywords, which Google includes whenever the ad event occurs. They work similarly to event tracking on Google Analytics but are not as customizable.

The Importance of a Site Crawl Analysis (ebook)

Download eBook

Knowledge Base: Resources

You May Also Like