vuepress-plugin-yandex-metrika
v1.0.1
Published
VuePress 2 plugin - Yandex Metrika
Downloads
48
Maintainers
Readme
vuepress-plugin-yandex-metrika
Русский | English
Note: This plugin is provided for VuePress 2
Yandex Metrika plugin for VuePress 2, automatically add Yandex Metrika Counter to your VuePress site.
Install
pnpm add -D vuepress-plugin-yandex-metrika
# OR
yarn add -D vuepress-plugin-yandex-metrika
# OR
npm install -D vuepress-plugin-yandex-metrika
Usage
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
Options
id
Type:
string
|Number
Description: The counter ID assigned in the personal account Yandex Metrika
options
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.