Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.5 KB

File metadata and controls

53 lines (37 loc) · 1.5 KB

📦 docusaurus-plugin-yandex-metrica

Yandex Metrica plugin for Docusaurus v3.

⚠️ Production only (by default)

By default this plugin inactive in development and only active in production to avoid polluting the analytics statistics.

Installation

Install the plugin with npm:

npm install --save docusaurus-plugin-yandex-metrica

or with yarn:

yarn add docusaurus-plugin-yandex-metrica

Add the plugin to the config file

Add the plugin and the counter ID to your docusaurus.config.js:

export default {
  plugins: [
    ['docusaurus-plugin-yandex-metrica', {
      counterID: '86645179',
    }],
  ],
};

Configuration

Accepted fields:

Name Type Default Description
counterID number Required The tracking ID of your Metrica service.
enableInProdOnly boolean true Enable plugin only in Production or Development also
webvisor boolean false Enable Session Replay (Webvisor), scroll map, form analysis
ecommerce string false Enable E-commerce (to use it pass the "Container name")
trackHash boolean false Enable Hash tracking in the browser address bar
alternativeCdn boolean false Use Alternative CDN

🤷‍♂️ Didn't find the required field? Create an Issue and request the desired field.