Skip to content

spekulatius/vuepress-plugin-plausible

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.