Results 1 to 10 of 2161

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Posts
    3
    Plugin Contributions
    0

    Default Re: Simple Google Analytics - Support

    This is a long long thread. My problem may have been resolved before but I can't find the fix.

    Step 3 in the installation of the Simple Google Analytics requires a line of code to be inserted just before the </body> tag at the end of tpl_main_page.php. I did that. The code now looks like this:

    Code:
    <!--eof- banner #6 display -->
    <?php
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
    ?>
    </body>
    And when I run the code, the page source ends like this:

    Code:
    <!--eof- banner #6 display -->
    That's it. No analytics code. Even lost the </body> tag.

    What am I missing, please.

  2. #2
    Join Date
    Aug 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: Simple Google Analytics - Support

    leave the /includes/templates/[your_template]/common/tpl_main_page.php whit no changes and insert the next code in the /includes/templates/[your_template]/common/tpl_footer.php, note just the bold type is the code you have to insert, the rest of lines are a part of tpl_footer.php

    <!--eof- site copyright display -->

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


    <?php

    } // flag_disable_footer

    ?>

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

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by josaltva View Post
    leave the /includes/templates/[your_template]/common/tpl_main_page.php whit no changes and insert the next code in the /includes/templates/[your_template]/common/tpl_footer.php, note just the bold type is the code you have to insert, the rest of lines are a part of tpl_footer.php

    <!--eof- site copyright display -->

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


    <?php

    } // flag_disable_footer

    ?>
    With my contribution you definitely do not want to insert the code into the footer file. Leave that as is.

    Actually the lines of code that show at the end of the page are part of the tpl_main_page.php file (not footer). Part of it above the code insert is footer but everything below is part of the main template page.

    You want to leave the code inserted as per instruction #3. If it is not showing on the site then something happened during pasting of the code OR you inserted it into a page that is not being used within your current template.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

  4. #4
    Join Date
    Aug 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by ArthurC View Post
    This is a long long thread. My problem may have been resolved before but I can't find the fix.

    Step 3 in the installation of the Simple Google Analytics requires a line of code to be inserted just before the </body> tag at the end of tpl_main_page.php. I did that. The code now looks like this:

    Code:
    <!--eof- banner #6 display -->
    <?php
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
    ?>
    </body>
    And when I run the code, the page source ends like this:

    Code:
    <!--eof- banner #6 display -->
    That's it. No analytics code. Even lost the </body> tag.

    What am I missing, please.

    leave the /includes/templates/[your_template]/common/tpl_main_page.php whit no changes and insert the next code in the /includes/templates/[your_template]/common/tpl_footer.php, note just the bold type is the code you have to insert, the rest of lines are a part of tpl_footer.php

    <!--eof- site copyright display -->

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


    <?php

    } // flag_disable_footer

    ?>

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

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by ArthurC View Post
    This is a long long thread. My problem may have been resolved before but I can't find the fix.

    Step 3 in the installation of the Simple Google Analytics requires a line of code to be inserted just before the </body> tag at the end of tpl_main_page.php. I did that. The code now looks like this:

    Code:
    <!--eof- banner #6 display -->
    <?php
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
    ?>
    </body>
    And when I run the code, the page source ends like this:

    Code:
    <!--eof- banner #6 display -->
    That's it. No analytics code. Even lost the </body> tag.

    What am I missing, please.
    Aurthur,

    Insert the code as stated in step 3 (into the tpl_main_page.php NOT the footer file).

    If you got that installed and the rest of the contribution is in place (you did upload the proper files right?) then all should show on the bottom of the page just fine.

    A few things to look for.

    1) Make sure you insert the code into the proper "tpl_main_page.php" file. If you are using a custom template then insert and make sure you upload to your custom directories "common" folder (don't upload to the default template folder or it won't work for you).

    2) After you have the code in place make sure you insert your tracking number into the admin config of the module (found in the admin under configuration).

    3) Choose the type of code you which to show (new GA.js version or legacy urchin.js version) and save (again from admin).

    If all is done correctly then you should have the code in place. If the code cuts off the rest of the page (missing </body> tag etc...) then you likely have a typo in the code you pasted so check that.

    That should do it.
    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