Yandex Metrica plugin for Docusaurus v2.
npm install docusaurus-plugin-yandex-metricaYandex Metrica plugin for Docusaurus v3.
By default this plugin inactive in development and only active in production to avoid polluting the analytics statistics.
Install the plugin with npm:
``bash`
npm install --save docusaurus-plugin-yandex-metrica
or with yarn:
`bash`
yarn add docusaurus-plugin-yandex-metrica
Add the plugin and the counter ID to your docusaurus.config.js:
`js`
export default {
plugins: [
['docusaurus-plugin-yandex-metrica', {
counterID: '86645179',
}],
],
};
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.