test
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • benmont86 Friend
    #174090

    I was told to paste google analytics code inside the index.php file of my website (I am sure this file is used to edit all kinds of things, I am a beginner) but when I try to edit this file i get this:

    <?php
    if (class_exists(‘T3Template’)) {
    $tmpl = T3Template::getInstance($this);
    $tmpl->render();
    return;
    } else {
    //Need to install or enable JAT3 Plugin
    echo JText::_(‘Missing jat3 framework plugin’);
    }

    From this, I understand that the T3 plugin is missing? However, I used the quickstart package installer which I assume installs the T3 framework already? I would really appreciate any help given on this confusing issue. Thanks a lot in advance.

    TomC Moderator
    #439104

    Here is the simplest way to add Google or any other analytics/tracking code to this template although there are plugins available on the JED that will aslo do the job if you do not like playing with the code.

    Copy the file plugins>system>jat3>jat3>base-themes>default>page>default.php

    into

    templates>ja_your-template-name>page>default.php and insert your analytics code just before the </head> tag as per below.

    <head> <?php //gen head base on theme info $this->showBlock (‘head’); ?> <?php $blocks = T3Common::node_children($this->getBlocksXML (‘head’), ‘block’); foreach ($blocks as $block) : $this->showBlock ($block); endforeach; ?> <?php echo $this->showBlock (‘css’) ?>************YOUR ANALYTICS CODE HERE*************</head>

    benmont86 Friend
    #439114

    <em>@TomC 301647 wrote:</em><blockquote>Here is the simplest way to add Google or any other analytics/tracking code to this template although there are plugins available on the JED that will aslo do the job if you do not like playing with the code.

    Copy the file plugins>system>jat3>jat3>base-themes>default>page>default.php

    into

    templates>ja_your-template-name>page>default.php and insert your analytics code just before the </head> tag as per below.</blockquote>
    Thanks for your help Tom. Your posts are very easy to follow including this one. However, you said to copy the default.php file into templates>ja_your-template-name>page>default.php which I CANT find. There is no “page” folder in the destination path you mentioned. Could you please clear this a little bit? thanks again.

    TomC Moderator
    #439115

    <em>@benmont86 301657 wrote:</em><blockquote>Thanks for your help Tom. Your posts are very easy to follow including this one. However, you said to copy the default.php file into templates>ja_your-template-name>page>default.php which I CANT find. There is no “page” folder in the destination path you mentioned. </blockquote>

    Just create it and put the file in there and you will be good to go

    😎

    benmont86 Friend
    #439127

    <em>@TomC 301658 wrote:</em><blockquote>

    Just create it and put the file in there and you will be good to go

    :cool:</blockquote>
    Thanks Tom, you rock

    TomC Moderator
    #439128

    <em>@benmont86 301672 wrote:</em><blockquote>Thanks Tom, you rock</blockquote>

    Glad to be of assistance.

    All the best with your continuing site development.

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

This topic contains 6 replies, has 2 voices, and was last updated by  TomC 12 years, 10 months ago.

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