Plausible
Add one or more Plausible analytics dashboards to Strapi v5.
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.
Supported Strapi versions
- Strapi v5
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
npm install strapi-plausibleWith yarn
yarn add strapi-plausibleIn the config/plugins.js file add:
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:
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:
{
name: "strapi::security",
config: {
contentSecurityPolicy: {
useDefaults: true,
directives: {
"frame-src": ["https://plausible.io"],
...📝 License
Made in 🇳🇱 by @douwepausma inspired by Devtastic.
Install now
npm install strapi-plausible
Create your own plugin
Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.