If you have a website or blog, you most likely have Google Analytics installed on your site to track sessions and engagement. You may have even recently installed Google’s Universal Analytics system in order to learn more about your audience’s demographics. However, how do you know just what your audience is doing on your site?

Let’s say you have an email opt-in form on your page. How do you find out if your viewers are successfully signing up to your email list? Perhaps you’ve uploaded a huge white paper to your site. What if your readers are having trouble downloading your materials?

The answer to these questions lies in Google Event Tracking. You can use Event Tracking (ET) to discover if visitors are expressing interest or apathy in your products, if they are being stymied by a technical issue, or if their interest is increased/decreased due to a design/text/image change you’ve recently made. In this way, by tracking audience behavior and not just activity, you can better grow your audience as well as your revenue. 

How to start using Google Event Tracking

To get started with ET, you’ll first need to sign up for a Google Analytics account and install its web tracking code on your website or blog. You’ll also need to add the Classic Analytics ga.js code (or the Universal Analytics analytics.js code) to every web page on which you wish to do ET. If you have a WordPress site, you can download the Google Universal Analytics plugin and have it automatically add your (Classic or Universal Analytics) code to each page footer.

Want more money?
This video will show you the simplest and fastest way to make money online today. Watch it for free right now.

Now for the good news: Google Analytics is already integrated with ET, so you don’t have to do anything extra to get your Analytics program to recognize this feature. You simply add a specific ET code to each link you generate on a sales page, button, text link, etc. to feed visitor behavior information into Analytics. What does ET code look like?

How to create an Event Tracking array

The basic format of a single ET code snippet, or an array, looks like this:

Google Event Tracking

What do these arrays mean?


This is the tracking code that feeds visitor behavior information into your Google Analytics account.

trackEvent/send Event

This is the JavaScript method that begins the array.


The basic description (e.g., video, ad, link) that you can use to categorize your event.


The action that a visitor must fulfill in order to realize the event (e.g., view, click, play).


This optional value helps you customize your events by giving them a specific URL, name, user-provided value, etc.


This optional value is a number and may refer to the price of the event, its time limit, etc. Because the value is a number, no quotes are needed.


This optional value is usually set to ‘true’ or ‘false’ and measures whether your event contributes to your bounce rate. In other words, if you consider the event to be a true interaction event, you can set your non-interaction value to ‘True.’ Incidentally, the default for this value is ‘false,’ meaning that event actions will normally be added into your bounce rate.

Event Tracking examples

Let’s assume that you’ve uploaded a white paper to your website that you’d like for your audience to read. You could embed the following code within your white paper link if you’re using Classic Analytics:

<a href=”http://www.readmywhitepaper.com” onClick=”_gaq.push([‘_trackEvent’, ‘Downloads’, ‘click’, ‘Whitepaper’, 0, True]);”>My Great White…Paper</a>

In this example, the values run as follows:

Category: Downloads

Action: Click

Label: Whitepaper

Value: 0

Non-interaction: True

Translated from JavaScript, this series of values indicates that you are measuring white paper downloads via user clicks. The white paper itself is worth $0 and its download is being interpreted as a true user interaction with the site.

Making money online has never been easier...
And this free video will show you exactly everything you need to do to get started. Click here to watch it now.

Here’s another ET example:

<a href=”http://www.mywritingclass.com”onClick=”_gaq.push([‘_trackEvent’, ‘Registrations’, ‘Click’, ‘writingclass’, 100, True]);”>Register Here</a>

In this example, can you guess that the event being measured is writing class registration at a cost of $100? If yes, then you’re figuring out Google ET quickly. Also, more information about Classic Analytics or Universal Analytics ET is available via Google.

More coding explained (if you’re ready)

You may have noticed that the array examples provided above begin with the syntax “onClick.” This event attribute syntax sets the script to run and gather information when users click on your provided link. In the examples above, those links are My Great White…Paper and Register Here.

Other event attribute syntaxes exist if you’d rather gather information from visitors scrolling down a page (“onscroll”), or inputting contact information into your opt-in area (“onforminput”), or taking another action altogether. A complete list of codes is provided here.

However, if you’re happy just measuring user clicks, you can simply change the values provided in the examples above and run with those arrays for a long time.

The end result in Analytics

At the end of the day, you want your ET arrays to provide you with valuable behavioral data about your site visitors. What do these data look like in Google Analytics? Here are a few examples:

In this case, the event was visitors playing a video:

Image credit: blogoscoped.com

Notice how there are actually four events being tracked for the video- the video play, forward, stop and pause. In this example, the data are showing that a good majority of visitors are playing the video without leaving it early. Of course, there is also some room for improvement too.

Here is another ET example with e-commerce values displayed:


ET ecommerce
Image credit: PersonaQuest

In this example, the event was A/B split tested to measure responses from two visitor groups. Conversion rate and revenue per visitor were also noted for each test. Thus, as can be derived from the example above, ET is a very useful tool for measuring user response in terms of sales and site revenue.

Is Event Tracking worthwhile?

If you can become just a tad bit comfortable with using JavaScript and Google Analytics, ET can be a veritable goldmine of information, providing you with a glimpse of what your users are doing – and having trouble with – on your website or blog. This information can help you better tweak your campaigns and/or start new ones. It can also help you ramp up your site revenue, which translates to more money in your pocket over the long run.

READ THIS NEXT: How to build a full-time income online with no experience

Join the Discussion

  • Jamie Knop
    Jamie Knop

    Great guide Halina.

    Event tracking is important especially when it comes to a/b testing things.

    I created a sweet little tool people can use who are not confident in coding. You can see it here if you like http://www.seoweather.com/google-analytics-event-tracking-code-generator/ it might be good for other people reading this article as well.

    • Halina Zakowicz
      Halina ZakowiczAuthor

      Hi Jamie, I really like this tool- thank you for recommending it!

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