Results 1 to 10 of 2161

Hybrid View

  1. #1
    Join Date
    May 2009
    Posts
    9
    Plugin Contributions
    0

    Default Re: Simple Google Analytics - Support

    Eric,
    Thank you for your quick response. Here's my copy of the main_page. I think I have all your edits correct.

    <?php
    /**
    * Common Template - tpl_main_page.php
    *
    * Governs the overall layout of an entire page<br />
    * Normally consisting of a header, left side column. center column. right side column and footer<br />
    * For customizing, this file can be copied to /templates/your_template_dir/pagename<br />
    * example: to override the privacy page<br />
    * - make a directory /templates/my_template/privacy<br />
    * - copy /templates/templates_defaults/common/tpl_main_page.php to /templates/my_template/privacy/tpl_main_page.php<br />
    * <br />
    * to override the global settings and turn off columns un-comment the lines below for the correct column to turn off<br />
    * to turn off the header and/or footer uncomment the lines below<br />
    * Note: header can be disabled in the tpl_header.php<br />
    * Note: footer can be disabled in the tpl_footer.php<br />
    * <br />
    * $flag_disable_header = true;<br />
    * $flag_disable_left = true;<br />
    * $flag_disable_right = true;<br />
    * $flag_disable_footer = true;<br />
    * <br />
    * // example to not display right column on main page when Always Show Categories is OFF<br />
    * <br />
    * if ($current_page_base == 'index' and $cPath == '') {<br />
    * $flag_disable_right = true;<br />
    * }<br />
    * <br />
    * example to not display right column on main page when Always Show Categories is ON and set to categories_id 3<br />
    * <br />
    * if ($current_page_base == 'index' and $cPath == '' or $cPath == '3') {<br />
    * $flag_disable_right = true;<br />
    * }<br />
    *
    * @package templateSystem
    * @copyright Copyright 2003-2007 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: tpl_main_page.php 7085 2007-09-22 04:56:31Z ajeh $
    * Modified for Smart Backgrounds v2.1.1 by Glenn Herbert (gjh42) 2009-01-11
    */

    // the following IF statement can be duplicated/modified as needed to set additional flags
    if ($this_is_home_page) {
    $flag_disable_left = true;
    }

    if ($this_is_home_page) {
    $flag_disable_right = true;
    }
    if (in_array($current_page_base,explode(",",'login,shopping_cart,checkout_shipping, shippinginfo,privacy,conditions,account,contact_us,checkout_payment,checkout_con firmation,tell_a_friend')) ) {
    $flag_disable_right = true;
    }
    if (in_array($current_page_base,explode(",",'login,contact_us,account,shopping_cart ,checkout_shipping,shippinginfo,privacy,conditions,checkout_payment,checkout_con firmation,tell_a_friend')) ) {
    $flag_disable_left = true;
    }


    $header_template = 'tpl_header.php';
    $footer_template = 'tpl_footer.php';
    $left_column_file = 'column_left.php';
    $right_column_file = 'column_right.php';
    $body_id = ($this_is_home_page) ? 'indexHome' : str_replace('_', '', $_GET['main_page']);
    ?>
    <body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>
    <!--Smart Backgrounds-->
    <?php $smart_image = '';
    if ($current_page_base == 'index' or $current_page_base == 'product_info') { //add _ and cPath to filename only if individual cat image exists, else add _ and top cat id to bg filename only if top cat image exists
    $smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . $_GET[cPath] . '.gif')?'_' . $_GET[cPath]file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . (int)$_GET[cPath] . '.gif')?'_' . (int)$_GET[cPath]:'');
    } elseif ($current_page_base == 'page') { //add _page and ez-page id to filename only if ez-page id image exists, else add _page to filename only if general ez-page image exists
    $smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_page' . $_GET[id] . '.gif')?'_page' . $_GET[id]file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_page.gif')?'_page':'');
    } else { //add _ and page base to filename only if page image exists
    $smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . $current_page_base . '.gif')?'_' . $current_page_base:''; //default/home page class will be just .smartBG, and filename smartbg.gif
    }?>
    <!--/Smart Backgrounds-->


    <div id="mainWrapper">
    <?php
    /**
    * prepares and displays header output
    *
    */
    if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_HEADER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) {
    $flag_disable_header = true;
    }
    require($template->get_template_dir('tpl_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_header.php');?>

    <table width="100%" border="0" cellspacing="0" cellpadding="0" id="contentMainWrapper">
    <tr>
    <!-- bof breadcrumb -->
    <?php if (DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?>
    <div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
    <?php } ?>
    <!-- eof breadcrumb -->
    <?php
    if (COLUMN_LEFT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_LEFT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) {
    // global disable of column_left
    $flag_disable_left = true;
    }
    if (!isset($flag_disable_left) || !$flag_disable_left) {
    ?>

    <td id="navColumnOne" class="columnLeft" style="width: <?php echo COLUMN_WIDTH_LEFT; ?>">
    <?php
    /**
    * prepares and displays left column sideboxes
    *
    */
    ?>
    <div id="navColumnOneWrapper" style="width: <?php echo BOX_WIDTH_LEFT; ?>"><?php require(DIR_WS_MODULES . zen_get_module_directory('column_left.php')); ?></div></td>
    <?php
    }
    ?>
    <td valign="top">


    <?php
    if (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) {
    if ($banner->RecordCount() > 0) {
    ?>
    <div id="bannerThree" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
    <?php
    }
    }
    ?>

    <!-- bof upload alerts -->
    <?php if ($messageStack->size('upload') > 0) echo $messageStack->output('upload'); ?>
    <!-- eof upload alerts -->

    <?php
    /**
    * prepares and displays center column
    *
    */
    require($body_code); ?>

    <?php
    if (SHOW_BANNERS_GROUP_SET4 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET4)) {
    if ($banner->RecordCount() > 0) {
    ?>
    <div id="bannerFour" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
    <?php
    }
    }
    ?></td>

    <?php
    //if (COLUMN_RIGHT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' && $_SESSION['customers_authorization'] != 0)) {
    if (COLUMN_RIGHT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) {
    // global disable of column_right
    $flag_disable_right = true;
    }
    if (!isset($flag_disable_right) || !$flag_disable_right) {
    ?>
    <td id="navColumnTwo" class="columnRight" style="width: <?php echo COLUMN_WIDTH_RIGHT; ?>">
    <?php
    /**
    * prepares and displays right column sideboxes
    *
    */
    ?>
    <div id="navColumnTwoWrapper" style="width: <?php echo BOX_WIDTH_RIGHT; ?>"><?php require(DIR_WS_MODULES . zen_get_module_directory('column_right.php')); ?></div></td>
    <?php
    }
    ?>
    </tr>
    </table>

    <?php
    /**
    * prepares and displays footer output
    *
    */
    if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_FOOTER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) {
    $flag_disable_footer = true;
    }
    require($template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer.php');
    ?>

    </div>
    <!--bof- parse time display -->
    <?php
    if (DISPLAY_PAGE_PARSE_TIME == 'true') {
    ?>
    <div class="smallText center">Parse Time: <?php echo $parse_time; ?> - Number of Queries: <?php echo $db->queryCount(); ?> - Query Time: <?php echo $db->queryTime(); ?></div>
    <?php
    }
    ?>
    <!--eof- parse time display -->
    <!--bof- banner #6 display -->
    <?php
    if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) {
    if ($banner->RecordCount() > 0) {
    ?>
    <div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
    <?php
    }
    }
    ?>
    <!--eof- banner #6 display -->
    <?php
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
    ?>
    </body>

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

    Default Re: Simple Google Analytics - Support

    Yes, that is correct.

    Since the code is placed properly yet is still not showing up on your site make sure you:

    1) Check to ensure the tpl_main_page.php is in the proper location for the template you are using.

    2) The Smart Backgrounds does not override the footer file in any way with it's own code (which might override this.)

    I would suspect it is probably more than likely #1 on this list.

    If we can't get it figure out I can get in and take a look for you.

    Just let me know.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

  3. #3
    Join Date
    May 2009
    Posts
    9
    Plugin Contributions
    0

    Default Re: Simple Google Analytics - Support

    Okay. I double check the smartbackground mod and no, there weren't any changes to the footer. My tpl_main_page.php file is located in /includes/templates./residentpress/common/
    That's correct, right? My only other change is that I renamed my admin file however I can see the google ananlytics configuration tab in my admin panel. So my "admin" sees the files. Hmmm....

    Thanks in advance for you help. Let me know what you think I should do next. Thanks.
    Kelly

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

    Default Re: Simple Google Analytics - Support

    Ok on the smart backgrounds.

    Renaming the admin won't so anything so you're ok there.

    The location of the file would be correct providing that is yoru template directory (which it looks to be.)

    Do this. Send me your login info (Admin Zen and FTP) through a private message and I'll take a look.

    Should be a very quick fix.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

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

    Default Re: Simple Google Analytics - Support

    Hold on a second. I just went to your site and the code is now showing. Whatever you did in the recent changes (or something) seemed to have got it working.

    The tracking code now looks to be in place.

    To confirm this you can pull up any page on your site and then do a "view source". The code is a the very bottom now.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

  6. #6
    Join Date
    May 2009
    Posts
    9
    Plugin Contributions
    0

    Default Re: Simple Google Analytics - Support

    Eric,
    Thank you for your kind assistance. I've been up to late working on this and after double checking everything I noticed my directory folder was mistyped. I forgot to had the _ in google_analytics. Ugh! Thank you for looking at everything.

    Kelly

  7. #7
    Join Date
    Aug 2004
    Location
    Rochester, NY
    Posts
    55
    Plugin Contributions
    0

    Default Re: Simple Google Analytics - Support

    I have version 1.2.2 of the Simple GA module installed on my Zen Cart 1.3.8a site. On the "thank you" confirmation page after a customer has placed an order, the page conversion tracking script is being loaded twice, once in the header and once in the footer. The one in the header is being loaded from Google's http server even though the page is SSL encrypted. The one in the footer is being loaded from the https server. Also in the header is the <noscript><img ...> tag that is being pulled from Google's http server. This is causing a security warning (in IE, but not Firefox or Chrome).

    I've confirmed that I do not have any entries in my tpl_main_page or html_header files that would be manually loading the page conversion script. I've tried looking through the other template files. Is there one I could have missed?

    I know we had an earlier version of this module installed, prior to there being support for the conversion tracking. Perhaps there's a bit of leftover code?

    Sorry if this has been addressed previously in this thread. I tried searching through the 117 pages of replies but I could have missed it.

    Thanks,
    Tim
    FestOS :: Open-source arts-n-crafts festival management system from skypanther

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

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by kblckmr View Post
    Eric,
    Thank you for your kind assistance. I've been up to late working on this and after double checking everything I noticed my directory folder was mistyped. I forgot to had the _ in google_analytics. Ugh! Thank you for looking at everything.

    Kelly
    Glad you got it working. :)
    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