0.1.6 • Published 11 months ago
@4lch4/docusaurus-plugin-umami v0.1.6
@4lch4/Docusaurus-Plugin-Umami
This repo is home to a Docusaurus plugin that is my fork of the docusaurus-plugin-umami
plugin by PatelN123. It enables you to use Umami analytics on a Docusaurus site.
Usage
To use the plugin you must first install it, which you can do by running one of the following commands:
# npm
npm i @4lch4/docusaurus-plugin-umami
# pnpm
pnpm i @4lch4/docusaurus-plugin-umami
# yarn
yarn add @4lch4/docusaurus-plugin-umami
Once you have it installed, you'll need to configure it. To do this, open your docusaurus.config.js
file and add a umami
object to the themeConfig
like so:
// docusaurus.config.js
module.exports = {
plugins: ['@4lch4/docusaurus-plugin-umami'],
themeConfig: {
umami: {
websiteId: 'websiteId', // Instructions below on how to find this
src: 'script src', // Instructions below on how to find this
},
},
}
Getting the Website Id and Script Src
- Log into your instance of Umami.
- In the top right, click on your profile picture and select "Profile".
- Click on "Websites" in the left sidebar.
- For the website you want to track, click on the "Tracking Code" button.
- The
data-website-id
property is what you want for thewebsiteId
field and thesrc
property is what you want for thesrc
field.
0.1.6
11 months ago