Skip to content

spekulatius/vuepress-plugin-plausible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plausible Analytics Plugin for VuePress

This plugin helps to integrate Plausible Analytics in your VuePress documentation website. Plausible is a alternative to Google Analytics with a focus on privacy.

There is also a list privacy-focused tracking solutions.

Install

To install the VuePress plugin, run one of the following commands:

npm install vuepress-plugin-plausible

# or

yarn add vuepress-plugin-plausible

Configuration

Add the VuePress plugin in your site or theme config file. The configuration is done as part of the plugin configuration. Your configuration file is usually located under .vuepress/config.js. Extend it with this line:

module.exports = {
  plugins: {
    'plausible': { domain: 'your-domain.com' },

    // other plugins
    // ...
  }
}

Self hosted url

If you are self hosting Plausible, you can use this option

module.exports = {
  plugins: {
    'plausible': { domain: 'your-domain.com', 'selfHostedUrl': 'your-self-hosted-domain-url' },

    // other plugins
    // ...
  }
}

Outbound link tracking

Plausible can also track all outbound links. To enable outbound link tracking with this extension, do this instead of the above:

module.exports = {
  plugins: {
    'plausible': { domain: 'your-domain.com', outboundLinkTracking: true },

    // other plugins
    // ...
  }
}

For more details on how to work with VuePress plugins, check out the official docs.

License

This package is released under the MIT license by Peter Thaleikis.