Dashboard widgets for the Sanity Content Studio which embeds various analytics dashboards.
Supported:
Setup your local NPM configuration to recognise @wrux
as a Github package (docs):
Open ~/.npmrc
and paste the following while replacing YOUR_GITHUB_PERSONAL_ACCESS_TOKEN
with your personal access token;
@wrux:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_PERSONAL_ACCESS_TOKEN
Install the package:
npm install --save @wrux/sanity-analytics-dashboard-widgets
Ensure that you have followed install and usage instructions for @sanity/dashboard.
Add an analaytics dashboard as a widget to @sanity/dashboard plugin in sanity.config.ts (or .js):
import { dashboardTool } from '@sanity/dashboard';
import { plausibleWidget } from '@wrux/sanity-analytics-dashboard-widgets';
export default defineConfig({
// ...
plugins: [
dashboardTool({
widgets: [
plausibleWidget({
auth: 'some-string',
domain: 'some-domain.com',
}),
],
}),
],
});
// List args for plausibleWidget
// List args for fathomWidget
MIT-licensed. See LICENSE.