Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • jewellman Friend
    #145500

    I tried to insert the google analytics script into the html page but could not find where the body section is. Google wants the script to be inserted right before the body.

    Thanks,

    Jimmy

    mihirc Friend
    #321608

    Hello,

    You would need to install this by doing a very simple modification to the Joomlart template.

    Go to templates/ja_halite/ and use a Code editor, like notepad, or dreamweaver to open the index.php file.

    Scroll to the bottom to where the </body> tag is. Put the javascript codes that Google Analytics gives and insert it before the tag. Save the file and upload it. It normally takes around 12 – 24 hours for it to get verified.

    Regards,
    Mihir Chhatre.

    jewellman Friend
    #321610

    My index.php does not have a body tag anywhere in it, that is what threw me off originally. Here is the code (I installed using the quickstart option by the way)-

    <?php
    /**
    * @copyright Copyright (C) 2005 – 2007 Open Source Matters. All rights reserved.
    * @license GNU/GPL, see LICENSE.php
    * Joomla! is free software. This version may have been modified pursuant
    * to the GNU General Public License, and as distributed it includes or
    * is derivative of works licensed under the GNU General Public License or
    * other free or open source software licenses.
    * See COPYRIGHT.php for copyright notices and details.
    */

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

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

    if (defined(‘_DEMO_MODE_’)) $tmplTools = JATemplateHelper::getInstance($this, array(JA_TOOL_MENU, JA_TOOL_COLOR,’ui’));
    else $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->getParam(JA_TOOL_MENU, ‘css’);
    $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);
    $japarams->set(‘menu_images’, 1);

    $tmplTools->loadMenu($japarams);
    }

    //End for main navigation

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

    Anonymous Moderator
    #321685

    Hi jewellman

    Open templatesja_halitelayouts folder, find your layout file to open. You can find </body> tag in each file to add your script.

    jewellman Friend
    #321760

    Thanks!

    Jimmy

    bryantwest Friend
    #324893

    I’m no expert, but I highly recommend BIGSHOT Google Analytics (http://extensions.joomla.org/extensions/site-management/site-analytics/6170). Just install, go to pluggins, turn it on and enter your Google Analytics code… and hey presto.

    I have it running on about 10 sites, works a treat.

    thatch10 Friend
    #325141

    Just to add annother option to the field.

    JoomlaGATor! allows Under user defined tracking so you can see whoo is logging on to use your site
    http://extensions.joomla.org/extensions/site-management/site-analytics/3356

    its not a plugin as BIGSHOT Google Analytics is, its a module.

    You take your pick

    Thatch

Viewing 7 posts - 1 through 7 (of 7 total)

This topic contains 7 replies, has 5 voices, and was last updated by  thatch10 14 years, 11 months ago.

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