This package has been deprecated

Author message:

I no longer use this package and have started using other analytics tools. feel free to fork and maintain it yourself.

@4lch4/docusaurus-plugin-umami

0.1.6 • Public • Published

@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

  1. Log into your instance of Umami.
  2. In the top right, click on your profile picture and select "Profile".
    • Screenshot 0
    • Screenshot 1
  3. Click on "Websites" in the left sidebar.
    • Screenshot 2
  4. For the website you want to track, click on the "Tracking Code" button.
    • Screenshot 3
  5. The data-website-id property is what you want for the websiteId field and the src property is what you want for the src field.
    • Screenshot 4

Readme

Keywords

Package Sidebar

Install

npm i @4lch4/docusaurus-plugin-umami

Weekly Downloads

1

Version

0.1.6

License

MIT

Unpacked Size

6.58 kB

Total Files

5

Last publish

Collaborators

  • 4lch4-ci
  • alcha