So far in this series we have learned about some basic metrics to better understand the information provided by our web analytics programs. How about tracking individual links and tracking downloads? Let's dig in deep and try to understand how to use Google Analytics to better understand the visitors behavior on our blog by tracking links.
Tracking Outbound/Internal Links And Downloads
If our blog's bounce rate is high, we may be interested in identifying 'Exit Pages' that are getting maximum bounces. Just by viewing the 'Exit Pages' report, we cannot correctly determine those outbound links through which we are losing our traffic. For that, we can add some analytics code to those outbound links that we want to track. Suppose, we want to track an outbound link 'http://www.externalsite dot com/'. For that, we have to add one more attribute to the link code as shown below.
The directory structure we have used is a logical one and we can use any name for it. For example, you can name it as '/outlinks/3rdlinkonXpage'. But to keep it simple and easy to understand we can create a logical directory 'outbound' to track all outbound links on our blog. Similarly if we are tracking internal links, we can use the directory structure as '/inbound/somelinktopost....'.
Note: To make it work correctly, your analytics code must be placed before _trackPageview calls. The ideal place is just after <body> tag as shown below.
/* Analytcis Code that you normally place just before </body> tag at bottom */
Fine Tuning Tracking
Now let's go one step further and take some a bit complex case. It can be possible that a same external link is present in several blog posts and you want to track each one of them. In this case, the best way to track identical outbound links is to add an extra attribute to the logical directory structure to make it more understandable while viewing the reports.
You can add post ID to the directory structure to identify a common external link that is present in multiple posts. Here is an example.
In this example, same link in present in two posts having post ID's 234 and 12. After applying the modified directory structure as shown above, you can easily identify which post's link was clicked. A more friendly directory structure can be made by picking the first 20-30 characters of post title and using it in place of post IDs.
Similarly, we can also track downloads that we may offer on our blog. For example, suppose you are offering Blogging.pdf and seo-secrets.mp3 (2 downloads) free to your subscribers. To track these downloads, add the .trackPageview() call to the download links with a proper directory structure.
Note the directory structure used for tracking the links. In the above example, all downloads will be tracked through a logical directory downloads. We can further divide the downloads according to the file type by giving additional sub-directory for each file type.
Important: To view all the reports related to link tracking, go to 'Content -> Top Content' in your GA dashboard.
1 . Blog Traffic Analysis Demystified: Part - 1 (Hit Rate)
2 . Blog Traffic Analysis Demystified: Part - 2 (Sessions)
3 . Blog Traffic Analysis Demystified: Part - 3 (Advanced Segmentation)