The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
3 posters

    Adding analytics javascript (HotJar) to site.

    avatar
    Guest
    Guest


    Solved Adding analytics javascript (HotJar) to site.

    Post by Guest 12/10/2017, 09:28

    Hi peeps,

    I'm looking to add some analytics to our forum and it needs to be done via the head tags of each page in Javascript.

    I have tried to add this via: Admin > Modules > HTML & JAVASCRIPT > Javascript codes management > (placement) in all pages. The page still won't verify going this route.

    I wasn't sure what to do with the title field so i just made it up. Here is the instructions: Copy and paste the code snippet into the <head> tag on every page where you wish to track visitors and collect feedback. I've adjusted some info in the code to keep it anonymous - but provided something as an example.

    code is:
    <!-- Hotjar Tracking Code for http://www.mywebsiteinhere.com -->
    <script>
    (function(h,o,t,j,a,r){
    h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
    h._hjSettings={hjid:653238,hjsv:6};
    a=o.getElementsByTagName('head')[0];
    r=o.createElement('script');r.async=1;
    r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
    a.appendChild(r);
    })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
    </script>

    Any help implementing this would be super. Thanks again!
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51554
    Reputation : 3524
    Language : English
    Location : United States

    Solved Re: Adding analytics javascript (HotJar) to site.

    Post by SLGray 12/10/2017, 19:09

    Have you tried Google Analytics?

    AP > General > Statistics > Google Analytics



    Adding analytics javascript (HotJar) to site. Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    avatar
    Guest
    Guest


    Solved Re: Adding analytics javascript (HotJar) to site.

    Post by Guest 16/10/2017, 10:15

    SLGray wrote:Have you tried Google Analytics?

    AP > General > Statistics > Google Analytics

    As I have to put in the GA Tracking ID in it's not relevant for the Javascript - which I needed to put in the header tags of the sites pages. Unless I'm missing something?
    Ace 1
    Ace 1
    Helper
    Helper


    Male Posts : 843
    Reputation : 64
    Language : English - French?
    Location : Druid Hill Park

    Solved Re: Adding analytics javascript (HotJar) to site.

    Post by Ace 1 16/10/2017, 14:43

    Um, why not just go to AP > Display > Templates > General > overall_header and look for this line:

    Code:
    <!-- END google_analytics_code -->

    Simply paste your script immediately afterward, then save and publish the template.
    Draxion
    Draxion
    Helper
    Helper


    Male Posts : 2518
    Reputation : 321
    Language : English
    Location : USA

    Solved Re: Adding analytics javascript (HotJar) to site.

    Post by Draxion 16/10/2017, 16:09

    When posting code, please remember to use the code tags.
    Code:
    [code][/code]
    avatar
    Guest
    Guest


    Solved Re: Adding analytics javascript (HotJar) to site.

    Post by Guest 17/10/2017, 09:27

    Thanks to ACE1 this problems now solved! Thank you! Very Happy
    Draxion
    Draxion
    Helper
    Helper


    Male Posts : 2518
    Reputation : 321
    Language : English
    Location : USA

    Solved Re: Adding analytics javascript (HotJar) to site.

    Post by Draxion 17/10/2017, 15:31

    Thank you @Ace 1!

    Problem solved & topic archived.
    Please read our forum rules:  ESF General Rules

      Current date/time is 13/11/2024, 17:53