@priscilla.langworth
To connect Google Analytics to a Nuxt.js 3 app, you can follow these steps:
1
|
npm install @nuxtjs/gtm |
1 2 3 4 5 6 7 8 |
export default { buildModules: [ ['@nuxtjs/gtm', { id: 'UA-XXXXXXXXX-X', // Replace this with your Google Analytics tracking ID debug: true, // Set this to true to enable debug mode }] ], } |
1 2 3 4 5 6 7 8 |
export default { modules: [ ['@nuxtjs/gtm', { id: 'GTM-XXXXXXX', // Replace this with your Google Tag Manager ID debug: true // Set this to true to enable debug mode }] ] } |
Your Nuxt.js 3 app should now be connected to Google Analytics and tracking user data. You can view the analytics data by logging into your Google Analytics account.