Part 2: The pros and cons of Event Tracking by Lukas Oldenburg |
|
| Welcome to part 2 of this series on how to track on-site campaigns, for example, teasers on your homepage. After taking a deeper look at In-Page Analytics in part 1, we are now going to dive into the world of Event Tracking and Virtual Pageviews and offer you a script that will track all the clicks on your homepage by default.
One of the best things about In-Page Analytics was that you don’t need to add any code to your page or alter your links. With Event Tracking or Virtual Pageviews though, there is no way around some additional coding. Event Tracking or Virtual Pageviews? Almost the same happens with Event Tracking. To stick with our example, when somebody clicks on a teaser link, you can tell Google Analytics to track this as an Event. The major difference is that Event Tracking doesn’t create fictional Pageviews and thus doesn’t inflate your Pageview-based data. Imagine that every click on every teaser on your homepage was tracked as an additional Pageview. That would skew your data a lot because it also has a major impact on other data like Bounce and Exit Rate, Pageviews per Visit etc… I prefer Event Tracking Technical Implementation of Event Tracking If you have only a few links to track and technically prone editors, this might be a viable way. In other cases, you can do the following:
The script allows you to track every teaser link without adding anything but a class to your links. If you know a little Javascript, you’ll even find methods to identify teaser links without having to add an extra class (for example by identifying them as all links in a div container with the id of “teaser-box” or whatever your website uses). What the script above does:
As you can see in the next screenshot, this allows some insightful analysis (my exmple is in German, so the “from – to” becomes “von – zu”). For instance, you can now sort by “from {your homepage URL}” to get all the links on your homepage, or you sort by “to {destination page}” to see which teaser page did the best job in bringing people to that page. Another great thing about this is that you can export this data (unlike with In-Page Analytics) via the Google Analytics API to Excel (we use “AutomateAnalytics” Excel functions for fetching GA data) or other places. Say you want to see which on- or off-site campaign brought how much traffic to which of your new articles. With this Event Tracking script, you can end up with a neat table that displays the Pageviews generated by your newsletter right next to the clicks generated by your homepage teasers (see next screenshot for an example). Note that Events and Pageviews will overlap though, because a person that has arrived at your article via your newsletter might well go to your homepage and click on the teaser to the same article again. The Pros and Cons of Event Tracking for on-site campaign tracking: Pros:
Cons:
Conclusion: It is also a very good alternative or addition to In-Page Analytics: It works no matter if your page has mostly static, dynamic or rapidly changing content, you can access historical data at any time, and you can export it for more nasty things in Excel & Co. Lukas Oldenburg is a featured blogger for Web Analytics World, you can read his latest articles here |
|
