Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11

    Default

    ok, thanks a lot for suggestion!

    at the moment I added it to /footer.php

    <?php
    /************************************************** *************************
    * copyright : (C) 2008, 2009 WeBid
    * site : http://www.webidsupport.com/
    ************************************************** *************************/

    /************************************************** *************************
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation; either version 2 of the License, or
    * (at your option) any later version. Although none of the code may be
    * sold. If you have been sold this script, get a refund.
    ************************************************** *************************/
    include_once("analyticstracking.php");

    $template->assign_vars(array(
    'L_COPY' => empty($system->SETTINGS['copyright']) ? '' : '<p>' . $system->SETTINGS['copyright'] . '</p>',



    'B_VIEW_TERMS' => ($system->SETTINGS['terms'] == 'y'),
    'B_VIEW_PRIVPOL' => ($system->SETTINGS['privacypolicy'] == 'y'),
    'B_VIEW_ABOUTUS' => ($system->SETTINGS['aboutus'] == 'y'),
    'B_FEES' => ($system->SETTINGS['fees'] == 'y')
    ));

    $template->set_filenames(array(
    'footer' => 'global_footer.tpl'
    ));
    $template->display('footer');


    // if the page has loaded OK you dont need this data anymore
    unset($_SESSION['SESSION_ERROR']);
    ?>

    and it looks working fine!
    1 out of 1 members found this post helpful.

  2. #12
    Member j2000's Avatar
    Join Date
    Apr 2012
    Location
    Palembang Indonesia
    Posts
    38

    Default

    Quote Originally Posted by artlauk View Post
    ok, thanks a lot for suggestion!

    at the moment I added it to /footer.php

    <?php
    /************************************************** *************************
    * copyright : (C) 2008, 2009 WeBid
    * site : http://www.webidsupport.com/
    ************************************************** *************************/

    /************************************************** *************************
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation; either version 2 of the License, or
    * (at your option) any later version. Although none of the code may be
    * sold. If you have been sold this script, get a refund.
    ************************************************** *************************/
    include_once("analyticstracking.php");

    $template->assign_vars(array(
    'L_COPY' => empty($system->SETTINGS['copyright']) ? '' : '<p>' . $system->SETTINGS['copyright'] . '</p>',



    'B_VIEW_TERMS' => ($system->SETTINGS['terms'] == 'y'),
    'B_VIEW_PRIVPOL' => ($system->SETTINGS['privacypolicy'] == 'y'),
    'B_VIEW_ABOUTUS' => ($system->SETTINGS['aboutus'] == 'y'),
    'B_FEES' => ($system->SETTINGS['fees'] == 'y')
    ));

    $template->set_filenames(array(
    'footer' => 'global_footer.tpl'
    ));
    $template->display('footer');


    // if the page has loaded OK you dont need this data anymore
    unset($_SESSION['SESSION_ERROR']);
    ?>

    and it looks working fine!
    I try , this is correct step ?

    1: i create from "google analytic code" .txt and rename to analyticstracking.php ,
    <script type="text/javascript">

    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-11111111-1']);
    _gaq.push(['_trackPageview']);

    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();

    </script>

    2: Edit footer.php , add text : include_once("analyticstracking.php");

    3: reUpload footer.php and analyticstracking.php

    This is correct ?

    Regards

    Joel

  3. #13

    Default

    yes, I think it is.

    To check it, you can go to your site in one tab and in new tab open google analytic real time view and check if you are shown as visitor.

  4. #14
    Senior Member/Coder pani100's Avatar
    Join Date
    May 2011
    Location
    London
    Posts
    1,352

    Default

    hi j2000,
    you can also just put the complete code:
    <script>
    ......your script ....
    </script>

    in your footer.tpl file

  5. #15

    Default

    -> pani100

    With footer.tpl --> you mean /themes/default/global_footer.tpl because there isn't footer.tpl is for admin section not user?!
    I put it to try /themes/default/global_footer.tpl but it is not working for me! So better I think is stay at footer.php like I write before.

  6. #16
    Senior Member/Coder pani100's Avatar
    Join Date
    May 2011
    Location
    London
    Posts
    1,352

    Default

    artlauk,
    Yes in your theme that you are using footer.tpl,
    I have added a few different things there like piwik and feedjit script.
    If I was to add goggle analytic script that's where I would put it too.
    If yours works with the include_once("analyticstracking.php"); in the footer.php that's fine though too.
    1 out of 1 members found this post helpful.

  7. #17

    Default

    but footer.tpl is under admin section, so I believe this is load only when someone log in as administrator! It is not loading when someone standard user are viewing page.

  8. #18
    Senior Member/Coder pani100's Avatar
    Join Date
    May 2011
    Location
    London
    Posts
    1,352

    Default

    Sorry artlauk,
    my mistake, that is global_footer.tpl in the theme that you are using folder.
    your site/themes/your theme/global_footer.tpl

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
  •