(828) 862-6667

Sitefinity Blogs


  • Little known Sitefinity configuration settings
  • More detailed examples for Sitefinity component usage
  • Work-arounds for Sitefinity limitations
  • Discoveries and Ah-Ha moments 

Tracking Google Image Referrals in Google Analytics

by Rich Winslow | Oct 11, 2010

If you've been using Google Analytics for the last year and you've been creating good optimized Alt Text attributes for ALL of your images, you have probably seen increased traffic from Google images (especially for a photographer's website).  However, we've not had any insight into what search terms the website viewer was using to get to the website.  Well someone figured out how to modify the Google Analytics javascript that you put on all of your webpages to record page views in Google Analytics.

You need to substitute your website code in place of:                         

                            UA-xxxxxx-x

Below is the javascript to use:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript" charset="utf-8">
try {
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
var ref = document.referrer;
if (ref.search(/images.google/) != -1 && ref.search(/prev/) != -1) {
var regex = new RegExp("images.google.([^\/]+).*&prev=([^&]+)");
var match = regex.exec(ref);
pageTracker._clearOrganic();
pageTracker._addOrganic("images.google."+ match[1],"q");
pageTracker._setReferrerOverride("http://images.google." + match[1] + unescape(match[2]));
}
pageTracker._trackPageview();
} catch(err) {}
</script>

The only problem is that this is not the latest Google Analytics script. I briefly tried to convert this to the new script but didn't have success. I searched on the web, but only found refers to this script. Thus I'd consider implementing it for image based websites where it is very important to track until there is new code.

4 Comments

  1. 1 NIKE FREE RUN 11 May
    Nike Free Danmark Your NT surely really does present greater employment stability along Nike Free 3.0 with pension check Nike Free Run 2 strategies when compared
  2. 2 jordan retro 11 01 May
    <b><a href="http://www.usajordan3.com/air-jordan-retro-9-C40.html">air jordan 9</a></b> hospital  <b><a href="http://www.usajordan3.com/">jordan 3 black cement</a></b>  blood <b><a href="http://www.usajordan3.com/air-jordan-retro-9-C40.html">air jordan retro 9</a></b> bank <b><a href="http://www.usajordan3.com/air-jordan-retro-19-C51.html">air jordan retro 19</a></b>  <b><a href="http://www.usajordan3.com/air-jordan-retro-12-C43.html">michael jordan 12</a></b> blood  <b><a href="http://www.usajordan3.com/air-jordan-big-size-C70.html">size 15 air jordans</a></b> but also convenient  to buy  .Because it is not the .
  3. 3 jordan 5 25 Apr
    presented "Kaikai people they love" <b><a href="http://www.buylouisvuitton1854.com/louis-vuitton-women-C1.html">lv bags for women</a></b> 200 <b><a href="http://www.buylouisvuitton1854.com/shoes-C37.html">white louis vuitton boat shoes</a></b> grams  <b><a href="http://www.buylouisvuitton1854.com/">louis vuitton handbag</a></b> of Gastrodia elata, and ground into a <b><a href="http://www.buylouisvuitton1854.com/shoes-C37.html">louis vuitton shoes sneakers</a></b> powder <b><a href="http://www.buylouisvuitton1854.com/louis-vuitton-women-C1.html">louis vuitton wallets for women</a></b> mixed in Cordyceps powder.Then, <b><a href="http://www.buylouisvuitton1854.com/louis-vuitton-women-C1.html">louis vuitton shades for women</a></b> the.
  4. 4 jordan sneakers 24 Apr
    evening news last June 14th, gucci travel wallet gucci outlet Mr authentic gucci belt bag Jiang of 35 years old in the gucci horsebit clutch District gucci trolley bag white gucci diaper bags on sale city.

Comment

  1.    
     
     
      
       

Why Give Our Secrets Away?

I often get asked why I'm willing to journal all of my Sitefinity discoveries. People think I'm insane to give away for free what I labored over at some point.

Let me answer that in 2 parts:

  • Why journal my discoveries?

    Because I forget and I want to a library of knowledge to refer back to. Oh but it is far worse than that... THREE TIMES now, I've gone to Google and searched for a solution to a problem, only to find MY OWN BLOG entry is #1 in Google and viola! there's the solution!
  • Why give it away for free?

    Because others have been kind enough to do it for us; what goes around, comes around.

    There are all levels of experience, thus someone with less experience may defer to us when needed.

    The lines of 'competition' are very much blurred; in our minds competition is a potential customer or partnership in the right situation.

    We maintain healthy partnerships with one of our competitors; they come to us when they need help and visa versa.

    There is plenty of work out there for everyone if you are putting out quality work and you are straightforward with clients and competition.

Talk to us about how we can help YOU!

 


Don't miss out!

Keep up with our Sitefinity discoveries!
Click on the RSS feed icon below or sign up for our newsletter.


Email Address:
     















Company Info  |   Contact Us  |   Site Map  |   Terms  |   Privacy Policy  |  

Automated Results Computer Consulting LLC, 222 South Caldwell Street, Brevard, NC 28712 (828) 862-6667