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@nextimport { 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
stringThe unique Website ID provided by your Umami dashboard.
string'https://us.umami.is/script.js'The source URL of the Umami tracking script.
booleantrueWhether 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.
booleanWhether 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.
string[]A list of allowed domains. Tracking will only occur when the site is accessed via these specific domains.
stringlinkA custom endpoint for sending analytics data. If not specified, it defaults to the script location defined in link.
