0.0.2 • Published 2 years ago

nuxt-rtrg-vk v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Nuxt VK retargeting plugin

Install

$ npm install --save nuxt-rtrg-vk
// or
$ yarn add nuxt-rtrg-vk

Getting Started

Add nuxt-rtrg-vk to modules section of nuxt.config.js.

{
  modules: [
    ['nuxt-rtrg-vk', {
      /* module options */
      id: 'VK_RETARGETING_ID', 
      priceListId: 'VK_PRICE_LIST_ID', 
      debug: false
    }],
 ]
}

Module options

List of possible options in the module:

OptionDefaultRequiredDescription
idnulltrueThe unique retargeting identifier provided by VK.
priceListIdnullfalseThe unique price list identifier provided by VK. Set it if you want to push custom events
debugfalsefalseBy default, tracking in development mode is disabled. By specifying true, you manually allow tracking in development mode.

Module instance

The tracking instance is available on all vue component instances as $vkRtrg. It has one method - productEvent(event, payload)

OptionTypeRequiredDescription
eventStringtrueCustom event name
payloadObjectfalseCustom event payload