0.1.6 • Published 11 months ago

@4lch4/docusaurus-plugin-umami v0.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@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
0.1.6

11 months ago