Google Analytics Module
Clone or download
Latest commit d32daf4 Oct 28, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci initialize Sep 1, 2017
.github chore: add issue template May 16, 2018
lib use serialize for options Oct 25, 2017
test test: increase coverage May 23, 2018
.editorconfig initialize Sep 1, 2017
.eslintrc.js chore: ditch nuxt-module-builder May 23, 2018
.gitignore initialize Sep 1, 2017
CHANGELOG.md chore(release): 2.0.2 Nov 24, 2017
LICENSE initialize Sep 1, 2017
README.md Fix indent Oct 27, 2018
package.json chore: update vue-analytics to 5.12.2 May 23, 2018
yarn.lock chore: update vue-analytics to 5.12.2 May 23, 2018

README.md

Google Analytics

npm (scoped with tag) npm CircleCI Codecov Dependencies

js-standard-style

Google Analytics integration for Nuxt.js with vue-analytics

📖 Release Notes

Setup

  • Add @nuxtjs/google-analytics dependency using yarn or npm to your project
  • Add @nuxtjs/google-analytics to modules section of nuxt.config.js
{
  modules: [
    // Simple usage
    ['@nuxtjs/google-analytics', {
      id: 'UA-12301-2'
    }]
  ]
}

using top level options

{
  modules: [
    ['@nuxtjs/google-analytics']
  ],
 
  'google-analytics': {
    id: 'UA-12301-2'
  }
}

Usage

Click here for all options and features of vue-analytics

Differences between vue-analytics and the Nuxt.js implementation:

  • The router instance is already added out of the box (read here if you need to disable it)
  • The id and ua properties have the exact same behaviour. The ua property has been added for backwards compatibily with previous releases

License

MIT License

Copyright (c) -