+ Reply to Thread
Results 1 to 4 of 4

Thread: Google Analytics Code

  1. #1

    Google Analytics Code

    where to add the google Analytics Code

    The code should be placed in head.tpl NOT header.tpl
    tag <head> ....Google Code </head>
    I have added the code in file head.tpl (ftp://templates>>your_template>>tpl>>head.tpl)
    after the <head> tag
    Note: you have to add {literal} ... google code ... {/literal}

    <head>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    {literal}
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-1660xxxxx-1"></script>
    <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());

    gtag('config', 'UA-1660xxxxx-1');
    </script>
    {/literal}

    OK It's working fine
    Last edited by Amer Almusafer; February 28, 2021 at 08:48 PM.

  2. #2
    Amer,

    I placed the code in Flynax's Free "Verification Code" plugin found here:

    - https://www.flynax.com/plugins/verification-code.html

    The advertisement for the plugin indicates:

    - Allows you to add CSS and JS codes to a page
    - Offers two positions for inserting a code: top and bottom
    - Enables you to manage codes from admin panel

    Is specifically states the following about Google Analytics:

    "With the help of Flynax verification code, you may now add Meta Tags, JS codes from third-party services to the header or footer of your website, for instance web services like Google Search Console (Webmaster Tools), Google Analytics, chats, trackers like Alexa and many others."

  3. #3
    I did so but when i save it i get a 403 server errror.

  4. #4
    Can you paste the code here with the id?

+ Reply to Thread