Look a few posts below and you'll find the answer. You need to copy the file tpl_main_page.php from your template_default directory into your custom override template directory and then make adjustments to that. That is how you activate the template overrides.
If you have done this already, make sure you completed step 3 of the install.
If you think you have don all of this, view your site in a browser. While looking at it perform a 'view source'. Look for the Google Analytics tracking code on the page. Make sure it has your proper tracking id showing (if not you need to add that in the Zen Cart admin.)
If all that is in place and it still is not working you need to make sure you tell Google to "check the tracking" on the page so they know you have it in place and can start recording data for you.
Let me know if this helps.
If you provide a URL to the site that would help as well.
Thanks!
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
Hi,
I have been getting quite a few hits and a few sales from google image search. I thought it would be great if I was able track these image searches and see what keywords were being used etc. so I googled it and found this. Would it be possible to implement something like that using this mods "Google Custom Code - After" custom code entry feature?
Thanks![]()
@gafettape,
Yes you can track it with my module by simply adding a few lines of custom code. Version 1.2.4 of my Simple Google Analytics module will let you do this with either the ga,js version or the Asynchronous version of the tracking script. 1.2.3 will only let you do it with the Asynchronous version.
I wrote an article here on how it is done since I noticed many others were also looking for the answer to this. You can read that here: Image Search Keyword Tracking with Google Analytics.
In short, to add the ability of keyword tracking via Google Image Search you first need to determine the type of tracking code you are using.
Once you have determined that, all you have to do is go to the configuration section of my module (Admin > Configuration > Google Analytics Configuration) and in the section that says "Google Custom Code - After" add one of the following snippets (based on the type of tracking you are using):
ga.js users add the following:
Asychronous users add the following:PHP Code: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]));
}
Save that and now enable the custom tracking by setting the option that says "Add Custom Tracking After Main Analytics Code?" to "Enable".PHP Code: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);
_gaq.push(['_clearOrganic']);
_gaq.push(['_addOrganic','images.google.'+match[1],'q']);
_gaq.push(['_setReferrerOverride', 'http://images.google.'+match[1]+unescape(match[2])]);
}
Refresh your page and view the source to make sure the new tracking is in place.
Let me know how this works for you.
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
Thanks for your detailed response Eric, I'll give it a go sometime today and let you know how I get on.
One question: do I need to add or adjust anything in my Google Analytics account?
Thanks![]()
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
Thanks for your help Eric, I'll add that code now and let you know how it's going in a few days![]()
Hi Eric,
I added the extra code you suggested a few days ago, 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)"![]()
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
YAAAAAAAHOOOOOOO!!!
ahem.
It seems I had long ago played around with JAM for an affiliate program we never pursued. I had completely forgotten about it. Once I removed the directory associated with JAM, Google Analytics started reporting sales.
I was about to lose it there for a bit.
Whew!