Page 3 of 68 FirstFirst 123451353 ... LastLast
Results 21 to 30 of 672
  1. #21
    Join Date
    Aug 2004
    Location
    Saint Petersburg, Russia
    Posts
    1,786
    Plugin Contributions
    13

    Default Re: Google Analytics Integration

    For 1.2.x insert code from jscript_google_analytics.php to html_header.php

  2. #22
    Join Date
    Aug 2004
    Location
    Saint Petersburg, Russia
    Posts
    1,786
    Plugin Contributions
    13

    Default Re: Google Analytics Integration

    For zen-cart 1.2 you may use this jscript_google_analytics.js:
    Code:
    /**
     * jscript_google_analytics.js
     *
     * @package zen-cart statistic
     * @copyright Copyright 2005-2006 Andrew Berezin
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: jscript_google_analytics.js,v 1.0.1 29.08.2006 19:24 Andrew Berezin [email protected] $
     */
      GOOGLE_ANALYTICS_UACCT = 'UA-XXXXXX-X';
    
      google_analytics_url = "http://www.google-analytics.com/urchin.js";
      if (p = window.location.protocol) {
        if (p == 'https:') 
          google_analytics_url = "https://ssl.google-analytics.com/urchin.js";
      }
      var oTheHead = document.getElementsByTagName("head").item(0);
      var scrUTM = document.createElement("script");
      scrUTM.type = "text/javascript";
      scrUTM.src = google_analytics_url;
      oTheHead.appendChild(scrUTM);
      scrHTML = '';
      scrHTML += "\n_uacct = '"+GOOGLE_ANALYTICS_UACCT+"';\n";
      scrHTML += "urchinTracker();\n";
      var scrUTM = document.createElement("script");
      scrUTM.type = "text/javascript";
      scrUTM.innerHTML = scrHTML;
      oTheHead.appendChild(scrUTM);

  3. #23
    Join Date
    Mar 2005
    Location
    United Kingdom
    Posts
    608
    Plugin Contributions
    0

    Default Re: Google Analytics Integration

    Thanks Andrew. I do have other tracking scripts inserted like this but your stuff is always so slick I overlooked the obvious.

  4. #24
    Join Date
    Mar 2005
    Location
    United Kingdom
    Posts
    608
    Plugin Contributions
    0

    Default Re: Google Analytics Integration

    Thanks, our posts crossed.

    Will try the new code and report back.

  5. #25
    Join Date
    Jul 2006
    Posts
    12
    Plugin Contributions
    0

    Default Re: Google Analytics Integration

    Google Analytics Integration installed and working fine! Thank you!
    Now for the details of site tracking.
    Do you add the google generated script to every product and page that you want to track, as google suggests? Or is there another way to add their js?

    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
    </script>
    <script type="text/javascript">
    _uacct = "UA-64XXXX-1";
    urchinTracker();
    </script>

  6. #26
    Join Date
    Mar 2005
    Location
    United Kingdom
    Posts
    608
    Plugin Contributions
    0

    Default Re: Google Analytics Integration

    Andrew's great mod does it for you.

    If you're still using 1.2.x you'll need to use the modified jscript_google_analytics.js code he posted above.

  7. #27
    Join Date
    Jul 2006
    Posts
    12
    Plugin Contributions
    0

    Default Re: Google Analytics Integration

    I am using 1.302, and I think Google is tracking without installing any other code, though I guess that statistics are compiled daily, so I'll have to wait a bit to see results show up on Google.
    Thanks for the tip.

  8. #28
    Join Date
    Jul 2006
    Posts
    12
    Plugin Contributions
    0

    Re: Google Analytics Integration

    Note:
    Google has changed the Analytics account to allow for monitoring of multiple sites, from one account.
    So now your account number has an extra digit appended, e.g.
    UA-64XXXX-1 for site one.
    UA-64XXXX-2 for site two.
    Make sure to use this complete number in your Zencart admin. settings for the Analytics mod. The default account ID shown in the mod is UA-64XXXX.

  9. #29
    kelvyn Guest

    Default Re: Google Analytics Integration

    Does anyone know if this mod works with the 1.3.5d release announced this morning?

  10. #30
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: Google Analytics Integration

    Quote Originally Posted by kelvyn
    Does anyone know if this mod works with the 1.3.5d release announced this morning?
    Kelvyn, perhaps you should test some of the mods with 1.3.5 and report back if it works or not instead of post all over the forum about compatibility issues. 1.3.5 has just been released and people installing and testing it, give it some time for people to start reporting back.

 

 
Page 3 of 68 FirstFirst 123451353 ... LastLast

Similar Threads

  1. Google Analytics: Site Search Integration
    By saitomedia in forum General Questions
    Replies: 1
    Last Post: 29 Jul 2010, 08:08 AM
  2. google analytics integration
    By amnon_d in forum General Questions
    Replies: 3
    Last Post: 14 Jul 2009, 12:04 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