Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working with Plausible Analytics #875

Open
realchandan opened this issue Dec 27, 2023 · 1 comment
Open

Working with Plausible Analytics #875

realchandan opened this issue Dec 27, 2023 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@realchandan
Copy link

realchandan commented Dec 27, 2023

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",
]

image

It might not be obvious to everyone, but now that I know, I will be more careful. And thank you for this amazing theme!

@luizdepra
Copy link
Owner

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.

@luizdepra luizdepra added help wanted Extra attention is needed good first issue Good for newcomers labels Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants