Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nuxt-community/yandex-metrika-module
⚠️ Yandex Collects Your Personal Data! https://en.wikipedia.org/wiki/Yandex#Security
https://github.com/nuxt-community/yandex-metrika-module
Last synced: 3 days ago
JSON representation
⚠️ Yandex Collects Your Personal Data! https://en.wikipedia.org/wiki/Yandex#Security
- Host: GitHub
- URL: https://github.com/nuxt-community/yandex-metrika-module
- Owner: nuxt-community
- Created: 2020-12-29T10:21:09.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-16T02:42:21.000Z (11 months ago)
- Last Synced: 2024-08-02T01:21:39.783Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 16.6 KB
- Stars: 12
- Watchers: 4
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Yandex Metrika
[![npm](https://img.shields.io/npm/dt/@nuxtjs/yandex-metrika.svg?style=flat-square)](https://www.npmjs.com/package/@nuxtjs/yandex-metrika)
[![npm (scoped with tag)](https://img.shields.io/npm/v/@nuxtjs/yandex-metrika/latest.svg?style=flat-square)](https://www.npmjs.com/package/@nuxtjs/yandex-metrika)> [!WARNING]
> Yandex Metrika is known for Security and Privacy issues. Please [Read More Here](https://en.wikipedia.org/wiki/Yandex#Security).This plugin automatically sends first page and route change events to yandex metrika.
## Setup
- Add `@nuxtjs/yandex-metrika` dependency using yarn or npm to your project
- Add `@nuxtjs/yandex-metrika` to `modules` section of `nuxt.config.js````js
{
modules: ['@nuxtjs/yandex-metrika'],
}
```## Configure
You can pass options directly in module declaration:
```js
{
modules: [
[
'@nuxtjs/yandex-metrika',
{
id: 'XXXXXX',
webvisor: true,
// clickmap: true,
// useCDN: false,
// trackLinks: true,
// accurateTrackBounce: true,
}
]
]
}
```Or you can specify `yandexMetrika` key:
```js
{
modules: ['@nuxtjs/yandex-metrika'],
yandexMetrika: {
id: 'XXXXXX',
// ...
}
}
```In Nuxt 2.13+, you can also use public runtime config:
```js
{
modules: ['@nuxtjs/yandex-metrika'],
publicRuntimeConfig: {
yandexMetrika: {
id: process.env.YANDEX_METRIKA_ID,
// ...
}
}
}
```## Options
For more information:
- [Documetation for Ya.Metrika](https://yandex.com/support/metrica/code/counter-initialize.html)
- [hit method](https://yandex.com/support/metrica/objects/hit.html)### `id`
- Required
### `useRuntimeConfig`
- Default: `yandexMetrika`
Public runtime config key. Set to `false` to disable runtime configuration.
### `useCDN`
- Default: false
Load metrika script from .
This option can not be provided via runtime config.
### `accurateTrackBounce`
### `childIframe`
### `clickmap`
### `defer`
### `ecommerce`
### `params`
### `userParams`
### `trackHash`
### `trackLinks`
### `trustedDomains`
### `type`
### `ut`
### `webvisor`
### `triggerEvent`