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

    hi Joomlart-Friends,
    i’m new in the world of Joomart. Can anyone tell me how i can insert the google-code’s (googleanalytics and so well ) between head and body-tag??
    i try it in template html, but it isn’t works.
    thanks for the good support.
    Markus from projekt.ofranet.

    sorry for my bad english

    beastmode54 JA JobBoard
    #340486

    I have always just entered it in to the footer. There are also a lot of good analystics pluguns and such that do it for you.

    cansay Friend
    #340499

    <em>@ofranet 174731 wrote:</em><blockquote>hi Joomlart-Friends,
    i’m new in the world of Joomart. Can anyone tell me how i can insert the google-code’s (googleanalytics and so well ) between head and body-tag??
    i try it in template html, but it isn’t works.
    thanks for the good support.
    Markus from projekt.ofranet.

    sorry for my bad english</blockquote>

    you must insert it via FTP 🙂

    Go to “/templates/ja_ores/layouts/”

    There will be 3 files.
    Default.php
    Hanheld.php
    Iphone.php

    All 3 files need the code, that way you can track iphones and so on also 🙂

    Open the file and browse to the buttom of the file default.php
    after the php endif; ? > inset you google code.

    Then save.
    Then test website still works fine.
    Then validate that the tracking works from your google analytics/webmaster account

    [PHP]<?php if ($this->isIE6()) : ?>
    <?php $this->loadBlock(‘ie6/ie6warning’) ?>
    <?php endif; ?>

    <script type=”text/javascript”>
    var gaJsHost = ((“https:” == document.location.protocol) ? “https://ssl.” : “http://www.”);
    document.write(unescape(“%3Cscript src='” + gaJsHost + “google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E”));
    </script>
    <script type=”text/javascript”>
    try {
    var pageTracker = _gat._getTracker(“UA-XXXXXXXX-X”);
    pageTracker._trackPageview();
    } catch(err) {}</script>
    </body>

    </html>[/PHP]

    damian Friend
    #340506

    i’m use this plugin : http://extensions.joomla.org/extensions/site-management/site-analytics/11594 for all my site. just one minute install

    raredesign Friend
    #398881

    <em>@cansay 174752 wrote:</em><blockquote>you must insert it via FTP 🙂

    Go to “/templates/ja_ores/layouts/”

    There will be 3 files.
    Default.php
    Hanheld.php
    Iphone.php

    All 3 files need the code, that way you can track iphones and so on also 🙂

    Open the file and browse to the buttom of the file default.php
    after the php endif; ? > inset you google code.

    Then save.
    Then test website still works fine.
    Then validate that the tracking works from your google analytics/webmaster account

    [PHP]<?php if ($this->isIE6()) : ?>
    <?php $this->loadBlock(‘ie6/ie6warning’) ?>
    <?php endif; ?>

    <script type=”text/javascript”>
    var gaJsHost = ((“https:” == document.location.protocol) ? “https://ssl.” : “http://www.”);
    document.write(unescape(“%3Cscript src='” + gaJsHost + “google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E”));
    </script>
    <script type=”text/javascript”>
    try {
    var pageTracker = _gat._getTracker(“UA-XXXXXXXX-X”);
    pageTracker._trackPageview();
    } catch(err) {}</script>
    </body>

    </html>[/PHP]</blockquote>

    I see a lot of people referring to “/templates/ja_ores/layouts/” but I don’t see the layouts directory. I am using my cpanel file explorer. Is it only visible via FTP?

    Phill Moderator
    #398891

    <em>@raredesign 250223 wrote:</em><blockquote>I see a lot of people referring to “/templates/ja_ores/layouts/” but I don’t see the layouts directory. I am using my cpanel file explorer. Is it only visible via FTP?</blockquote>

    I personally would always use ftp as it is a lot more reliable.

    First we need to copy a file from the plugins folder to the templates folder so copy

    plugins>system>jat3>jat3>base-themes>default>blocks>head.php and copy it to

    templates>ja_yourt3basedtemplatename>blocks>head.php

    The new file will take precedence over the one in the plugin

    In that you will see the following code, place your analytics code right at the bottom

    <?php
    /*
    # ------------------------------------------------------------------------
    # JA T3 System plugin for Joomla 1.6
    # ------------------------------------------------------------------------
    # Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
    # @license - Copyrighted Commercial Software
    # Author: J.O.O.M Solutions Co., Ltd
    # Websites: http://www.joomlart.com - http://www.joomlancers.com
    # This file may not be redistributed in whole or significant part.
    # ------------------------------------------------------------------------
    */
    ?>
    <script type="text/javascript">
    var siteurl='<?php echo JURI::base(true) ?>/';
    var tmplurl='<?php echo JURI::base(true)."/templates/".T3_ACTIVE_TEMPLATE ?>/';
    var isRTL = <?php echo $this->isRTL()?'true':'false' ?>;
    </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=1; 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>
    <!-->

    Depending on your template this may not put it right before the </head> tag but it will put it very close. It all depends on what other extensions are loaded into Joomla which may load some of their own scripts after this.

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

This topic contains 6 replies, has 6 voices, and was last updated by  Phill 13 years, 5 months ago.

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