Google Analytics integration for Nuxt.js with vue-analytics
@nuxtjs/google-analytics dependency using yarn or npm to your project@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'
}
}
Click here for all options and features of vue-analytics
Differences between vue-analytics and the Nuxt.js implementation:
id and ua properties have the exact same behaviour. The ua property has been added for backwards compatibily with previous releasesCopyright © -
We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.