This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@variate/nuxt

1.0.6 • Public • Published

npm (scoped with tag) NPM GitHub package.json dependency version (prod) Actions Status Actions Status

Variate Nuxt

Installation

  • Install the package:
$ npm install @variate/nuxt
  • Register the module in nuxt.config.js:
buildModules: [
    '@variate/nuxt'
]
  • Create the middleware/variate.js file, it will be used to initialize Variate, pass in the route object and any targeting values of your choice:
export default function ({ app: { $variate }, route }) {
  if($variate) {
    $variate.initialize({
      view: route,
      targeting: {
        ...
      }
    });
  }
};

Configuration

You can override any options from Variate in nuxt.config.js:

variate: {
    debug: true,
    tracking: true,
    pageview: true,
    reporter: () => {
        // your custom reporting function
    }   
}

By default, this module will attempt to load any configuration file named variate.json in the source directory of Nuxt directory.

If you would like to customize this path, specify the configPath in the variate config block in nuxt.config.js.

Package Sidebar

Install

npm i @variate/nuxt

Weekly Downloads

0

Version

1.0.6

License

BSL 1.1

Unpacked Size

9.77 kB

Total Files

6

Last publish

Collaborators

  • climbingcode
  • foxted