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 will automatically report page view events when visiting and switching pages.

Besides, a global umami object is available on the window object, and you can call umami.track for custom tracker function.

Options

id

  • Type: string
  • Details: The website ID in Umami Analytics

link

  • Type: string
  • Details: Link of umami analytics script

autoTrack

  • Type: boolean

  • Default: true

  • Details:

    By default, Umami tracks all pageviews and events for you automatically. You can disable this behavior and track events yourself using the tracker functions.

cache

  • Type: boolean

  • Details:

    Cache data to improve the performance of the tracking script.

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

domains

  • Type: string[]
  • Details: Let the tracker only run on specific domains.

hostUrl

  • Type: string
  • Details: Location to send data
Edit this page on GitHub
Last Updated:: 4/12/25, 7:03 PM
Contributors: Mister-Hope
Prev
google-analytics