Page 49 of 217 FirstFirst ... 3947484950515999149 ... LastLast
Results 481 to 490 of 2161
  1. #481
    Join Date
    Aug 2007
    Posts
    94
    Plugin Contributions
    0

    Default Re: Simple Google Analytics - Support

    Apparently this happens frequently, perhaps the ReadMe should discuss this more clearly? Working on implementing this fix..

    >>>
    Are you using a custom template or not? In one error, it references the "template_default" directory, and in the other, it references a "CUSTOM" directory.

    If you are using a custom directory, then make sure you put ALL overrides in folders associated with that custom template. So, for example, if you are using a custom template and that directory is called "CUSTOM" (as stated in your error message) then the Google Code needs to be installed in the /includes/templates/CUSTOM/common/tpl_main_page.php file. (Not in the one located within the "template_default" directory.)

    Likewise, the directory "google_analytics" should be uploaded to /includes/templates/CUSTOM/google_analytics (NOT /includes/templates/template_default/google_analytics).

    Google is unable to verify the code because there is no tracking code present due to the incorrect placement of the files on your end. Once you get them in the correct locations as indicated here, it should all be fine.

    You'll need to have Google go back out and check the location of the tracking code to verify it once you have everything in place.
    >>>

  2. #482
    Join Date
    Nov 2004
    Location
    West Mids, England
    Posts
    203
    Plugin Contributions
    1

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by Bahnstoermer View Post
    Apparently this happens frequently, perhaps the ReadMe should discuss this more clearly? Working on implementing this fix..

    >>>
    Are you using a custom template or not? In one error, it references the "template_default" directory, and in the other, it references a "CUSTOM" directory.

    If you are using a custom directory, then make sure you put ALL overrides in folders associated with that custom template. So, for example, if you are using a custom template and that directory is called "CUSTOM" (as stated in your error message) then the Google Code needs to be installed in the /includes/templates/CUSTOM/common/tpl_main_page.php file. (Not in the one located within the "template_default" directory.)

    Likewise, the directory "google_analytics" should be uploaded to /includes/templates/CUSTOM/google_analytics (NOT /includes/templates/template_default/google_analytics).

    Google is unable to verify the code because there is no tracking code present due to the incorrect placement of the files on your end. Once you get them in the correct locations as indicated here, it should all be fine.

    You'll need to have Google go back out and check the location of the tracking code to verify it once you have everything in place.
    >>>
    Hi

    It looks like you have found the answer you need.

    Basically, for future reference, I browse through all the files when I am working on a new module and whenever I see a folder with:
    'custom'
    'your_template'
    'template_default' etc,
    I change the folder name to my template name and use the override.

    I also move any files I change in the 'template_default' folder to my override folder, creating one if it does not exist.

    Craig

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

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by jds580s View Post
    Sorry should have included that info in the original post
    1. ZenCart version 1.3.7.1
    Database Patch Level: 1.3.7.1

    2. The only other mod installed is FedEx which was installed at site launch (simple google analytics was installed post launch by about 2 months)
    No other changes happened to the site at the time of the google analytics add-on.

    3. I won't say 100% certain, as there is always room for error, but everything I have reviewed and scrutinized over points to SGA as the culprit. I even asked the host to check error logs and see if there were any updates that might have been responsible for the server behaving differently or modifying the database, they took the time to help but were unable to find anything on their end.

    Thanks!

    Did you upgrade to the 1.3.7 version from an older version, or was it a fresh install? There are a few lines of SQL code that are included in one of the updates that initiates the infor you are looking for.

    Also, this may be a crazy question, but were those elements that seem to be missing there are one time (the fields)? I ask this only because I have seen other carts (Zen versions) even 1.3.7 that even before adding the SGA mod do not include the fields in question here.

    In those cases, it would appear as SGA might be the culprit but the fields were not there anyhow.

    Let me know the above and we can go from there.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

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

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by Bahnstoermer View Post
    All right, now I've got a real problem..

    Code:
    Warning: main(includes/templates/template_default/google_analytics/google_analytics.php): failed to open stream: No such file or directory in xxx/catalog/includes/templates/custom/common/tpl_main_page.php on line 182
    
    Warning: main(includes/templates/template_default/google_analytics/google_analytics.php): failed to open stream: No such file or directory in xxx/catalog/includes/templates/custom/common/tpl_main_page.php on line 182
    
    Fatal error: main(): Failed opening required 'includes/templates/template_default/google_analytics/google_analytics.php' (include_path='.:/usr/local/lib/php') in xxx/catalog/includes/templates/custom/common/tpl_main_page.php on line 182
    Obviously it says it can't find a file but I need to know how to correct this. I ran the sql file from the admin, set up the configuration in the admin area with the proper google identification numbers for what, analytics and conversion tracking.

    I go to test the conversion, click an Add from google, go to login to my site to make a "purchase" and I get this problem. Help? Thanks!


    This error is a direct result of not installing the "google_analytics" directory to the proper location (it contains the file that in included on the page with teh bit of code you put into your "tpl_main_page.php" file.

    The location of the directory should be in the following area:
    /includes/templates/[YOUR CUSTOM TEMPLATE HERE]/

    So, once you upload, your directory structure will look like this:
    /includes/templates/[YOUR CUSTOM TEMPLATE HERE]/google_analytics

    If you are using the default template, then obviously the path would look like this:
    /includes/templates/template_default/google_analytics

    Once you get that in the correct location, you'll be fine.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

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

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by Bahnstoermer View Post
    Apparently this happens frequently, perhaps the ReadMe should discuss this more clearly? Working on implementing this fix..
    There is no "fix" as such needed from a module / coding perspective. The "fix" is to install the files to the proper location and determine if you are using a custom template or not so you know where to install them to. :)


    Quote Originally Posted by Bahnstoermer View Post
    Are you using a custom template or not? In one error, it references the "template_default" directory, and in the other, it references a "CUSTOM" directory.
    The reason it references two different locations is because of how the Zen overrides work. Zen first looks to find out if a custom directory exists. If it does, then it uses the files from that directory to "generate" those pages referenced.

    If a custom directory does not exist, then it goes back and uses the "default" directory files.

    In this case, it is not the module's fault that is causing different locations to print. Those references are not part of the module itself, but rather, part of zen cart and php. It is normal with all sites.

    The reason you get the two different locations being referenced is because the files were not installed to the correct locations in the first place. So, due to that problem, the error report you get on the screen will reference both the conflict of the custom directory you are trying to use (referenced in the "tpl_main_page.php" file) and the included file that SHOULD be present in the same custom location (but is not due to incorrect installation). So, it then looks for the include files under the "default" template directory, can't find them there, and reports that back as well.

    Again, this is not module error message. It is a PHP message that you are getting which has its foundation on the Zen overrides system.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

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

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by CES View Post
    Hi

    Basically, for future reference, I browse through all the files when I am working on a new module and whenever I see a folder with:
    'custom'
    'your_template'
    'template_default' etc,
    I change the folder name to my template name and use the override.

    I also move any files I change in the 'template_default' folder to my override folder, creating one if it does not exist.

    Craig

    Exactly. This is what is explained in the documentation (replace any occurrence of "custom etc..." with your own custom directory IF you are using one. Otherwise, use the default directory.

    It helps to understand how the overrides work in Zen to get a feel for whaht is going on here.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

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

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by Bahnstoermer View Post
    All right well I found..

    includes/templates/template_default/common/tpl_main_page.php

    ... should I modify this file and put it in my template directory with the header and footer.php?
    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
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

  8. #488
    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.

  9. #489
    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>';

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

  10. #490
    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

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