Google analytics 4 in Plone 6

I am trying to set google analytics 4 tag in my plone6 site.
Is there an official way to do it? and can I find a documentation for it?

Thank you.

We're currently using GitHub - collective/volto-google-analytics: Volto addon for Google Analytics integration . It's a pretty minimal package with a simple setup.

Thank you for the info.

I tried the volto-google-analytics, but I am not sure how to set it up.
The GitHub page states I should prepare a .env file containing the analytics CODE, but I am not sure where I should put such .env file in the frontend/backend folder structure layout of plone6.

Moreover, I assume I should component shadow the footer component to import the module and insert the relevant code in the footer of site pages.

If there is a tutorial for doing this right, I would be much appreciated.

1 Like