@nuxtjs/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:/

Stats

StarsIssuesVersionUpdatedCreatedSize
@nuxtjs/yandex-metrika
243401.3.0a year ago4 years agoMinified + gzip package size for @nuxtjs/yandex-metrika in KB

Readme

Yandex Metrika

npm npm (scoped with tag)

Add Yandex Metrika to your nuxt.js application.

This plugins automatically sends first page and route change events to yandex metrika.

Note: yandex metrika is not enabled in dev mode. You can set environment variable NODE_ENV to production for testing in dev mode.

Setup

  • Add @nuxtjs/yandex-metrika dependency using yarn or npm to your project
  • Add @nuxtjs/yandex-metrika to modules section of nuxt.config.js
    {
    modules: ['@nuxtjs/yandex-metrika'],
    }
    

Configure

You can pass options directly in module declaration.

{
  modules: [
    [
      '@nuxtjs/yandex-metrika',
      {
        id: 'XXXXXX',
        webvisor: true,
        // clickmap:true,
        // useCDN:false,
        // trackLinks:true,
        // accurateTrackBounce:true,
      }
    ],
  ]
}

Or you can specify yandexMetrika key.

{
  modules: ['@nuxtjs/yandex-metrika'],
  yandexMetrika: {
    id: 'XXXXXX',
    webvisor: true,
    // clickmap:true,
    // useCDN:false,
    // trackLinks:true,
    // accurateTrackBounce:true,
  },
}

Options

For more information:

id

  • Required

accurateTrackBounce

childIframe

clickmap

defer

ecommerce

params

userParams

trackHash

trackLinks

trustedDomains

type

useCDN

ut

webvisor

triggerEvent

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.