Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • petrahk Friend
    #159398

    Hi, does anybody know, where to put analytics code in this template???
    I do not want to use any extension, just paste the code into a file.
    Thank you!

    Phill Moderator
    #374068

    Create a custom html module but make sure you use the no editor option or TinyMCE etc will parse your code as text. Put your code in that then place this new module in the debug position.

    That should do the trick.

    rwjoomlart Friend
    #391095

    Can you please explain how to use the no editor option. Cant work out how to do this. Added code via the View HTML source code but it just disappears. (J 1.6)

    Phill Moderator
    #391105

    J1.6 is a complicated beast when it comes to adding code. Even in the “No Editor” mode by default it will strip your code. In this case you need to set text filters to allow it. However, since the above was written Google have changed their preferred method of inserting analytics code. Please follow the instructions below.

    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.

    <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>

    rwjoomlart Friend
    #391180

    Ive copied the default.php and inserted the code into the file but find there is not a “page” folder at templates>ja_events>page>

    Please advise.

    Phill Moderator
    #391251

    You simply create the folder yourself and put the file in it. The file in the templates folder then overrides the one in the plugin folder so your changes remain when you update the plugin.

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

This topic contains 6 replies, has 3 voices, and was last updated by  Phill 12 years, 11 months ago.

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