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
  • clarity-analytics
  • google-analytics
  • umami-analytics

umami-analytics

@vuepress/plugin-umami-analytics

Seamlessly integrate Umami Analytics—a privacy-focused, open-source web analytics solution—into your VuePress site.

Usage

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

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

This plugin supports both Umami Cloud and Self-hosted instances.

Guide

Reporting Events

Out of the box, the plugin automatically captures page view events during initial visits and subsequent route changes.

For advanced tracking needs, the global umami object is exposed on the window instance. You can utilize this to trigger custom events programmatically via umami.track().

Options

idRequiredstring

The unique Website ID provided by your Umami dashboard.

linkstring
Default'https://us.umami.is/script.js'

The source URL of the Umami tracking script.

autoTrackboolean
Defaulttrue

Whether to track pageviews and events automatically.

Set this to false if you wish to disable automatic data collection and rely solely on manual tracking functions.

cacheboolean

Whether to cache the tracking script to improve its performance.

Note: This feature utilizes Session Storage. Depending on your region's regulations, you may need to disclose this usage to your visitors.

domainsstring[]

A list of allowed domains. Tracking will only occur when the site is accessed via these specific domains.

hostUrlstring
Defaultlink

A custom endpoint for sending analytics data. If not specified, it defaults to the script location defined in link.

Edit this page on GitHub
Last Updated: 9/28/26, 4:40 AM
Contributors: Mister-Hope
Prev
google-analytics