Let’s assume you have deployed a static website via CapRover, and the website is using plausible to collect traffic insights. You used a captain-definiton.json to tell CapRover how to deploy your website. It may look like this:

What you most likely, do not have, is the nginx.conf in line 5.

Create your custom nginx.conf and put it in the same directory as your captain-definiton.json. Look into to the plausible-documentation for details about the content of your configuration file. Here is an example of how it could look like:

That’s it.

Don’t forget to adjust the deployed script in your frontend code.