How To Track Outgoing Links with Google Analytics

I use Google Analytics to monitor the traffic on Technically Easy. It is a popular, free tool that provides a wealth of information about the visitors to your web site. The problem that I find with Google Analytics is that it doesn’t track outgoing links to my blog. I would be interested to know how many of my visitors click on some of the provided outgoing links, such as my RSS subscription link.

I recently found the answer to my problem, and how I can use Google Analytics to not only track links to other pages in Technically Easy, but also the outgoing links to other sites.

Set Yourself some Goals

Within Google Analytics you can setup conversion goals for each of your web sites. Goals are web pages that your visitors reach once they have completed a transaction or a desired action on your site. For example, on shopping sites a goal would be defined as a “Thank You” or “Confirmation” page once a visitor completes an order.

When you setup a goal, Google Analytics will track various metrics against that goal. In the case of an outgoing link, I would like to see the number of visitors that clicked on that link.

Let’s have a look at how we can accomplish this task.

Note:

Signing up and using Google Analytics is beyond the scope of this post. If you need help with either of these two topics, there is much information online regarding how to accomplish them.

Creating a Goal to Track Outgoing Link Clicks

I will now provide instructions on setting up a goal to track the number of visitors that click on an outgoing link.

  1. Navigate to Google Analytics so you can see all your web site profiles.
  2. Next to the web site that contains the outgoing link you want to monitor, click the Edit link. You should now see the Profile Settings for the web site.
  3. Look for the Conversion Goals and Funnel section on the web page. All the current goals for your web site should be listed there, unless you don’t have any defined. Beside one of the empty goals (one that says Goal not configured), click the Edit link.
  4. The Goal Settings page should now be displayed. We will use the following values for our goal:

    Active Goal: On
    Match Type: Head Match
    Goal URL: A virtual name to an address. For my RSS subscription link I chose “/outgoing/rssfeed”. Remember this name as you will be using it shortly.
    Goal Name: A name that will help you to determine what the goal is for.

  5. Once you have defined your goal settings, scroll to the bottom of the page and click the Save Changes button.
  6. Now you will need to edit the link on your web site. Open up the page containing the outgoing link in an editor and find the link. Once you have found the link, change it to look like the following:
    <a href=[the outgoing link] onClick='javascript: pageTracker._trackPageview("[the name you created above]");'>
  7. Since the link calls the “_trackPageview()” JavaScript function, you will now need to move the Google tracking code before the call.

It could take 24-48 hours to display the results of the goal, but when they are displayed you should see them under the Goals section in Google Analytics.

Summary

This post provided a method of monitoring the outgoing links on your site. By using conversion goals, you can now determine the number of visitors that clicked on a specific outgoing link on your site.

Follow Me