Русский | English
Note: This plugin is provided for VuePress 2
Yandex Metrika plugin for VuePress 2, automatically add Yandex Metrika Counter to your VuePress site.
pnpm add -D vuepress-plugin-yandex-metrika
# OR
yarn add -D vuepress-plugin-yandex-metrika
# OR
npm install -D vuepress-plugin-yandex-metrika
import yandexMetrikaPlugin from 'vuepress-plugin-yandex-metrika';
module.exports = {
plugins: [
yandexMetrikaPlugin({
id: 123123123,
config: {
clickmap: false,
trackLinks: true,
accurateTrackBounce: true,
ecommerce: "dataLayer"
}
}),
],
};
The counter is not added to the pages in the development and SSR mode
-
Type:
string
|Number
-
Description: The counter ID assigned in the personal account Yandex Metrika
-
Type:
Object
-
Description: Counter parameters that can be configured and seen in the counter insertion script generated in your personal account Yandex Metrika. And also get acquainted with the available in counter documentation.