I am trying Plausible, and - according to their instructions - after installing the theme, I created the file plausible_head.html, under /layout/partial with the script like the following:
If you follow their (my ?? ) instruction you do not have to create the file plausible_head.html
It is much simpler.
Just do this :
Add this plausible-hugo component as a theme in your theme section in config.toml.
Add a [params.plausible] section in your config.toml file.
Call the partial plausible_head.html in your own <head> section.
The <head> section already exists in your site in your existing partials (.html files in /layout/partials/).
You have to find it and add the line there.
You SHOULD NOT CREATE a new <head> section. And especially NOT in the content files.