Results 1 to 10 of 2161

Hybrid View

  1. #1
    Join Date
    Aug 2007
    Posts
    94
    Plugin Contributions
    0

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by econcepts View Post
    You should only modify this file IF you are using a custom template (in which case, you should take the file and copy it to your "custom templates" directory name. This will automatically enable Zen overrides and is the preferred method to keep the integrity of your site if any upgrades to zen are released.

    If you are using the default template, you can alter the file and leave where it is.

    Here is a link to a help file that explains how to create a custom template using the Zen overrides.
    https://www.zen-cart.com/tutorials/i...hp?article=142
    econcepts - thanks for the help. Most of what you posted I figured out one way or another, and I guess I had just forgotten the "your_template" text was symbolic. Also note that the info I put in >> >> was a copy paste from another post I found, not actually me typing specific questions.

    I suppose all I meant by the Readme was that it perhaps could be more clearly written - but then, I'm not coder and it takes me a while to get back into all the ZC lingo.

    Anyway since you're helping out, can I use the other pages that Google Analytics supports within ZC? (Info page, etc)

    I also actually have a simple html home page, can I paste the code Google provides into that html and have it "sync" properly with this ZC module?
    Last edited by Bahnstoermer; 4 Jan 2008 at 11:16 PM.

  2. #2
    Join Date
    May 2007
    Posts
    114
    Plugin Contributions
    0

    Default new tracking code

    As of December Google has new tracking code for Analytics. After unsuccessfully trying to find the needed modification for this plugin, I figured out the change myself. It's really not that big of a change and not a big deal at all, but to save some time, here's are the code modifications:

    includes\templates\your_template\google_analytics\google_analytics.php
    at the very beginning of the code
    ------------------------------------------
    if ($request_type == 'NONSSL') {
    // $google_analytics_url = "http://www.google-analytics.com/urchin.js";
    $google_analytics_url = "http://www.google-analytics.com/ga.js";

    $google_conversion_url = "http://www.googleadservices.com/pagead/conversion.js";
    $google_conversion_image_url = "http://www.googleadservices.com/pagead/conversion/";
    } else {
    // $google_analytics_url = "https://ssl.google-analytics.com/urchin.js";
    $google_analytics_url = "https://ssl.google-analytics.com/urchin.js";
    $google_conversion_url = "https://www.googleadservices.com/pagead/conversion.js";
    $google_conversion_image_url = "https://www.googleadservices.com/pagead/conversion/";
    }

    echo '<script src="' . $google_analytics_url . '" type="text/javascript">
    </script>
    <script type="text/javascript">
    var pageTracker = _gat._getTracker("' . GOOGLE_ANALYTICS_UACCT . '");
    pageTracker._initData();
    pageTracker._trackPageview();
    </script>';

    // echo '<script src="' . $google_analytics_url . '" type="text/javascript">
    // </script>
    // <script type="text/javascript">
    // _uacct = "' . GOOGLE_ANALYTICS_UACCT . '";
    // urchinTracker();
    // </script>';

    ----------------------------------------------

  3. #3
    Join Date
    Dec 2005
    Posts
    1,509
    Plugin Contributions
    6

    Default Re: new tracking code

    Quote Originally Posted by greenhat View Post
    As of December Google has new tracking code for Analytics. After unsuccessfully trying to find the needed modification for this plugin, I figured out the change myself. It's really not that big of a change and not a big deal at all, but to save some time, here's are the code modifications:

    includes\templates\your_template\google_analytics\google_analytics.php
    at the very beginning of the code
    ------------------------------------------
    if ($request_type == 'NONSSL') {
    // $google_analytics_url = "http://www.google-analytics.com/urchin.js";
    $google_analytics_url = "http://www.google-analytics.com/ga.js";

    $google_conversion_url = "http://www.googleadservices.com/pagead/conversion.js";
    $google_conversion_image_url = "http://www.googleadservices.com/pagead/conversion/";
    } else {
    // $google_analytics_url = "https://ssl.google-analytics.com/urchin.js";
    $google_analytics_url = "https://ssl.google-analytics.com/urchin.js";
    $google_conversion_url = "https://www.googleadservices.com/pagead/conversion.js";
    $google_conversion_image_url = "https://www.googleadservices.com/pagead/conversion/";
    }

    echo '<script src="' . $google_analytics_url . '" type="text/javascript">
    </script>
    <script type="text/javascript">
    var pageTracker = _gat._getTracker("' . GOOGLE_ANALYTICS_UACCT . '");
    pageTracker._initData();
    pageTracker._trackPageview();
    </script>';

    // echo '<script src="' . $google_analytics_url . '" type="text/javascript">
    // </script>
    // <script type="text/javascript">
    // _uacct = "' . GOOGLE_ANALYTICS_UACCT . '";
    // urchinTracker();
    // </script>';

    ----------------------------------------------
    Yes, this is correct. As stated in a previous post, the current module is being update to include the new code (the "ga" version). The release of that is anticipate within the next 2 days.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

  4. #4
    Join Date
    Sep 2007
    Posts
    329
    Plugin Contributions
    0

    Default Re: Simple Google Analytics - Support

    Hello,

    I am trying to install he google mod too. I've upgraded all my files in the zip file and I have run the query on the database (new installation not upgrade). Well now that I have done all of that, I don't see the goodle mod in the Admin->Configuration section.

    Can someone please nudge in the right direction.

    thanks a lot

  5. #5
    Join Date
    Sep 2007
    Posts
    329
    Plugin Contributions
    0

    red flag Re: Simple Google Analytics - Support

    Update: I now have the database working and I see the Google settings under Admin->configuration->google.

    Problem I have now is that when I try to test the mod on Google it says:
    Profile Name: tranquillas.com/biz
    Website URL: http://www.tranquillas.com/biz

    Tracking Unknown (Last checked: 2008-01-06 7:50 PM PST.)
    The Google Analytics tracking code has not been detected on your website's home page. For Analytics to function, you or your web administrator must add the code to each page of your website.
    Here is the code that I have at the bottom of my "tpl_main_page.php" file:

    <?php
    if (file_exists($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php')) {
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
    }
    ?>

    <?php
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
    ?>

    <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-3347195-1");
    pageTracker._initData();
    pageTracker._trackPageview();
    </script>
    Can anyone shed some light on why the google check status does not work? I appreciate any help!

  6. #6
    Join Date
    Sep 2007
    Posts
    329
    Plugin Contributions
    0

    Default Re: Simple Google Analytics - Support

    forgot.... I also have the script code at the end of my /home/index.php file.

    hope that helps some.

  7. #7
    Join Date
    Jan 2008
    Location
    Lebanon TN
    Posts
    10
    Plugin Contributions
    0

    Default Re: Simple Google Analytics - Support

    I'm having the same problem mentioned earlier when I try to apply the SQL Patch. I get the dreaded 1064 error:

    Do you want to turn on Google AdWords Conversion Tracking?
    ', @t4, 5, NOW(), NOW(), NULL, 'zen_cfg_select_option(array('Yes', 'No'), ');
    1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Yes', 'No'), ')' at line 1
    in:

    I'm using the "future_zen" template and I've tried installing the google_analytics subdir under both the future_zen directory and the template_default directory.

    No joy. Analytics is at least partially installed, as it is an option under configuration and google confirms that its working. This LOOKS like its a syntax error in the sql patch... not a problem with a file location...

    HELP!

    -Rob Shearer

  8. #8
    Join Date
    Dec 2005
    Posts
    1,509
    Plugin Contributions
    6

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by crabdance View Post
    forgot.... I also have the script code at the end of my /home/index.php file.

    hope that helps some.
    After looking at your pages, you have both the "urchin" and the new "ga" version of Google analytics code present. You can only have one (both may not be present).

    Try removing one of them and then make sure you give Google the proper url (with the trailing slash) to find and verify the code at.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

  9. #9
    Join Date
    Dec 2005
    Posts
    1,509
    Plugin Contributions
    6

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by Bahnstoermer View Post
    econcepts - thanks for the help. Most of what you posted I figured out one way or another, and I guess I had just forgotten the "your_template" text was symbolic. Also note that the info I put in >> >> was a copy paste from another post I found, not actually me typing specific questions.

    I suppose all I meant by the Readme was that it perhaps could be more clearly written - but then, I'm not coder and it takes me a while to get back into all the ZC lingo.

    Anyway since you're helping out, can I use the other pages that Google Analytics supports within ZC? (Info page, etc)

    I also actually have a simple html home page, can I paste the code Google provides into that html and have it "sync" properly with this ZC module?
    As long as you installed the module as per the instructions (in the template_main_page.php file) then it should appear on any other page that uses that file (including info pages etc..).

    As for the HTML page, you would need to copy and paste the tracking code found at the bottom of one of your pages to the HTML page in order for it to be included in the tracking results. The easiest way to do this is to do a "view source" on one of the pages on your site that has the GA code installed. (this is dome from within your browser).

    Then, simply copy and paste the GA code found near the bottom of the page into the HTML page you wish. As long as long as you copy it all correctly, it should work fine. :)
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

 

 

Similar Threads

  1. v150 Simple Google Analytics .sql error !
    By Miff in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 10 Feb 2012, 11:33 PM
  2. Simple Google Analytics-not working
    By RobertG in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 11 Nov 2010, 06:07 PM
  3. Simple (From Google) Analytics Install
    By DagLindt in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 26 May 2009, 10:46 PM
  4. Simple google analytics- help
    By Pet Herbal Remedies in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 1 Oct 2008, 10:37 PM
  5. Simple Google Analytics not working
    By jvanree in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 29 May 2008, 03:46 AM

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