Statistics ?
- This topic has 8 replies, 4 voices, and was last updated 11 months, 2 weeks ago by .
- AuthorPosts
- March 9, 2020 at 7:32 am#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
March 9, 2020 at 2:07 pm#2015Verhoeckx
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
March 9, 2020 at 3:13 pm#2016dperarna
So inside the code, editing myself ?
Thank you.
March 9, 2020 at 3:37 pm#2017Verhoeckx
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 :-)!
March 9, 2020 at 3:40 pm#2019Bob
SupportJust 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!March 9, 2020 at 4:24 pm#2020Verhoeckx
You are right! That’s much easier to use! I forgot that option.
March 14, 2020 at 2:27 am#2097gadgetboy
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?
March 14, 2020 at 6:46 pm#2102Verhoeckx
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 beforethe closing tag of the body element.
March 14, 2020 at 8:13 pm#2104gadgetboy
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 beforethe 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.
- AuthorPosts
- You must be logged in to reply to this topic.