Sign in

Statistics ?

  • This topic has 8 replies, 4 voices, and was last updated 3 years, 8 months ago by .
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #2012
    Avatar photodperarna

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

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

    So inside the code, editing myself ?

     

    Thank you.

    #2017
    Avatar photoVerhoeckx

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

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

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

     

    #2097
    Avatar photogadgetboy

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

    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
    Avatar photogadgetboy
    Verhoeckx wrote:

    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.