
Originally Posted by
econcepts
This should work for you (from my previous post you referenced. I've got it on a few sites and it works ok. Are you pasting the code as indicated into the correct location in your admin? What type of results are you getting?
Hi Eric,
I think I have added the code correctly - see my code below as it appears on my site (minus account number etc.)
Code:
<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">
var pageTracker = _gat._getTracker("UA-XXXXXXXX-X");
pageTracker._initData();
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();
</script>
As I mentioned in a previous post, I have added the code you suggested, however GA still doesn't appear to be tracking image search data. In my GA account the searches still show as "google.com (referral)" then "/imgres" then if I try and found out the keyword it says "(not set)"