Working with Plausible Analytics
Hello,
I recently tried integrating my self-hosted Plausible instance with my site, but I faced issues with the CSP.
I finally got it working, but I spent a few hours experimenting with another Hugo module and changing the server's response headers.
I didn't know much about CSP before. It would be helpful and time-saving if you could update the Plausible Analytics Guide to include that, in case of self-hosting, we also need to add the Plausible domain to connect-src and script-src.
connectsrc = [
"'self'",
"https://plausible.example.com",
]
scriptsrc = [
"'self'",
"'unsafe-inline'",
"https://plausible.example.com",
]
It might not be obvious to everyone, but now that I know, I will be more careful. And thank you for this amazing theme!
Sure. We need to mention that using CSP is not necessary too. It's a choice.
I'm going to flag this issue, asking for contributions. Anyone could add an entry in the docs folder about it.