Forums / Templates, Stylesheets, Page Layout / How do I insert google analytic to my zen cart website?

How do I insert google analytic to my zen cart website?

Locked

Views: 1,792

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
28 Jun 2009, 6:37 AM
#1
sunzhoujian avatar

sunzhoujian

Zen Follower

Join Date:
Jan 2008
Location:
China
Posts:
154
Plugin Contributions:
0

How do I insert google analytic to my zen cart website?

How can I insert the belowing information of google analytic to my zen cart website? Where should I do with index.php or with other page? There don't seem to hvae /body tag, can I still use that? What is your experience of using google analytic then?

/////////////////////////////////////////////////////////////////////
Copy the following code block into every webpage you want to track immediately before the </body> tag.
If your site has dynamic content you can use a common include or a template. Learn More

Use this tracking code to gain access to a wide range of exciting new features as they become available.

<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3ipt src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-9532363-1"); pageTracker._trackPageview(); } catch(err) {}</script>
28 Jun 2009, 6:38 AM
#2
sunzhoujian avatar

sunzhoujian

Zen Follower

Join Date:
Jan 2008
Location:
China
Posts:
154
Plugin Contributions:
0

Re: How do I insert google analytic to my zen cart website?

sunzhoujian:

How can I insert the belowing information of google analytic to my zen cart website? Where should I do with index.php or with other page? There don't seem to hvae /body tag, can I still use that? What is your experience of using google analytic then?

/////////////////////////////////////////////////////////////////////
Copy the following code block into every webpage you want to track immediately before the </body> tag.
If your site has dynamic content you can use a common include or a template. Learn More

Use this tracking code to gain access to a wide range of exciting new features as they become available.

<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3ipt src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-9532363-1"); pageTracker._trackPageview(); } catch(err) {}</script>

Also, what are those good google key world these days?

16 Aug 2009, 7:49 PM
#3
lonny777 avatar

lonny777

New Zenner

Join Date:
May 2009
Posts:
2
Plugin Contributions:
0

Re: How do I insert google analytic to my zen cart website?

sunzhoujian:

How can I insert the belowing information of google analytic to my zen cart website? Where should I do with index.php or with other page? There don't seem to hvae /body tag, can I still use that? What is your experience of using google analytic then?

/////////////////////////////////////////////////////////////////////
Copy the following code block into every webpage you want to track immediately before the </body> tag.
If your site has dynamic content you can use a common include or a template. Learn More

Use this tracking code to gain access to a wide range of exciting new features as they become available.

<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3ipt src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-9532363-1"); pageTracker._trackPageview(); } catch(err) {}</script>

It makes no sense to insert it into EVERY page, just insert the Google Adsense code ONCE from your Google Analytics account into the FOOTER file of your templates folder in "includes/templates/CUSTOM_TEMPLATE/common/tpl_footer.php"

Do NOT insert the code from sunzhoujian above since that goes to HIS Analytics account

:clap: