-
AuthorPosts
-
February 20, 2012 at 7:41 pm #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 ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
February 20, 2012 at 8:07 pm #439104Here 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>
February 20, 2012 at 8:25 pm #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 ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
February 20, 2012 at 8:28 pm #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😎
1 user says Thank You to TomC for this useful post
February 20, 2012 at 8:54 pm #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 rockTomC ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
February 20, 2012 at 8:57 pm #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.
-
AuthorPosts
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