When do we use event tracking, and what is it mostly used for? Well, the reasons why we use event tracking is because there are limitations of Google Analytics standard tracking code. Placing in that piece of code on every page of the website does get us most of the information we wanted, however there are some limitations such as:

  • Google Analytics’ standard tracking code gives us information on the navigation path of a visitor, say from page A to page B. However what if there are 3 links on page A that can bring a visitor to page B, and we wanted to know which is the most popular link?
  • Not able to track the number of times your pdf guide had been downloaded
  • Not able to find out how many times your embedded video was being viewed

Event tracking allows us to find out what’s working and which link is converting better, and this in turn gives us the information to make appropriate decisions based on the data. For event tracking to work, other than having the standard tracking code on every page of the website, we also need to append some codes to the link you want to track.

Using Event Tracking to Overcome the Limitations

To overcome those limitations and track our internal links properly, we need to use Event Tracking in Google Analytics. This is a very versatile feature that can give you lots of metrics and insight on how to optimize your website to be better.

Make sure that your Google Analytics code had been implemented

In this guide, the Universal Analytics tracking code is used. If you have not implemented the tracking code, below are the step:

  • click on the “Admin” tab at the top navigation bar
  • next choose the Account and the Property (i.e website) that you want to track
  • in the Property column, click on Tracking Code

google analytics event tracking

Your Universal Analytics tracking code should look something like this

<script>
 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
 })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

 ga('create', 'UA-yourtrackingID-1', 'auto');
 ga('send', 'pageview');

</script>

There are 4 parts to an Event:

  1. Category (required)- it’s a name you given for a group of similar objects. Common categories being used include Downloads, Videos, Promotion, Affiliate links, etc
  2. Action (required) – the action that the user does. Depending on the activity, it can refer to PDF download, clicking on a promotional Banner Image, pressing the video player on your blog: Play, Stop, Pause, etc
  3. Label (optional, but recommended). This is used to make it easier for you to identify your event out of the many you may have.
  4. Value (optional) – this is a numerical value that you attach with the event. Must be a positive integer. It can refer to the counting of money, time, or to indicate the importance of the event, etc

Typically, the string of codes that you need to append to the link that you want to track looks like this:

ga('send', 'event', [eventCategory], [eventAction], [eventLabel], [eventValue])

For example, if you want to track the performance on a link promoting your web hosting trial, your hyperlink becomes this:

<a href="ab.com/c.html" onClick="ga('send', 'event', 'promotion', 'trynow', 'web hosting trial', 5);">try web hosting trial now</a>

 

For WordPress Users : Using the Google Analytics plugin by Yoast

For WordPress owners, you have the alternative of using a plugin to save yourself the headache, plenty of time and effort. After installing and activating the free Yoast plugin, just determine your settings, and it’s ready to go!

Settings:

  • General tab > choose your profile and provide authentication
  • General tab > check the box “Track outbound click and downloads”. This is for event tracking.
  • Universal tab > check the box to enable Universal Tracking
  • Advanced tab > choose track downloads as events
  • the rest of the settings, you can just leave them as they are

google analytics yoast

Reviewing your Events Performance

To see how your links are performing, choose the View, then go to Behavior > Events > Overview.

google analytics event overview

With this guide, we hope you gained a better understanding on the concepts and using event tracking in Google Analytics.

FOLLOW

lincoln

Lincoln is a fan of Apple products, loves red wine and traveling. He blogs on internet marketing, social media, wordpress tips & guides, and using technology to maximize efficiency. Follow him on Twitter or Facebook for regular updates.
FOLLOW
Tagged with →  

Leave a Reply

Your email address will not be published. Required fields are marked *