Newb question:
What's the difference between using this download or just posting Google's tracking code directly to the "templates/custom/common/tpl_main_page.php"?
Newb question:
What's the difference between using this download or just posting Google's tracking code directly to the "templates/custom/common/tpl_main_page.php"?
---------------------------------
Barracuda Productions pure instincts
Hello I have a question about which file you check in step 2 of the readme. I am using the default template so my structure looks like:
cart/includes/template/template_default
I do not see a file in that template_default directory where they would be a body tag...as described in the readme:
2. Make sure your body tag in includes/templates/[your_template] includes this code (if not see trouble shooting below it is not neccassary but an addition to your template needs to be made):
anyone help point me to the right file to double check I have everything else except that.
Thanks-Khris
PS - I am using 1.37
Look for this file:
includes/templates/template_default/common/tpl_main_page.php
If one is using a different template then change "template_default" to the name of your template.
That should get you on track.
Rob
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
Hello,
I have installed the Google Analytics Mod and it works fine. Nevertheless, I have a small issue: My site runs in multiple domains (server-related issue).
Google says I must add two lines to the tracking code:
I already did this. Now the second thing they ask for is this:<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-12345-1");
pageTracker._setDomainName("none");
pageTracker._setAllowLinker(true);
pageTracker._trackPageview();
</script>
How can I do this? Please help me!Next, you'll need to add the _link function to any links between the domains. Please note that your analytics tracking code and calls to _gat._getTracker (shown in Step 1) must be placed on the page above the call to _link. If your current links look like:
<a href="https://www.secondsite.com/?login=parameters"> Login Now</a>
change them to:
<a href="https://www.secondsite.com/?login=parameters" onclick="pageTracker._link(this.href); return false;">Login Now</a>
3. If you send information between domains using forms, you'll need to use the _linkByPost function. Your analytics tracking code and calls to _gat._getTracker (shown in Step 1) must be placed on the page above the call to _linkByPost.
<form action="http://newdomain.com/form.cgi" onSubmit="javascriptageTracker._linkByPost(this)">
This will work even for forms where the method="GET"
Thanks a lot!
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
Just for the record...
there's no need for any mod...
i have no problems whatsoever in just copying and pasting the adwords code (as generated by google) into
the bottom of tpl_main_page.php
just need to wait for a while to take effect
then the next day, i checked...
the tracking of the website is fine...
btw, zencart is installed in root...
tks!
wee
True you can do this but that method will not allow you to fully and properly track ecommerce transactions or adwords conversion tracking. What it will give you is just statistics but they won't be very useful if you don't completely add the rest of the components so you can make more informed decisions.
If you pasted the "adwords tracking code" at the bottom of that page (you can ONLY get this code if you are running paid search and have conversion tracking turned on) you'll really have a mess on your hands when it comes to checking the effectiveness of your site. Adwords conversion tracking should only appear on the thank you page after a sale has been completed to accurately record data.
If you added the "Google analytics tracking code" (very different from the adwords conversion tracking code) to the bottom of that page then as stated above you will only receive general stats on all pages of the site. Ecom tracking code (part of google analytics) needs to also only appear on the thank you page or it will not work.
So it is possible to take the route you did, but your analytics data will be incomplete and provide incorrect data if you do so.
Last edited by econcepts; 14 Apr 2009 at 07:30 PM. Reason: added clarity
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
Jeasus I'm getting tired of this! Thanks btw for helping out with the "install" instructions of the code, much appreciated!
Anyhow, the code doesn't show up in my shop. I've read post #888 (and several more). I've narrowed it down, i.e. I know i'm working in the correct file (my_template/custom/tpl_main_page.php), but I can't get it to work anyway. To be, as far as I know, 100% sure I added two comments, namely <!-- A --> and <!-- B --> respectively.
1. my_template/custom/tpl_main_page.php
--> source codeCode:<!--eof- banner #6 display --> <!-- A --> </body> <!-- B -->
2. my_template/custom/tpl_main_page.phpCode:<!--eof- banner #6 display --><!-- A --></body><!-- B --></html>
--> source codeCode:<!--eof- banner #6 display --> <!-- A --> <?php require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php'); ?> </body> <!-- B -->
Can someone pleeeease tell me what i'm doing wrong? Since I'm seeing <!-- A --> I have to be editing in the correct file, right?Code:<!--eof- banner #6 display --><!-- A -->
I'm running 1.3.x and the $zv_onload is there. I'm still able to access the settings via Admin --> Configuration --> Google Analytics. I do not type the code, I copy paste it from the readme.