Google Image Search Traffic how to make it suck less

Getting more value out of Google Image Traffic

Improving the Usefulness of Google Image Traffic

Today I want to talk about the traffic that you get via google image search.

This really is crappy traffic, not least because google hides your site behind some obscure greyed out div layer and presents the image to the visitor smack bang in the middle of the screen blocking out the lovely site you spent so much time working on.

Now when presented with this most users simply click through to Full-size image and resultantly bounce like a fat man on a water slide… What’s worse is in Google Analytics the traffic shows as “referrer” traffic with “”(or other tld) as the referrer which is double shitty.

If you are doing SEO work for a client and they are receiving a large number of visits from google image results then you can probably relate to this pain in the arse. Also if you have ever looked in Google Analytics and been dumbfounded as to what the referral traffic from Google was, well, now you know.

Now, what of there was a quick way to turn that shitty bouncy bouncy google image traffic into less shitty less bouncy search engine results traffic? Wouldn’t that be jolly good?

Well, hope is at hand. All we need to do is add a few lines of php to the top of our header file that will check the referrer of the traffic, then if the referrer is google images, break out of the frameset that google image results put us in and show the original site that the image is from.

This serves two purposes, firstly the visitor gets to see your site and see the image in the context you intended it to be seen in, giving you a proper page impression but secondly it also records this traffic in google analytics as “Search Engine” traffic rather than “Referring

Sites”. This is killer if you are working on a site for a client or want to increase the share of search engine traffic on a site you intend to sell. So by implementing these few lines of code you can literally incrase your recorded search engine traffic overnight, one site I used this on saw a 40% increase in search engine traffic (shown in Google Analytics) overnight.

Simply paste this into your sites code, (Protip: the higher up the page code the more effective it works, for best results it should be the very first lines of code in your page)


$ref = isset($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : null;
if (preg_match("/imgres/", $ref)){
echo "&lt;script language=\"JavaScript\" type=\"text/javascript\"&gt;if (top.location != self.location)top.location = self.location;&lt;/script&gt;";


Adding it to the top of your page means its the first piece of code to execute which speeds the while thing up. How the code works is pretty simple.

  1. Check what the referrer of the traffic is, if the referrer contains the phrase “imgres” in the url then run the javascript, If the referrer doesnt contain “imgres” do nothing.
  2. The javascript checks if the URL in the browser is the same as the url of the document (if not then we are in a frameset)
  3. If the Javascript detects that we are in a frameset, flip out and redirect to the documents URL

Try it out for yourself :)