Sign in

Statistics ?

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #2012
    dperarna

    DO you have or do you plan to insert a place for statistics of visit inside ?

    Can I insert Google analytics or any competitor ?

     

    Thanks

    Dominique

    #2015
    Verhoeckx

    Hello Dperarna,

    You can add Google Analytics by adding the Google Analytics code to the the partial that contains the HTML code of the head of the theme that you are using. I used the Starter theme and I had to add the code to the head.hbs partial.

    Good luck,

    Verhoeckx

     

     

     

    #2016
    dperarna

    So inside the code, editing myself ?

     

    Thank you.

    #2017
    Verhoeckx

    Yes, exactly!

    It’s also possible that a theme already has added this functionality. In that case there should be a setting in the Theme settings. If not: add it yourself :-)!

    #2019
    BobBob
    Support

    Just use the Custom HTML tool.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #2020
    Verhoeckx

    You are right! That’s much easier to use! I forgot that option.

     

    #2097
    gadgetboygadgetboy

    I’m trying to use goatcounter. It specifies “inserting just before the closing </body> tag”.”

    If I’m using the Custom HTML Tool, which should I select?

    #2102
    Verhoeckx

    I just looked at the code of in the Starter theme:

     

    <body>
        {{!-- Insert some custom code by Custom HTML tool --}}
        {{{@bodyCustomCode}}}
    
        ...
        ...
    
        {{!-- Insert some custom code by Custom HTML tool --}}
        {{{@footerCustomCode}}}
    </body>

    Conclusion: when you add code to the Body (in the HTML Yool) the code is inserted just after the opening tag of the body element and if you add code to the Footer (again in the HTML Tool) the code is inserted just before the closing tag of the body element.

    #2104
    gadgetboygadgetboy

    I just looked at the code of in the Starter theme:

    Conclusion: when you add code to the Body (in the HTML Yool) the code is inserted just after the opening tag of the body element and if you add code to the Footer (again in the HTML Tool) the code is inserted just before the closing tag of the body element.

    Thanks. I should have mentioned that I’m using the Mercury theme. Either way, I wasn’t sure if I should be editing the theme directly.

    I got it to work by putting it in the footer.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.