Archive for February, 2009

Tracking Link Clicks to External Sites with Google Analytics

Friday, February 20th, 2009

Recently I needed the ability to track outbound/external links to one of my affiliates from my website, Husky Floor Liners. I love using the the “Site Overlay” feature in Google Analytics, but noticed that all of my prime links were showing that 0% of visitors were clicking on them! I then decided to change the links that were getting clicks to affiliate links, so that hopefully my sales would increase. After a few days, I went back into the Google Analytics Site Overlay feature and saw that now almost all of my links were getting 0% clicks. I then figured out that Google did not track clicks to external websites, and that the site overlay feature was ONLY for internal links. Blast.

My Solution

I began doing a lot of research, and found that it was possible to track external link clicks with Google Analytics using a little piece of Javascript in the link code. Here is the article on tracking outbound link clicks from Google Analytics.

The article was good, but I still had a few questions that took time to find answers to. After talking to my friend Amelia, who had already figured it all out, it became clear to me. I thought I would simplify the instructions and answer them here in a way that I could understand.

  1. Your Google Analytics code needs be at the top of the page in order to use the External Link Click tracking feature in Google Analytics. So, if you area already using Google Analytics, move the tracking code from the bottom of your page, to right after the <body> tag of your page.
  2. Add this code to your links: onClick=”javascript: pageTracker._trackPageview(’/outgoing/example.com’); For example, if you were linking to my site:(<a href=”http://andyisaacson.com” onclick=”javascript: pageTracker._trackPageview(’/outgoing/dumbwebguy’);”>andyisaacson.com</a>)
  3. Change the “/outgoing/example.com/” to whatever you want. You do NOT have to create that actual directory on your website. Whatever you put in the _trackPageview variable will show in your Google Analytics. So, if you want to specifically track a link to my website from your website, you could put whatever you want in there to help you remember. You could put: /outgoing/andyisaacson.com, /outgoing/dumbwebguy, /guythat/thinksheknowssomething, or anything. Just make sure that you dont have that actual directory on your website.

There you go! Its really easy. Like I said, the part that stumped me was what to put in the “/outgoing…”. The answer is that it does not really matter.

Now, use this feature to your advantage. In my situation I wanted to track every external link on my site to see which one had the best click-through’s. Unfortunately, the Google Analytics External Link Clicks do not track with the Site Overlay feature. However, you can still figure out which links are doing the best by seperating the tracking directories. I created a new tracking directory name for each link on my site. Here are some examples:

/huskyliners/buynowbutton
/huskyliners/homepagepicture
/huskymats/moreinfolink

I tried to simplify this and explain things as best as possible. Hopefully I did not make things more confusing. If you have any questions, please post in the comments box below.

Buy Now Button Colors

Tuesday, February 10th, 2009

I need everyone’s help today. It has been brought to my attention by more than one person that my typical red “buy now” button is too invasive. One example that I hear is that when people see red, they think “stop!” as opposed to when they see green, they think “go!”, like a stop light. This makes sense to me, but I keep seeing several big companies using red for their “buy” buttons. I have always figured that since big companies spend a lot on research, that they probably know what they are doing, so I copy them.

One website that refuses the typical “big red button” is woot.com. Woot used to be orange, but since their last re-design, the button has been yellow.

What is your opinion? Which of the following colors makes you want to click? Which of the following buttons makes you want to buy something, or at least click out of curiousity? At the same time, which of the colors makes you want to run away the most?

buynowaquabuynowblackbuynowgreenbuynoworangebuynowgreybuynowpurplebuynowredbuynowwhitebuynowyellowbuynowblue

We have Aqua, Black, Green, Orange, Grey, Purple, Red, White, Yellow and Blue. Which button makes you want to click, and which button makes you want to run away?