Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2010
    Location
    East Anglia
    Posts
    52
    Plugin Contributions
    0

    Default New Google Analytics?

    I've just been looking at adding Google Analytics to my store. I see I have to add some code to my site to do this. I looked through the add-ons and I found a tool to add Google analytics, but it was several years old as far as I can see. Furthermore it said it added the "ga.js” tracking code.

    Looking at the Google analytics page it says in a blue box at the top "if you're already tracking your website using either the urchin.js all the traditional ga.js snippet, first remove the snippet. Then it gives you some code to insert "just before the closing </head> tag". Well, I'm afraid I'm dumb enough not to be able to work out where that tag is generated. Somebody help me please?

    Cheers,

    Dave

  2. #2
    Join Date
    Oct 2008
    Posts
    254
    Plugin Contributions
    0

    Default Re: New Google Analytics

    You can add google analytics tracking code to the end of includes/templates/your_custom_template/tpl_footer.php

    Or there's also Simple Google Analytics which allows the choice of either ga.js or urchin.js

    http://www.zen-cart.com/index.php?ma...roducts_id=412

    but ga.js is the current google tracking code so I believe whatever mod you were looking at would have worked fine.
    Last edited by Kenichi; 6 Jul 2010 at 07:25 PM.

  3. #3
    Join Date
    Feb 2010
    Location
    East Anglia
    Posts
    52
    Plugin Contributions
    0

    Default Re: New Google Analytics?

    Thank you for your advice, but you have put your finger exactly on my problem. Simple Analytics uses the ga.js method which Google Analytics is telling you not to use now.

    Also, I'm sorry, but I fail to see how putting anything in a script named "footer" can result in it ending up before the </head> tag in the final page script. Then again I'm probably thick as two short planks on this, so I'll will be need to be advised how to do it.

    Cheers,

    Dave

  4. #4
    Join Date
    Apr 2007
    Location
    Herts. UK
    Posts
    890
    Plugin Contributions
    4

    Default Re: New Google Analytics?

    Hi,

    You can still use the old ga.js code for tracking if you want to use one of the add-ons. Google's new tracking code allows your pages to load faster though.

    You could try posting a help request in the GA add-on's support thread asking for the author to update it to use the new code.

    If you want to use the new code without using one of the Zen Cart add-ons then just create a file called jscript_ga.php , paste the tracking code into it then upload it to your[FONT=Verdana] /[/FONT][FONT=Verdana]includes/templates/{template_directory}/jscript directory (replacing {template_directory} with the name of your template).

    Regards,
    Christian.
    [/FONT]

  5. #5
    Join Date
    Feb 2010
    Location
    East Anglia
    Posts
    52
    Plugin Contributions
    0

    Default Re: New Google Analytics?

    Many thanks, Chrisian.

    I did what you suggested and all seems be working now.

    Thanks again,

    Dave

 

 

Similar Threads

  1. Google Analytics
    By Fir Tree Design in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 23 Mar 2011, 04:14 PM
  2. Google Analytics...
    By jimdidriksen in forum Basic Configuration
    Replies: 3
    Last Post: 5 Oct 2007, 11:22 PM
  3. Google Analytics
    By jrb1512 in forum All Other Contributions/Addons
    Replies: 15
    Last Post: 5 Dec 2006, 03:41 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR