Tracking Outgoing Clicks via Google Analytics

There may be an occasion where you have text or a logo or hotbutton on your website or a client website and you’re curious as to how many folks are clicking on it before leaving your website. Normally it’s not going to show up on your analytics and you possibly don’t want to go and add more complexity to your setup by installing a script or additional software but by modifying your links you can add some additional data for a campaign or simply assuage your curiosity.

OnClick Google Analytics Link Adjustment

Let’s have a look at our website Dinkum Interactive which offers an image link back to our Twitter account. We are limited in tracking the number of folks who sign up to our twitter account but where they come from remains a mystery. At the very least, we would like to see who is heading to twitter from our website via a button on our home page. Not very interesting but for the sake of an example, right now the code looks something like:

<a href=”http://www.twitter.com/mydinkum”><img src=”images/twittericon.png” alt=”twitter icon” width=”83″ height=”76″ /></a>

So the first part of that link is the destination, the second part is the source of the image file. We are mostly concerned with the first part which we will adjust to accommodate for the onclick and will look something like this:

<a onclick=”javascript:pagetracker._trackPageview (‘/outgoing/www.twitter.com’);” href=”http://www.twitter.com/mydinkum” target=”_blank”></a>

Then we would combine that with the image source code <img src=”images/twittericon.png” alt=”twitter icon” width=”83″ height=”76″ /> to give you your final link.

I use ‘outgoing’ but I know others use different names for that, plus I believe you can pretty much use anything to tag the outgoing URL landing page, you just need to be able to remember it when you’re checking your data which is why I like to keep consistent with it.

Checking Your Data

Now you’re going to have to head over to your Google Analytics account and make your way to the Content Section:

You will then go to Top Content which will display a list of your most popular pages.

Below this list will be a Filter option. Type in the relevant word here. I’ll use “outgoing” but I could also do www.twitter.com if i wanted.

This will reveal the details of visitors who have clicked on our link or logo or a hotbutton…or for you, whatever you have decided to track.

There may be occasions where something like this will come in handy, particularly if you are working with other websites who don’t have any form of analytics installed. You may need to let them know how generous you are and there’s nothing like hard and fast data to back you up.

Leave a Reply

Your email address will not be published. Required fields are marked *