Call 0845 485 1219
Hello. This video is about event tracking within Google Analytics. Event tracking is used to send extra information of your choice into a Google Analytics report to enable you to understand a bit better what’s going on on-page, what users are doing, and some important information that you find relevant.
You can also find a detailed blog post on this topic here.
Event tracking can be used for a whole manner of different things. I’m going to cover some examples. But first, let me break down how event tracking works.
This is the sort of code that you might see when event tracking is implemented. Let me start at the beginning. We’ve got “onClick.” So this example is used when you want to track somebody clicking something on the site. So we put the whole piece of code with an “onClick” function. The “gaq.push” bit puts the data into Analytics, so that’s quite essential. And then we’ve got “trackEvent” to say this data is for event tracking. You might see other variations of this for things like “trackPageViews”.
So we’ve got “trackEvent,” and then we’ve got the specific information relevant to the event. So we’ve got three separate sections here. We have got the category and the action. These two are essential. So they’re not optional. Then we’ve got label. Label is optional, and you can put whatever you like in there. Then we have value. This is also optional, and it doesn’t have to be a numerical value. It could be a score. It could be any sort of number. I’ll cover some examples. But just think of that as a number.
Then we’ve got the final part, which I’ve put “true” up here. Basically, this final part is to state whether or not you want the event triggering to actually count towards your bounce rate or not. So events fire when something happens on the page. If you have something happening on the page and you don’t want it to impact the bounce rate, then you put the word “true” on the end of this. By default, without that, it would automatically affect your bounce rate. So somebody triggering an event would automatically mean that they have interacted with your site, thus they have not bounced.
So that’s how it works. We’ve got the two essential items and then the three optional pieces of information. What these then do is fire the data over to the events report, which is found under the Content section in Google Analytics, and this allows you to get that information in there. So you basically put the data in. You put in what you want your category to be called, your action, your label, and your value. All of that you put in. You choose what you want it to say.
So what you need to be doing when you’re thinking about using event tracking is to come up with a naming convention or a structure so that everything fits within sort of a regular pattern. You expect all your actions to actually mean what happened, and then the category to come break that down further. Because when you come to look at the data in Google Analytics, you’re going to want to be able to break it down and say, “Well, everything within this category, I want to know the total of what happened.” But then also you want to know, “Well, how many times did this specific action happen?” So by using a good naming convention, you can then put that data together and break it down how you want it to once the data is in Google Analytics.
So what do we use it for? Let’s start with some examples. The simplest form, I’ve basically explained already – onClick. When somebody clicks something, we want it to trigger an event. We might be tracking things like PDF downloads. We might also be tracking people clicking on external links. It could be internal links. It could be your adverts as well. It could be any kind of link. So we’ve got PDFs, links, ads. They could be tracking clicking on social buttons. They could also be clicking an “Add to Basket” button, for example.
Then you can also track clicks on things to external services. So if you’ve got a live chat function on your site, you might want to track clicks on the live chat button that opens the new window for somebody to have a chat in.
Then we can also expand that and take it to things like videos. We know when somebody clicks the Play button that they’re playing something. So if we were to track videos, we could track Play, we could track Stop, we could track Pause. Probably fallen off the bottom of the video there, but don’t worry. We can also track things like the duration watched. So if somebody watches your video, they press Play, and then 10 seconds later they hit Pause, we can then record that value. We can record the time in seconds, and so we can capture the duration.
That brings us on to other durations and things like that, that we can track. So there’s some on-page functionality that can be tracked. It’s things like the duration of a visit. Now, this is duration as timed by yourself rather than Google Analytics, or whatever value you choose to put in there.
We can also look at scroll reach. So that’s how far down a page somebody actually managed to scroll before they left the page or when they went up. So the furthest point down that they went. This is particularly important for things like blog post bounce rate. If your blog posts are seeing a really high bounce rate of 80%, and you think, “Well, nobody’s doing anything. They’re just looking at the blog post,” well, we want to know how many people are looking down the blog post and how many people are just opening it and then leaving. We don’t know.
So the duration and the scroll reach can both help us to work out who’s actually coming into the blog post and then leaving straight away and who’s actually coming in and reading it. So what we can then do is categorise people as readers of the blog post or not.
So we’ve got the scroll reach and the page, which is very beneficial, which brings us on to also tracking form completions. We’ve tracked sort of how far down a page people have got, but we can also track the percentage of a form that they’ve filled in, the percentage complete. We can track drop offs, so find out when they stopped filling it in. We can also track any errors that we see with forms. All of these, you basically fill out category and action and the other details if you need them, and then fire that over to Analytics, and suddenly you’ve got a whole host of extra information.
There’s still more. We could be using event tracking for additional ecommerce data. We could have things like shipping details. We could also have the stock levels. We can even track the price of the product and anything else about the product that we actually want to capture and pull into Analytics.
Analytics doesn’t have everything. If you’ve got an ecommerce website, you’re getting all your credit card and your transaction details in that particular platform, but you don’t get that in Analytics. So if we can tie that data in and pull it into Analytics, then we’re going to be able to make even better decisions about our websites and improve the results even further.
Some of the information will be relatively sensitive. It could be that you want to pull in things like the mark-up or sort of what profit you make on every product. If you were to do that, rather than putting this code straight on the page itself, what you can do is host it server side so that then users can’t break it down and have a look at it, because that’s sensitive information, and you don’t really want then to see that, especially as you’d be labelling your categories and actions very clearly and labelling exactly what it is. Some of this information we can put server side instead.
So we’ve got stock, price. We can also have payment type, just so that you can work out what works better, and also whether the conversion rates differ between PayPal users compared to credit card users. That can help you work out which ones are going to be more successful.
We can also look at seeing who’s been using discount codes. These can help you work out whether or not the discount code was successful, or even tying the discount code back to another code, maybe it was a discount code that you gave away in-store or over a TV advert. If they’re then using that discount code and you can set it as an event, you can then find out what those people were doing on the site, how they got to the site, where
they’re located, all sorts of Google Analytics information you can then tie back to this particular type of user.
We’ve also got additional things that people have done on site. So it could be leaving a blog comment. Then another interactive thing that you see on websites these days are reviews. Now, there are two sides to review tracking. We’ve got the ecommerce aspect of it. So we could say, “Well, this product has four stars. This product has three stars.” So label each of the products with what reviews, star rating they have. You can then use that star rating to break it down and say customers are more likely to buy a five star product than a four star. Or it might be the other way around. So you can find your conversion rates and see how much they differ, and you can also then maybe split test between showing the results and the reviews and not. Perhaps if they’re low enough, you might not want to show them.
So we’ve got reviews per product, but you can also track reviews being left. So products and reviews left. So there are two different sides to it. There’s what people are doing on site, and there’s what information is already there.
There are also things like, if somebody’s looking at a product, you might want to make a note of the size of the product, for example, and find out the flexibility or the options that people are willing to change to see which ones go best. We can also change that. We’ve got lots of ecommerce data there.
What we can also do is something completely different. We can take an external reference, an external piece of information and put that in. We could label our pages if you wanted, but that’s probably better done with custom variables. But here, we might want to pull in information.
So a couple of popular things that allow you to track rank. We’ve got an organic search that has happened, and then somebody’s clicked on your result. Now, your ranking software, your rank tracking, they’ll tell you that if somebody typed in that keyword, you’re fourth. But when they actually click it, maybe on that occasion, due to their location or their previous history, maybe you were shown second instead of fourth. You don’t know from rank tracking software where you exactly were when somebody clicked it, whereas you can get that information with Google Analytics.
So you put an additional bit of code on the page, and then you can see, when somebody’s typed in an organic keyword, where you were for that keyword. We then use a label field for the landing page, and the value field would be the rank. So if somebody was in first, then the value would be one. So that’s an example where the value doesn’t have to represent a numerical or a monetary value. It can be anything you want. So we’ve got rank tracking.
Other things that you could be tracking, if you’re really into doing a lot of SEO and you want to see the results of different types of pages, perhaps you could label your pages based on your SEO score, a sort of number given to you by tools such as SEOmoz tools. You could label each of your pages with what your SEO score is, and then find out which ones are performing better than others. Maybe you would find out that anything with a score less than 40 doesn’t bring in much organic traffic, whereas those above would.
That’s a very external piece of information. So any SEO data that you want could come in. It could be link data from Majestic perhaps. It could be anything. Pop that in as an event. It could be a static one for the page, or you could pull it in dynamically if the information changes regularly. Then you can start to cross-reference that with your Google Analytics traffic and activity data.
Another really interesting one that you can use would be to track game activity. So if you’ve got games on your site, then you could be tracking things like which games. You could also be tracking levels reached and also the score that users get. So if you’re tracking the score, you can start to work out how well people do and also where they drop off. If they drop off when they get to Level 5 of a particular game, or whether they often drop off when they’ve reached sort of 20,000 points and they can’t see where to go from there.
There are some really interesting pieces of data you can get from that. Now you might have that data reported in a games, sort of, software separately, and you might get that there. But to be able to tie it back and see, well, people coming in from this particular referral site then spend a lot of time playing games can really help you work out what’s working and what’s not. Also, some of this can be used for split testing as well, just to see what’s successful and what’s not.
So that’s some ideas. That’s literally a few minutes’ worth of ideas. Your website will be quite different. Every website will have its own set of events to track. But I wouldn’t recommend that you track everything for every website. Some of these you’re going to be able to make informed decisions off the back of, and some of them you’re not. Some of them won’t actually mean much to your actual website. So work out which ones are going to be beneficial to you, which ones you can actually do something with, and then implement the code for that.
This is an example of the sort of structure for an onClick piece of event tracking code, but as you can tell, some of these won’t be an onClick function. Some of them are dynamic. Some of them will be server side. So there’s a lot of different ways that you could use event tracking. Some of them more complex, but it can be very simple.
If you’ve got a PDF on your site, for example, you take this piece of code, you put in your category, your action, and your label, and even the value, if you have one, and then you add that information to the link. You just put that in around the HREF. So you’ve got HREF=, and you’ve got your link stuff, and then after that you just pop in this event tracking code. Then you have your anchor text, and then your link is now tracked, and you will start to see data in your event tracking report relatively soon.
So hopefully that has given you a very good overview as to what event tracking can be used for, why it’s beneficial, and all sorts of different things that you could be doing with it. There’s plenty more information on the Koozai blog and also on Koozai.com. If you’d like to interact at all, then check out the profiles that are about to come up on the screen. Thank you very much for listening.
Copyright © 2006 - 2014, Koozai Ltd