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

Yandex Metrika plugin for VuePress

License

Notifications You must be signed in to change notification settings

teners/vuepress-plugin-metrika

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 📈