VuePress EcosystemVuePress Ecosystem
  • Theme Guidelines
  • theme-default
  • Hope Theme
  • Plume Theme
  • Reco Theme
  • Feature Plugins
  • Markdown Plugins
  • Search Plugins
  • Blog Plugins
  • PWA Plugins
  • Analytics Plugins
  • SEO Plugins
  • Development Plugins
  • Tool Plugins
  • AI Plugins
  • @vuepress/helper
  • English
  • 简体中文
GitHub
  • Theme Guidelines
  • theme-default
  • Hope Theme
  • Plume Theme
  • Reco Theme
  • Feature Plugins
  • Markdown Plugins
  • Search Plugins
  • Blog Plugins
  • PWA Plugins
  • Analytics Plugins
  • SEO Plugins
  • Development Plugins
  • Tool Plugins
  • AI Plugins
  • @vuepress/helper
  • English
  • 简体中文
GitHub
  • baidu-analytics
  • google-analytics
  • umami-analytics

umami-analytics

@vuepress/plugin-umami-analytics

Integrate Umami Analytics into VuePress.

Usage

npm i -D @vuepress/plugin-umami-analytics@next
.vuepress/config.ts
import { umamiAnalyticsPlugin } from '@vuepress/plugin-umami-analytics'

export default {
  plugins: [
    umamiAnalyticsPlugin({
      // options
    }),
  ],
}

You can use Umami Cloud or Self-host Umami.

Reporting Events

The plugin automatically reports page view events on page visits and route changes.

A global umami object is available on the window object, and you can call umami.track for custom tracking.

Options

id

  • Type: string
  • Required: Yes
  • Details: The website ID from Umami Analytics

link

  • Type: string
  • Default: 'https://us.umami.is/script.js'
  • Details: URL to the Umami Analytics tracking script

autoTrack

  • Type: boolean

  • Default: true

  • Details:

    By default, Umami tracks all pageviews and events automatically.

    Set to false to disable automatic tracking and use manual tracking functions.

cache

  • Type: boolean

  • Details:

    Cache data to improve tracking script performance.

    Note: This will use session storage so you may need to inform your users.

domains

  • Type: string[]
  • Details: Restrict tracking to specific domains only.

hostUrl

  • Type: string
  • Default: link
  • Details: Custom endpoint for sending tracking data.
Edit this page on GitHub
Last Updated:: 6/2/25, 4:28 PM
Contributors: Mister-Hope
Prev
google-analytics