google-analytics-laptop
Web Analytics

A Guide to Event Tracking with Google Analytics

Why do we care about Event Tracking?

When using an Inbound Marketing strategy to generate leads, it is important to optimize every aspect of the campaign – from email copy to the color of the call-to-action button on landing pages. Sounds easy, but how do you go about optimizing these sorts of things? First of all, you need to be able to track how users are engaging or interacting with these pieces of the inbound campaign. When it comes to call-to-action clicks or links on a landing page the easiest way to evaluate the performance of a link is to literally track every click that matters.

Track every click…. No, really

So how do you “track every click?” Thankfully it’s not as hard as it sounds, and if you have Google Analytics installed, it is a breeze. If you haven’t installed it yet you, we’d recommend reading this post – “Installing Web Tracking: How and Why?”

If you already have Google Analytics up and running, you should already be viewing the data on a regular basis to see how users interact with your website.

This data allows you to easily draw conclusions to where users are coming from, or what inline links, images, call-to-action buttons, or pdf downloads are being clicked on. So how do we go about tracking those clicks or events?

There are a few options when it comes to tracking user engagement on a site and there are lots of options out there for 3rd party SaaS companies that will gladly provide you with the data. Those options will get the job done, but here at Ingenex, we prefer to install google event tracking on all links that we want to report on. This allows for more client collaboration and control to view website performance.

The Guts of Event Tracking

Google Analytics comes with a built-in function that you can customize to send data to your dashboard based off of user interactions. Below is an example of the base function, with placeholders for some of the attributes that will be explained in more detail.

ga('send', 'event', [Category], [Action], [Label], [Value]);

Category : Required

  • This value will be set to type of link is being clicked
  • Example Text: Button, Form, Video, PDF, Outbound Link

Action : Required

  • What type of interaction was taken on the link
  • Example Text: Click, Submit, Play, Download

Label : Not required

  • How you will distinguish this click from others of the same Category or Action
  • Example Text: Campaign Name, Form Name, Video Name, PDF Name, Website Name

Value : Not required

  • A number that is associated to the link.
  • Example Text: Price, Product ID

 

Making it Come to Life

Attaching this function to the click of a link will send google the information provided in the function so that you will be able to filter and analyze the data in your Google Analytics account. It is easy to install and there are a few ways to go about it.

1. Onclick

You can include the function directly on the link element itself using the onclick attribute:

<a href="http://ingenexdigital.com">CLICK THIS LINK OR ELSE</a>

(or)

2. Javascript Function

You can also send this function using Javascript of a Javascript Framework like jQuery.

<a id="button" href="http://ingenexdigital.com">CLICK THIS LINK OR ELSE</a>

<script>

jQuery('#button').on('click', function(){ 

     ga('send', 'event', 'button', 'click', 'Amazing Blog Post Link'); 
});

</script>

Tracked and Loaded

Once you have the functions in place the event tracking is ready. Based on your event interest, you now have the capability to track clicked links for pdf downloads, event invitations, outbound links, or whatever link-based trigger you want tracked.

You will now be able to monitor those events in your Google Analytics account by drilling down in the Behavior section to the Events tab. This event data will automatically populate within your Google Analytics dashboard.

For more tips, download our comprehensive Inbound Marketing Toolkit that includes all three essential guides to improve your marketing results.

 

Leave a Reply

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