Event Tracking in Google Analytics

Google Analytics provides you with tons of useful information about your website, including traffic sources, number of visits, and popular content.  You might not know it, but you can actually customize your Google Analytics account to provide more detailed information beyond its basic reporting capabilities. One of the most common ways to do this is through event tracking.

Event tracking allows Google Analytics to report data on specific interactions users make with your website. This can be anything from playing a video or clicking on a button to submitting a form. It’s a great way to get lots of useful information about your website by simply adding a little extra code.

Elements of an Event

Before you set up any event tracking, you first need to determine what types of interactions you want to see in Google Analytics. Then, you’ll need to make sure you assign a few required elements to those interactions. Each event is made of up several components that will determine how information is displayed in your analytics reports. These are:

Category – This is the broadest form of organization in your reports. Think of it as the top umbrella. I usually keep these as generic as possible. For example, if I want to track clicks on a button, my category would simply be “button.” If you wanted to, you could get a little more specific and set categories based on the type of button. The most important thing is to remember to keep things consistent if you’re tracking multiple buttons or types of buttons.

Action – This describes the interaction you want to track. Again, using my button example, the action would be “click.” There are, of course, some caveats to keep in mind when setting this up, so check the Google guide linked in the resources section below for additional information.

Label – This is additional information that will help you differentiate specific interactions in your reports. It could be the name of the video or the location of a button. If I was tracking contact form submissions, for example, I might use “contact form submit button.”

Value – Value is an optional component that allows you to assign a numerical value to specific interactions. This comes in especially handy if you want to assign a dollar value to an event.

Those are the basic elements. As a final example, if I wanted to track a button click, I might use Category: “Button”, Action: “Click”, Label: “Buy Tickets”.

Setting Up Events

Now, if you’re not a developer yourself, this is when you get your coding friends involved. It will help them tremendously if you’ve already figured out what you want to track and have assigned the components appropriately. They’ll go into the code and add the necessary snippet to “fire” the events. See the developer doc below if you’re interested in the technical nitty-gritty, learning about the necessary code, and figuring out how to set this up yourself.

Here’s a handy pro tip. After your developer has notified you that the tracking has been implemented, head to your Real Time reports in analytics to see if it’s picking up the data like it should. There is actually an events section in Real Time that will allow you to see events tracked from active users and events within the last 30 minutes. You can see if there’s any data in those reports, or you can even visit your site, perform the action you want to track, and see if analytics picks up your event. Keep in mind, though, that this will only work if you haven’t filtered out your own traffic to the site. This is the best way to troubleshoot implementation.

Event Reports

Once you’ve set up event tracking and have confirmed that everything is working properly, you’ll be able to see the event reports in your Google Analytics account. I’ve already mentioned where to find them in Real Time reports. Regular event reports are housed under the Behavior menu.

There are actually four sets of reports: Overview, Top Events, Pages, and Events Flow. Perhaps the two most commonly used are Overview, which provides a general snapshot of your events, and Top Events. I actually find the Top Events report the most useful. The default report setting is category, but you can view data by action or label. I like to use the label view because in my reporting, it’s the most granular and is the easiest way for me to see the total count for a specific interaction.

There are actually four sets of reports: Overview, Top Events, Pages, and Events Flow. Perhaps the two most commonly used are Overview, which provides a general snapshot of your events, and Top Events. I actually find the Top Events report the most useful. The default report setting is category, but you can view data by action or label. I like to use the label view because in my reporting, it’s the most granular and is the easiest way for me to see the total count for a specific interaction.

Once you’ve selected your view, you’ll see total events, unique events, value, and average value. This post over at Search Engine Watch defines each of these nicely and provides some handy tips for making the most out of these reports.

Events as Goals

If you want to, you can even set up events as goals, so this data will be filtered into your goal reports as well. To do this, visit the Admin tab, then select goals under the appropriate view. Click on new goal, give it a name, then select Event as the goal type. You can then enter the category, action, and label used for the event you want to track as a goal.

Be sure that these match exactly what your developer entered in the code. If not, your goal reporting may not work. Also keep in mind that it can take some time for the data to filter into the goal reports. Don’t panic if you see events triggering but no goal data. Give it a few hours and check again. If you still don’t see data after that, then it’s time to check your implementation. Also remember that each view in analytics is limited to 20 goals, so use these wisely!

Additional Resources

Before setting anything new up in analytics, I recommend reading up on the subject to make sure that everything is done correctly and that you get the most accurate data possible. Here’s some recommended reading if you want to set up event tracking on your site:

Google Analytics Help Guide on Events

Google Developer Guide to Event Tracking

Do you use event tracking on your site? Have some tips or tricks you’d like to share? Add them in the comments!