Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • stomo Friend
    #149705

    hi ,
    I would like to know how to add code google anaytics on ja_seleni template ,
    knowing that there is note a balise <body> in index.php

    thnxx

    ackordian Friend
    #337149

    I don’t think it’s necessary to have it in a specific place in the HTML, have you tried just putting it in at the bottom?

    The reason they tell you to put it at the very bottom right before the end body tag is so that it doesn’t delay the loading of the rest of the page. If it’s next to stuff that gets rendered, that stuff is going to be within the body tag.

    yoda123 Friend
    #337180

    To add Analytics code to any Joomla template, simply edit the html of the template file and paste your analytics code imediately before the closing </body> tag at the bottom of the code.

    You can edit the template html file directly through the administrator panel.

    Click on Extensions -> Template Mangager
    Select the Template you want to add the code to and click Edit in the top right
    Select Edit HTML
    Paste the code above the </body> tag
    Click OK
    Visit your site
    Wait 30 mins
    Check your google analytics account.
    😀

    James Weston Friend
    #339275

    <em>@yoda123 170642 wrote:</em><blockquote>To add Analytics code to any Joomla template, simply edit the html of the template file and paste your analytics code imediately before the closing </body> tag at the bottom of the code.

    You can edit the template html file directly through the administrator panel.

    Click on Extensions -> Template Mangager
    Select the Template you want to add the code to and click Edit in the top right
    Select Edit HTML
    Paste the code above the </body> tag
    Click OK
    Visit your site
    Wait 30 mins
    Check your google analytics account.
    :D</blockquote>
    Hi I just tried following your instructions on the JA Teline III template. However, when i go to edit HTML there is no </body> tag:

    <?php
    /*
    # ————————————————————————
    # JA Teline III – Stable – Version 1.4 – Licence Owner JA179264
    # ————————————————————————
    # Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
    # @license – Copyrighted Commercial Software
    # Author: J.O.O.M Solutions Co., Ltd
    # Websites: http://www.joomlart.comhttp://www.joomlancers.com
    # This file may not be redistributed in whole or significant part.
    # ————————————————————————
    */

    // no direct access
    defined( ‘_JEXEC’ ) or die( ‘Restricted access’ );

    include_once (dirname(__FILE__).DS.’libs’.DS.’ja.template.helper.php’);

    $tmplTools = JATemplateHelper::getInstance($this, array(‘ui’));

    # Auto Collapse Divs Functions ##########
    $ja_left = $this->countModules(‘left’) || ($tmplTools->getParam(JA_TOOL_MENU) == 1);
    $ja_right = $this->countModules(‘right’);

    if ( $ja_left && $ja_right ) {
    $divid = ”;
    } elseif ( $ja_left ) {
    $divid = ‘-fr’;
    } elseif ( $ja_right ) {
    $divid = ‘-fl’;
    } else {
    $divid = ‘-f’;
    }
    $tmplTools->setParam (‘divid’, $divid);

    $curidx = $tmplTools->getCurrentMenuIndex();
    //if ($curidx) $curidx–;

    //Calculate the width of template
    $tmplWidth = ”;
    $tmplWrapMin = ‘100%’;
    switch ($tmplTools->getParam(JA_TOOL_SCREEN)){
    case ‘auto’:
    $tmplWidth = ‘97%’;
    break;
    case ‘fluid’:
    $tmplWidth = intval($tmplTools->getParam(‘ja_screen_width’));
    $tmplWidth = $tmplWidth ? $tmplWidth.’%’ : ‘90%’;
    break;
    case ‘fix’:
    $tmplWidth = intval($tmplTools->getParam(‘ja_screen_width’));
    $tmplWrapMin = $tmplWidth ? ($tmplWidth+1).’px’ : ‘751px’;
    $tmplWidth = $tmplWidth ? $tmplWidth.’px’ : ‘750px’;
    break;
    default:
    $tmplWidth = intval($tmplTools->getParam(JA_TOOL_SCREEN));
    $tmplWrapMin = $tmplWidth ? ($tmplWidth+1).’px’ : ‘751px’;
    $tmplWidth = $tmplWidth ? $tmplWidth.’px’ : ‘750px’;
    break;
    }

    $tmplTools->setParam (‘tmplWidth’, $tmplWidth);
    $tmplTools->setParam (‘tmplWrapMin’, $tmplWrapMin);

    //Main navigation
    $ja_menutype = $tmplTools->getMenuType();
    $jamenu = null;
    if ($ja_menutype && $ja_menutype != ‘none’) {
    $japarams = new JParameter(”);
    $japarams->set( ‘menutype’, $tmplTools->getParam(‘menutype’, ‘mainmenu’) );
    $japarams->set( ‘menu_images_align’, ‘left’ );
    $japarams->set( ‘menupath’, $tmplTools->templateurl() .’/ja_menus’);
    $japarams->set(‘menu_title’, 0);

    $jamenu = $tmplTools->loadMenu($japarams, $ja_menutype);
    }

    //End for main navigation

    $layout = $tmplTools->getLayout ();
    if ($layout) {
    $tmplTools->display ($layout);
    }

    Any ideas?

    anatta Friend
    #339332

    I think that you just have the top part of the code. Try scrolling down further (there should be a scrollbar within the window) – the code should end with “?>” and you should find the </body> tag a couple of lines above that.

    projekt Friend
    #339949

    And for those templates like this one that haven’t got body tag in their index.php file or Template edit html file???????

    how can we add analytics to that one???

    cansay Friend
    #339950

    <em>@projekt 174087 wrote:</em><blockquote>And for those templates like this one that haven’t got body tag in their index.php file or Template edit html file???????

    how can we add analytics to that one???</blockquote>

    They do have this m8 🙂

    Just use FTP to or eXtplorer to view the template 🙂

    anatta Friend
    #339968

    Difficult to say without seeing the code. It is possible that your theme calls a different module like the footer that closes the body and html tags, although personally, I haven’t ever seen this myself.

    If you can PM me the template I could probably help you find it, but I agree with cansay that you’re probably just not seeing it.

    I will need to see the file /templates/your_theme/index.php

    brianowl Friend
    #340125

    Thanks for the info, I’m new to Joomla.

    I’ve build many sites on the wordpress platform and am trying to branch out. Joomla seems a bit more technical but this is an awesome site to learn from.

    Brian

    Saguaros Moderator
    #340218

    Dear all !

    the best way is here , you should create a custom module and put the google code into the content of the module, and put this module on the footnav position, you should not put google code into the php file because, it will influence to the template upgrading.

    GOod luck

    wlanguide Friend
    #341300

    I think you can add the code:

    1, Use a plugin, this way you can simply enter your GA number, sth like UA-xxxxxxx-x. You can find this plugin here http://extensions.joomla.org/extensions/site-management/site-analytics/4300

    2, Just go to your template on the danshboard, try to edit your html code, and add your GA code at the BOTTOM. Note, always insert the JS script at the bottom as it slows you down.

    Hope this helps.:D

    sisindia Friend
    #341399

    Good Suggestion.
    thanks

    mailgser Friend
    #369097

    Thanks for your info. Could you recommend one of the best custom module?

    Cheers!

    <em>@tienhc 174401 wrote:</em><blockquote>Dear all !

    the best way is here , you should create a custom module and put the google code into the content of the module, and put this module on the footnav position, you should not put google code into the php file because, it will influence to the template upgrading.

    GOod luck</blockquote>

    fordangelina40 Friend
    #369198

    Thanks for the info, I’m new to Joomla.
    I think you can add the code:

    1, Use a plugin, this way you can simply enter your GA number, sth like UA-xxxxxxx-x. You can find this plugin here http://extensions.joomla.org/extensi...analytics/4300

    2, Just go to your template on the danshboard, try to edit your html code, and add your GA code at the BOTTOM. Note, always insert the JS script at the bottom as it slows you down.

    fordangelina40 Friend
    #369199

    <em>@wlanguide 175757 wrote:</em><blockquote>I think you can add the code:

    1, Use a plugin, this way you can simply enter your GA number, sth like UA-xxxxxxx-x. You can find this plugin here http://extensions.joomla.org/extensions/site-management/site-analytics/4300

    2, Just go to your template on the danshboard, try to edit your html code, and add your GA code at the BOTTOM. Note, always insert the JS script at the bottom as it slows you down.

    Hope this helps.:D</blockquote>

    You are the best.

Viewing 15 posts - 1 through 15 (of 18 total)

This topic contains 18 replies, has 16 voices, and was last updated by  r90sfan 13 years ago.

We moved to new unified forum. Please post all new support queries in our New Forum