Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Latest commit

 

History

History
52 lines (40 loc) · 1.04 KB

README.md

File metadata and controls

52 lines (40 loc) · 1.04 KB

Yandex Metrika VuePress plugin

Version License

Integrate Yandex.Metrika into your VuePress app with a few configuration lines 🔧

Install

From your VuePress project directory run

yarn add --dev --exact vuepress-plugin-metrika

Usage

Add the following lines to the .vuepress/config.js:

module.exports = {
  plugins: [
    ...
    [
      'metrika',
      {
        counter: 'XXXXXXX',
        config: {...},
      },
    ],
  ]
}

where XXXXXXX is your Metrika counter, and config is an optional parameter with the following defaults:

{
  accurateTrackBounce: true,
  clickmap: true,
  trackLinks: true,
  webvisor: false
}

See more about Yandex.Metrika configuration options.

And you're good to go! 🚀 Build your VuePress site as usual and enjoy your analytics 📈