Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Jan 2008
    Location
    Memphis, USA
    Posts
    299
    Plugin Contributions
    0

    Default Google Analytics javascript placement

    Without using the Google Simple Analytics mod could one just create a folder and file within "your template" and copy and paste the javascript from google into that folder to get the same result?

  2. #2
    Join Date
    Jun 2004
    Posts
    613
    Plugin Contributions
    0

    Default Re: Google Analytics javascript placement

    just find the file with

    </body>

    in it and paste it above that (put a copy in your template folder)

    (common/tpl_main_page.php)

  3. #3
    Join Date
    Jan 2008
    Location
    Memphis, USA
    Posts
    299
    Plugin Contributions
    0

    Default Re: Google Analytics javascript placement

    Thats what I thought. Thanks for the confirmation.

  4. #4
    Join Date
    Feb 2008
    Location
    Natanya, Israel
    Posts
    9
    Plugin Contributions
    0

    help question Re: Google Analytics javascript placement

    Quote Originally Posted by coucho View Post
    Without using the Google Simple Analytics mod could one just create a folder and file within "your template" and copy and paste the javascript from google into that folder to get the same result?
    How do you add the code to all the pages?

  5. #5
    Join Date
    Feb 2008
    Location
    Natanya, Israel
    Posts
    9
    Plugin Contributions
    0

    Default Re: Google Analytics javascript placement

    Thanks Mike.

  6. #6
    Join Date
    Feb 2008
    Location
    Ontario, Canada
    Posts
    14
    Plugin Contributions
    0

    Default Re: Google Analytics javascript placement

    I tried using the Google Analytics mod on my Zen Cart and I kept getting that stupid "secure and non-secure pages" pop up. I combed the code to try to figure out what the problem was, but couldn't figure it out. I finally ended up removing it and all my secure pages worked perfectly. So am I losing out on anything by not using the mod, if I just paste my GA code into my common/tpl_main_page.php file?

  7. #7
    Join Date
    Jan 2007
    Location
    1.5 miles from Home
    Posts
    674
    Plugin Contributions
    0

    Default Re: Google Analytics javascript placement

    Quote Originally Posted by burgundy View Post
    I tried using the Google Analytics mod on my Zen Cart and I kept getting that stupid "secure and non-secure pages" pop up. I combed the code to try to figure out what the problem was, but couldn't figure it out. I finally ended up removing it and all my secure pages worked perfectly. So am I losing out on anything by not using the mod, if I just paste my GA code into my common/tpl_main_page.php file?
    Have you check out the Google Analytics Support thread?

    http://forum.zen-cart.com/showthread.php?t=53701

    M

  8. #8
    Join Date
    Jan 2008
    Location
    Memphis, USA
    Posts
    299
    Plugin Contributions
    0

    Default Re: Google Analytics javascript placement

    Quote Originally Posted by burgundy View Post
    I tried using the Google Analytics mod on my Zen Cart and I kept getting that stupid "secure and non-secure pages" pop up. I combed the code to try to figure out what the problem was, but couldn't figure it out. I finally ended up removing it and all my secure pages worked perfectly. So am I losing out on anything by not using the mod, if I just paste my GA code into my common/tpl_main_page.php file?
    The new analytics mod by Andrew has a reference to http://www.example.com in the javascript. That is why you get the secure/unsecure warning. I tried this mod too and got the same result. You can either go in and remove any reference to these example pages in the code or just add the google javascript to the footers in your store. I did this and my google analytics reports work great. Adding the javascript to the footers also allows you to add the more advanced javascript from google for more detailed reports.

  9. #9
    Join Date
    Jan 2008
    Posts
    32
    Plugin Contributions
    0

    Default Re: Google Analytics javascript placement

    I'd like to do this trick, too! Only I'm using a template and in my /common/ folder there's only a file named tpl_header.php. No tpl_footer or tpl_mainpage...

    What can I do?

  10. #10
    Join Date
    Jan 2008
    Location
    Memphis, USA
    Posts
    299
    Plugin Contributions
    0

    Default Re: Google Analytics javascript placement

    Quote Originally Posted by deivid View Post
    I'd like to do this trick, too! Only I'm using a template and in my /common/ folder there's only a file named tpl_header.php. No tpl_footer or tpl_mainpage...

    What can I do?
    You can add the code to the header code too.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Javascript window.onload=function placement
    By usr50 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 11 Apr 2011, 10:53 PM
  2. Google Analytics
    By djdavedawson in forum General Questions
    Replies: 10
    Last Post: 23 May 2010, 12:45 AM
  3. Google Analytics
    By muah in forum General Questions
    Replies: 25
    Last Post: 20 Jun 2009, 08:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg