nuxt-twitter-pixel-module

npm (scoped with tag) npm js-standard-style

A NuxtJS module thats injects Twitter Pixel code

Table of Contents

Requirements

  • npm or yarn
  • NuxtJS
  • NodeJS

Install

$ npm install --save nuxt-twitter-pixel-module
// or
$ yarn add nuxt-twitter-pixel-module

Getting Started

Add nuxt-twitter-pixel-module to modules section of nuxt.config.js.

{
  modules: [
    // Simple usage
    'nuxt-twitter-pixel-module',

    // With options
    ['nuxt-twitter-pixel-module', {
      /* module options */
      track: 'PageView',
      pixelId: 'TWITTER_PIXEL',
    }],
 ]
}

or even

{
  modules: [
    'nuxt-twitter-pixel-module',
  ],
  twitter: {
    /* module options */
    track: 'PageView',
    pixelId: 'TWITTER_PIXEL_ID',
  },
}

License

MIT License