Earlier, we wrote about how to install Google Analytics in WordPress, and we have received tons of questions from our users. One of the most commonly asked question was how to track links in WordPress using Google Analytics? Well in this article, we will show you how to track links in WordPress using Google Analytics.
Before we answer that question, lets first talk about why would you want to track links in Google Analytics?
The general idea people have about Google Analytics is that it tells you how many vistors and pageviews you are getting, where the traffic is coming from, and what content is popular on your website. All of that is correct. However, Google Analytics can also provide you information about what users do when they come on your website, which banners or links they click the most, what product placements are working better on your website, which social media campaigns are bringing you more traffic, etc. For example, let’s say that you have a page on your blog where you sell an ebook. You publicize this page through twitter, facebook, various banner placement on your website, email newsletter, etc. Without tracking those metrics, how do you know which method is working the best? Maybe you have the ad for your book in your sidebar, in your footer bar, and after your post content. By tracking those links, you can find which one is working the best. Maybe, the footer bar and the after post banner is working the best, but your sidebar ad is not. Then you should get rid of the sidebar ad and focus on the other two placements. Perhaps, you can try improving your ad and then do A/B testing. By tracking links, you can greatly improve your website by getting rid of items that don’t work and optimizing the ones that do.
Tracking links in Google Analytics using UTM Source
Google Analytics has this amazing feature called custom campaigns. To use custom campaigns, you add UTM parameters to your URL which are then recorded in your custom analytics report. Google Analytics even has a URL Builder tool where you can generate a URL with UTM parameters.
In the example above we have created a link to be shared on Twitter, as a tweet.
utm_sourceparameter identifies the source of traffic this could be a site, a social media network, newsletter, app, etc. In this example we have used Twitter.
utm_mediumparameter is used to describe what kind of medium we have used, in this example we have used a Tweet.
utm_campaignparameter to define a campaign name, slogan, promo code, etc.
utm_termparameter is used to identify paid search keywords.
utm_contentYou could be using a variety of content types in a campaign, this element allows you to differentiate among them.
To view stats for your custom campaigns go to Google Analytics Reporting » Traffic » Sources » Campaigns and you will see something like this.
Tracking Out-going Links with Google Analytics
With Google Analytics, you can also track outbound links on your website. Outbound links are the links which take visitors from your website to some other site on the web. Understanding which external links are most often clicked on your website will help you understand what kind of information users are looking for. This will allow you to plan your content strategy accordingly.
First thing you need to do is install and activate the Google Analytics for WordPress plugin. If you already have Google Analytics code inserted in to your WordPress blog, remove that code. Once you are sure that your WordPress site does not have Google Analytics code, go to Settings » Google Analytics. Authenticate your Google Analytics profile or enter UA-Code manually. UA code is the unique identifier for each Analytics account you create. This UA code can be found next to your website’s profile in Google Analytics Dashboard.
If you use an affiliate plugin to format your affiliate links into something like this http://www.example.com/out/ then you will have to enable tracking of internal links as outbound links.
To view the outgoing links, go to your Google Analytics account. In the sidebar click on Content » Events » Top Events. You will see
outbound-article as the top event. Clicking on it will show you a list of outgoing URL(s) users clicked on your website.
Google Analytics is a very powerful tool. It not only helps you learn about your visitors and popular content, but you can also use it to develop strategies to further optimize your WordPress blog. We hope that you find this article useful. If you have used either the UTM tracker or outbound link tracking in the past, then let us know of your experience. If you are using something else, then please share that in the comments below. This way all of us can learn from each other.