-
AuthorPosts
-
December 23, 2011 at 3:07 am #172075
Hi !
I subscribed to Google Analytics.
They gave me the code and said:Paste this code on your site
Copy the following code, then paste it onto every page you want to track immediately before the closing </head> tag.Can I do it without the HTML editor?
Where are html files of ALL of my pages kept?TomC ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
December 23, 2011 at 3:16 am #430938Here is the simplest way to add Google or any other analytics/tracking code to this template although there are plugins available on the Joomla Extension Directory (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>
December 23, 2011 at 3:54 am #430942I don’t have the folder page in the line
templates>ja_ironis>page>default.php
Should I create this folder? and put the default.php in there?TomC ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
December 23, 2011 at 5:56 am #430949It is there. Copy the file plugins>system>jat3>base-themes>default>page>default.php into templates>ja_travel>page>default.php
The code below is what you will find in the default.php file. Simply add your code between the <head> and </head> as you normally would
<?php
/*
# ------------------------------------------------------------------------
# JA T3v2 Plugin - Template framework for Joomla 1.5
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license - GNU/GPL V2, http://www.gnu.org/licenses/gpl2.html. For details
# on licensing, Please Read Terms of Use at http://www.joomlart.com/terms_of_use.html.
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/
?>
<?php if ($this->isIE() && ($this->isRTL())) { ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<?php } else { ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php } ?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>">
<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') ?>
</head>
<body id="bd" class="<?php if (!T3Common::mobile_device_detect()):?>bd<?php endif;?> <?php echo $this->getBodyClass();?>">
<div id="ja-wrapper">
<a name="Top" id="Top"></a><?php
$blks = &$this->getBlocksXML ('top');
$blocks = &T3Common::node_children($blks, 'block');
foreach ($blocks as $block) :
$this->showBlock ($block);
endforeach;
?>
<!-- MAIN CONTAINER -->
<div id="ja-container" class="wrap <?php echo $this->getColumnWidth('cls_w')?$this->getColumnWidth('cls_w'):'ja-mf'; ?>">
<?php $this->genBlockBegin ($this->getBlocksXML ('middle')) ?>
<div id="ja-mainbody" style="width:<?php echo $this->getColumnWidth('mw') ?>%">
<!-- CONTENT -->
<div id="ja-main" style="width:<?php echo $this->getColumnWidth('m') ?>%">
<div class="inner clearfix"><?php echo $this->loadBlock ('message') ?>
<?php
//content-mass-top
if($this->hasBlock('content-mass-top')) :
$block = &$this->getBlockXML ('content-mass-top');
?>
<div id="ja-content-mass-top" class="ja-mass ja-mass-top clearfix">
<?php $this->showBlock ($block); ?>
</div>
<?phpendif; ?>
<div id="ja-contentwrap" class="clearfix <?php echo $this->getColumnWidth('cls_m'); ?>">
<div id="ja-content" class="column" style="width:<?php echo $this->getColumnWidth('cw') ?>%">
<div id="ja-current-content" class="column" style="width:<?php echo $this->getColumnWidth('c') ?>%">
<?php
//content-top
if($this->hasBlock('content-top')) :
$block = &$this->getBlockXML ('content-top');
?>
<div id="ja-content-top" class="ja-content-top clearfix">
<?php $this->showBlock ($block); ?>
</div>
<?php endif; ?><?php if (!$this->getParam ('hide_content_block', 0)): ?>
<div id="ja-content-main" class="ja-content-main clearfix">
<?php echo $this->showBlock ('content') ?>
</div>
<?php endif ?>
<?php
//content-bottom
if($this->hasBlock('content-bottom')) :
$block = &$this->getBlockXML ('content-bottom');
?>
<div id="ja-content-bottom" class="ja-content-bottom clearfix">
<?php $this->showBlock ($block); ?>
</div>
<?php endif; ?>
</div><?php
//inset1
if($this->hasBlock('inset1')) :
$block = &$this->getBlockXML ('inset1');
?>
<div id="ja-inset1" class="ja-col column ja-inset1" style="width:<?php echo $this->getColumnWidth('i1') ?>%">
<?php $this->showBlock ($block); ?>
</div>
<?php endif; ?>
</div>
<?php
//inset2
if($this->hasBlock('inset2')) :
$block = &$this->getBlockXML ('inset2');
?>
<div id="ja-inset2" class="ja-col column ja-inset2" style="width:<?php echo $this->getColumnWidth('i2') ?>%">
<?php $this->showBlock ($block); ?>
</div>
<?php endif; ?></div>
<?php
//content-mass-bottom
if($this->hasBlock('content-mass-bottom')) :
$block = &$this->getBlockXML ('content-mass-bottom');
?>
<div id="ja-content-mass-bottom" class="ja-mass ja-mass-bottom clearfix">
<?php $this->showBlock ($block); ?>
</div>
<?php endif; ?>
</div>
</div>
<!-- //CONTENT -->
<?php if (($l = $this->getColumnWidth('l'))): ?>
<!-- LEFT COLUMN-->
<div id="ja-left" class="column sidebar" style="width:<?php echo $l ?>%">
<?php
//left-mass-top
if($this->hasBlock('left-mass-top')) :
$block = &$this->getBlockXML ('left-mass-top');
?>
<div id="ja-left-mass-top" class="ja-mass ja-mass-top clearfix">
<?php $this->showBlock ($block); ?>
</div>
<?php endif; ?>
<?php
$cls1 = $cls2 = "";
if ($this->hasBlock('left1') && $this->hasBlock('left2')) {
$cls1 = "ja-left1";
$cls2 = "ja-left2";
}
if ($this->hasBlock('left1') || $this->hasBlock('left2')):
?>
<div class="ja-colswrap clearfix <?php echo $this->getColumnWidth('cls_l'); ?>">
<?php if ($this->hasBlock('left1')):
$block = &$this->getBlockXML('left1');
?>
<div id="ja-left1" class="ja-col <?php echo $cls1;?> column" style="width:<?php echo $this->getColumnWidth('l1')?>%">
<?php $this->showBlock ($block); ?>
</div>
<?php endif ?>
<?php if ($this->hasBlock('left2')):
$block = &$this->getBlockXML('left2');
?>
<div id="ja-left2" class="ja-col <?php echo $cls2;?> column" style="width:<?php echo $this->getColumnWidth('l2')?>%">
<?php $this->showBlock ($block); ?>
</div>
<?php endif ?>
</div>
<?php endif ?>
<?php
//left-mass-bottom
if($this->hasBlock('left-mass-bottom')) :
$block = &$this->getBlockXML ('left-mass-bottom');
?>
<div id="ja-left-mass-bottom" class="ja-mass ja-mass-bottom clearfix">
<?php $this->showBlock ($block); ?>
</div>
<?php endif; ?>
</div>
<!-- //LEFT COLUMN-->
<?php endif; ?></div>
<?php if (($r = $this->getColumnWidth('r'))): ?>
<!-- RIGHT COLUMN-->
<div id="ja-right" class="column sidebar" style="width:<?php echo $r ?>%">
<?php
//left-mass-top
if($this->hasBlock('right-mass-top')) :
$block = &$this->getBlockXML ('right-mass-top');
?>
<div id="ja-right-mass-top" class="ja-mass ja-mass-top clearfix">
<?php $this->showBlock ($block); ?>
</div>
<?php endif; ?>
<?php
$cls1 = $cls2 = "";
if ($this->hasBlock('right1') && $this->hasBlock('right2')) {
$cls1 = "ja-right1";
$cls2 = "ja-right2";
}
if ($this->hasBlock('right1') || $this->hasBlock('right2')): ?>
<div class="ja-colswrap clearfix <?php echo $this->getColumnWidth('cls_r'); ?>">
<?php if ($this->hasBlock('right1')):
$block = &$this->getBlockXML('right1');
?>
<div id="ja-right1" class="ja-col <?php echo $cls1;?> column" style="width:<?php echo $this->getColumnWidth('r1')?>%">
<?php $this->showBlock ($block); ?>
</div>
<?php endif ?>
<?php if ($this->hasBlock('right2')):
$block = &$this->getBlockXML('right2');
?>
<div id="ja-right2" class="ja-col <?php echo $cls2;?> column" style="width:<?php echo $this->getColumnWidth('r2')?>%">
<?php $this->showBlock ($block); ?>
</div>
<?php endif ?>
</div>
<?php endif ?>
<?php
//right-mass-bottom
if($this->hasBlock('right-mass-bottom')) :
$block = &$this->getBlockXML ('right-mass-bottom');
?>
<div id="ja-right-mass-bottom" class="ja-mass ja-mass-bottom clearfix">
<?php $this->showBlock ($block); ?>
</div>
<?php endif; ?>
</div>
<!-- //RIGHT COLUMN-->
<?php endif; ?>
<?php $this->genBlockEnd ($this->getBlocksXML ('middle')) ?>
</div>
<?php
//Add fix height for main area
if (T3Common::node_attributes ($this->getBlocksXML ('middle'), 'fixheight')) {
$this->showBlock ('fixheight');
}
?>
<!-- //MAIN CONTAINER -->
<?php
$blks = &$this->getBlocksXML ('bottom');
$blocks = &T3Common::node_children($blks, 'block');
foreach ($blocks as $block) :
if (T3Common::getBrowserSortName() == 'ie' && T3Common::getBrowserMajorVersion() == 7) echo "<br class="clearfix"/>";
$this->showBlock ($block);
endforeach;
?>
</div>
<?php if ($this->isIE6()) : ?>
<?php $this->showBlock('ie6/ie6warning') ?>
<?php endif; ?>
<?php $this->showBlock('debug') ?>
</body>
</html>1 user says Thank You to TomC for this useful post
November 19, 2012 at 10:08 am #473436I have the same problem, and like the first poster “I don’t have the folder page in the line”
It really isn’t there.
I am using the JA_Nex template with JAT3 framework on Joomla 2.5.
Any ideas?
Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
November 21, 2012 at 3:26 am #473716<em>@jancoulson 346894 wrote:</em><blockquote>I have the same problem, and like the first poster “I don’t have the folder page in the line”
It really isn’t there.
I am using the JA_Nex template with JAT3 framework on Joomla 2.5.
Any ideas?</blockquote>
Yes, T3V2 framework has changed a lot back then.
Now, you have to add onto every page you want to track. Right immediately before the closing </head> tag, please copy this file:
pluginssystemjat3jat3base-themesdefaultblockshead.php
To folder:
templatesja_nexblocks
Then add your code to the end of your file. -
AuthorPosts
This topic contains 6 replies, has 4 voices, and was last updated by Luna Garden 12 years ago.
We moved to new unified forum. Please post all new support queries in our New Forum