-
AuthorPosts
-
December 23, 2010 at 9:32 pm #157830
I should not have to add a third party extension in order to install the Google Analytics code. Can someone please direct me to which file in the JA Droid template I can add the google analytics code?
Thanks
Phill ModeratorPhill
- Join date:
- February 2014
- Posts:
- 7013
- Downloads:
- 40
- Uploads:
- 77
- Thanks:
- 917
- Thanked:
- 2206 times in 1818 posts
December 23, 2010 at 9:39 pm #368372Adding a third party component is an easy way and many people choose to do that. For those that prefer to hard code it into the content it is a simple matter of adding your code to the correct block. As I am sure you know, we still have to generate all the required parts for a valid webpage and in T3V2 templated much of this is done in the plugin. So open plugins>system>jat3>base-themes>default>blocks>head.php where you will find the following.
<?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.
# ------------------------------------------------------------------------
*/
?>
<script type="text/javascript">
var siteurl='<?php echo JURI::base(true) ?>/';
var tmplurl='<?php echo JURI::base(true)."/templates/".T3_ACTIVE_TEMPLATE ?>/';
</script>
<jdoc:include type="head" />
<?php if (T3Common::mobile_device_detect()=='iphone'):?>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=5.0; user-scalable=1;" />
<meta name="apple-touch-fullscreen" content="YES" />
<?php endif;?>
<?php if (T3Common::mobile_device_detect()):?>
<meta name="HandheldFriendly" content="true" />
<?php endif;?>
<link href="<?php echo T3Path::getUrl('images/favicon.ico') ?>" rel="shortcut icon" type="image/x-icon" />
<?php JHTML::stylesheet ('', 'templates/system/css/system.css') ?>
<?php JHTML::stylesheet ('', 'templates/system/css/general.css') ?>
<!-->
<style>
.clearfix { display: inline-block; } /* IE7xhtml*/
</style>
<!-->
Simply add your code in there as required.
The only problem that can cause is if you update the JAT3 plugin your code will be overwritten. However, The JAt3 system will first look in the templates folder for the head.php file (or any of the default blocks) first so if you copy that file to templated>ja_droid>blocks>head.php it will overide the one in the plugin and will not be updated when the plugin gets replace.
If it is a simple piece of code you wish in the head I would just leave it in the plugin file. I do this to save space and always keep notes of the files I modify on my desktop.
carynh Friendcarynh
- Join date:
- January 2011
- Posts:
- 25
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 5
- Thanked:
- 2 times in 1 posts
February 5, 2011 at 10:47 pm #375227Which Plugin do you recommend, Phil?
Phill ModeratorPhill
- Join date:
- February 2014
- Posts:
- 7013
- Downloads:
- 40
- Uploads:
- 77
- Thanks:
- 917
- Thanked:
- 2206 times in 1818 posts
February 5, 2011 at 10:56 pm #375228This one seems to do the trick – http://extensions.joomla.org/extensions/site-management/site-traffic-statistics/9940?qh=YTozOntpOjA7czo5OiJhbmFseXRpY3MiO2k6MTtzOjg6ImFuYWx5dGljIjtpOjI7czoxMDoiYW5hbHl0aWNzJyI7fQ%3D%3D
You could use just the plugin or the whole lot depending on your needs.
1 user says Thank You to Phill for this useful post
-
AuthorPosts
This topic contains 4 replies, has 3 voices, and was last updated by Phill 13 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum