Question: Is this module supposed to track page views automatically?
mroddev opened this issue · comments
Environment
- Operating System:
Windows_NT
- Node Version:
v16.14.2
- Nuxt Version:
3.2.3
- Nitro Version:
2.2.3
- Package Manager:
npm@8.5.0
- Builder:
vite
- User Config:
runtimeConfig
,modules
,extends
,css
,vite
,app
,unhead
,gtag
- Runtime Modules:
nuxt-gtag@0.2.2
,@pinia/nuxt@0.4.7
,nuxt-og-image@1.4.21
- Build Modules:
-
Reproduction
No Reproduction
Describe the bug
By following the Basic Usage instructions I'm not getting any tracking on google analytics 4 real time views dashboard.
I can see that the js file is being loaded on the 'network' tab on my website but the page views are not being tracked.
My nuxt.config file looks like this
export default defineNuxtConfig({
...
modules: ["nuxt-gtag", ...],
gtag: {
id: 'G-XXXXXXXX', // My GA measurement ID
},
...
}];
Sorry if this is normal behaviour and I'm supposed to do some more configuration.
Additional context
No response
Logs
No response
Yes, this module should track pages automatically, if you have set up Google Analytics with:
Are you trying locally or on the interweb? Maybe Google won't track page views for
localhost
, but only your configured domain.
Weird, I'm doing it on a live website.
If I try it with the example from the Nuxt docs it works but with double entries, which is a problem.
When trying 'nuxt-gtag' with the above settings and with "Page changes based on browser history events" active, the analytics dashboard doesn't report anything back when you visit or navigate the website.
Seems like a bug. We will have to investigate that.