sanity-plugin-plausible-analytics
v1.1.0
Published
Access your plausible analytics in sanity studio.
Downloads
146
Maintainers
Readme
sanity-plugin-plausible-analytics
Inspired by https://www.sanity.io/plugins/plausible-iframe for v2.

Plausible configuration
- Create a shared link without password protection.
- Add the shared link to the plugin configuration.
Installation
pnpm install sanity-plugin-plausible-analyticsUsage
Add it as a plugin inside the dashboardTool in sanity.config.ts (or .js):
import {defineConfig} from 'sanity'
import {dashboardTool} from '@sanity/dashboard'
import {plausibleWidget} from 'sanity-plugin-plausible-analytics'
export default defineConfig({
//...
plugins: [
dashboardTool({
widgets: [
plausibleWidget({
url: 'https://plausible.io/share/your-project?auth=xxxx',
}),
],
}),
],
})Options
url- Required - the shared link from plausibletitle- Optional - defaults to 'Plausible Analytics'height- Optional - defaults to 'calc(100vh - 143px)'
License
MIT © Stijn
Develop & test
This plugin uses @sanity/plugin-kit with default configuration for build & watch scripts.
See Testing a plugin in Sanity Studio on how to run this plugin with hotreload in the studio.
