+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Google Analytics code integration

  1. #1

    Google Analytics code integration

    Hi all,
    I want to show how you can integrate the Google Analytics code to your site.
    Here the full instruction:
    - Create new Google Analytics account and get javascript code for integration. (https://www.google.com/analytics)
    - Find and open following file:
    /templates/CURRENT_TEMPLATE/tpl/footer.tpl
    - find following tag:
    Code:
    Only registered members can view the code.
    and add the Google Analytics javascript code before tag,
    also do not forget to place the following code line before Google code:
    Code:
    Only registered members can view the code.
    and the following after Google code:
    Code:
    Only registered members can view the code.
    - save changes and close the file

    Then you should wait about 5-10 hours while Google detect javascript code in your site.
    Please ask your questions here if you have some problems with integrations.

  2. #2
    Junior Member
    Join Date
    May 2010
    Posts
    17

    Re: Google Analytics code integration

    Hello Mike,

    wonderful, it works perfect!

    Thanks and regards,

    Thomas

  3. #3
    Junior Member
    Join Date
    Mar 2012
    Posts
    9
    Just a quick update for anyone -- like me -- who stumbles upon this post. Google now recommends installing Analytics in the header, just before the </head> tag. So for best results, take everything that Mike F. said up above, and just move your Analytics code to the header.

  4. #4

    </head> tag

    Hi guys.

    I can't find the </head> tag in footer.tpl. Should I follow the original instructions or am I looking in the wrong file or am I missing something?

    Thanks,

    Hemal

  5. #5
    Quote Originally Posted by Hemal Ruparelia View Post
    Hi guys.

    I can't find the </head> tag in footer.tpl. Should I follow the original instructions or am I looking in the wrong file or am I missing something?

    Thanks,

    Hemal
    </head> tag is in the header.tpl file
    Last edited by Chris Brown; July 27, 2012 at 06:03 PM.

  6. #6
    Thanks mate. Yeah I would have thought that would be the logical choice and had a look there (looked again after reading your post).

    But all I see in my header file is this:


    {if $smarty.const.RL_LANG_DIR == 'rtl'} {assign var='text_dir' value='right'} {assign var='text_dir_rev' value='left'} {else} {assign var='text_dir' value='left'} {assign var='text_dir_rev' value='right'} {/if} {if $rss} {/if} {include file='js_config.tpl'} {rlHook name='tplHeader'} {$ajaxJavascripts}
    {include file='blocks'|cat:$smarty.const.RL_DS|cat:'lang_se lector.tpl'}


    {$lang.slogan_large}
    {assign var='slogan' value=' '|explode:$lang.slogan_small} {foreach from=$slogan item='slogan_word' name='slogan'} {if $smarty.foreach.slogan.last} {$slogan_word} {else} {$slogan_word} {/if} {/foreach}
    {include file='menus'|cat:$smarty.const.RL_DS|cat:'main_men u.tpl'}

    I am a bit of a nooby so I might be missing something very obvious here.

    Any ideas?

    Again, the help is much appreciated.

    Thanks

  7. #7
    hmmm mines in the header.tpl ......what version software do u use and which template?

  8. #8
    I use the realty spring (The latest version of Flynax)

  9. #9
    Hi Hemal,

    are you sure? I have had a look in the header.tpl of reality spring and found there the head tags without problems. Have you had a look in the correct tpl - file? You will find it in this folder:

    /templates/yourtemplate/tpl

    There you have to open the header.tpl file.

    Best regards,

    Cammie

  10. #10
    Hey thanks Cammie,

    That is the file I am looking at and this is verbatim what is on the header.tpl file:

    {if $smarty.const.RL_LANG_DIR == 'rtl'} {assign var='text_dir' value='right'} {assign var='text_dir_rev' value='left'} {else} {assign var='text_dir' value='left'} {assign var='text_dir_rev' value='right'} {/if} {if $rss} {/if} {include file='js_config.tpl'} {rlHook name='tplHeader'} {$ajaxJavascripts}
    {if $pageInfo.Key == 'home'} {include file='header_home.tpl'} {else} {include file='header_main.tpl'} {/if}

    Think I might have to submit a ticket...

    Thanks heaps anyway and let me know if you get any other ideas.

+ Reply to Thread