I don't have the page /includes/templates/[your_template]/common/tpl_main_page.php, what shall i do? Thanks!
I don't have the page /includes/templates/[your_template]/common/tpl_main_page.php, what shall i do? Thanks!
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![]()
Still fighting Google... I'm convinced my problem is on the Google side. My client has a user number with Google that's tied to AdSense. Because I'm the one who looks after his site, I created the Analytics account with my user number. Apparently, this makes the Google unhappy.
The next thing is for me to try is to delete my profile for his site and use his. I don't know if anyone else has experienced a similar situation; but, I'll post back if it works.
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
What problem are you actually experiencing? As long as you use the number associated with their domain profile you should get tracking. It doesn't matter where the account is setup or what it it tied to. The only reason you might want it under their name is so they can access it without needing access to your own account.
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![]()
Bookmarks