Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • CandiceDixon Friend
    #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 Moderator
    #368372

    Adding 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 Friend
    #375227

    Which Plugin do you recommend, Phil?

    Phill Moderator
    #375228
Viewing 4 posts - 1 through 4 (of 4 total)

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