Show Plausible analytics within Strapi.
npm install strapi-plausible
Add one or more Plausible analytics dashboards to Strapi
A plugin for Strapi that embeds Plausible analytics dashboards. The Strapi Plausible plugin is inspired by it's predecessor created by Devtastic.
npm i strapi-plausible@2.x.x`
- Strapi v4 `yarn add strapi-plausible@1.x.x` (or use this plugin by Devtastic, no multi-dashboard support).Screenshot

Installation
With
npm
`bash
npm install strapi-plausible
`With
yarn
`bash
yarn add strapi-plausible
`In the
config/plugins.js file add:`js
module.exports = ({ env }) => ({
// ...other plugins
plausible: {
config: {
plausibleInstance: 'https://plausible.io', // or your self-hosted url
domains: [
{
name: 'tracked-site.com', // name of the plausible site
auth: 'lNU0nKCmnSxs3HjjWOKtX' // auth token
}
]
}
}
})
`You can create a shared link in Plausible by going to _Site settings › Visibility_.
It looks something like this:
`text
https://plausible.io/share/tracked-site.com?auth=lNU0nKCmnSxs3HjjWOKtX
`⚠️ Make sure not to enable password protection for this link
⚠️ If you're using the
strapi::security middleware with CSP enabled, make sure
to allow plausible.io or your self-hosted instance (e.g. analytics.example.com) as a frame-src. Your config/middlewares.js should look something like:`js
{
name: "strapi::security",
config: {
contentSecurityPolicy: {
useDefaults: true,
directives: {
"frame-src": ["https://plausible.io"],
...
``Made in 🇳🇱 by @douwepausma inspired by Devtastic.