Strapi plugin logo for Plausible

Plausible

Add one or more Plausible analytics dashboards to Strapi v5.

thumbnail for Plausible
Logo - Strapi Plausible plugin

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

Screenshot - Strapi Plausible plugin

Installation

With npm

npm install strapi-plausible

With yarn

yarn add strapi-plausible

In the config/plugins.js file add:

1module.exports = ({ env }) => ({
2  // ...other plugins
3  plausible: {
4    config: {
5      plausibleInstance: 'https://plausible.io', // or your self-hosted url
6      domains: [
7        {
8          name: 'tracked-site.com', // name of the plausible site
9          auth: 'lNU0nKCmnSxs3HjjWOKtX' // auth token
10        }
11      ]
12    }
13  }
14})

You can create a shared link in Plausible by going to Site settings › Visibility. It looks something like this:

1https://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:

1 {
2    name: "strapi::security",
3    config: {
4      contentSecurityPolicy: {
5        useDefaults: true,
6        directives: {
7          "frame-src": ["https://plausible.io"],
8        ...

📝 License

MIT License

Made in 🇳🇱 by @douwepausma inspired by Devtastic.

Install now

npm install strapi-plausible

STATS

2 GitHub stars66 weekly downloads

Last updated

74 days ago

Strapi Version

5.19.0 and above

Author

github profile image for douwepausma
douwepausma

Useful links

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.