docusaurus-plugin-yandex-metrica
v1.2.1
Published
Yandex Metrica plugin for Docusaurus v2.
Readme
📦 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-metricaor with yarn:
yarn add docusaurus-plugin-yandex-metricaAdd 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.
