-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Analytics module not working in production mode #60
Comments
same here |
Wonder if it is to do with the latest Nuxt? |
same, "nuxt": "^2.9.2", |
confirming this isnt working on my end |
Same here. |
same here in nuxt 2.10 |
Same here. Downgrading nuxt to 2.9.2 works as temporary fix |
BROKEN, even when downgrading to 2.9.2! |
Confirmed broken in 2.10, working in 2.9.2 |
Use the "thumbs up" emoji on the actual issue instead of posting "same here", "broken" or similar. Thanks. I can't reproduce it though with the latest Settings: ['@nuxtjs/google-analytics', {
id: 'my-analytics-uid',
debug: {
sendHitTask: isProd // true
},
set: [
{ field: 'anonymizeIp', value: true }
]
}], I'd appreciate a CodeSandbox as reproduction. |
Not working either nuxt 2.6.3 & nuxtjs/google-analytics 2.2.0 weird because stopped working just 3 days ago. |
Im using GTM now after i saw this... |
@manniL With respect, I am not sure a Code sandbox will be able to assist further. I simply install via command line and then reference as I did in my reproduction link. Are you saying the code should be as you have mentioned in your post? Here is my
|
In production using "nuxt": "^2.10.1",
"@nuxtjs/google-analytics": "^2.2.0" with the module setting modules: [
[
"@nuxtjs/google-analytics",
{ id: "GA-ID-Here"}
]
] I can confirm the google analytics tracking script does not work. However, if I change the module setting to modules: [
[
"@nuxtjs/google-analytics",
{ id: "GA-ID-Here"}, debug: { sendHitTask: true }
]
] as @manniL showed above the tracking script works again in production. |
@manniL @sankhagowit Thanks so much both. I do have it working now. Thanks once more!!! :-) |
adding this resolved it for me too
|
We should not need to manually set |
vue-analytics by default sets sendHitTask to true. VueAnalytics Nuxt version: https://github.com/nuxt-community/analytics-module/blob/master/lib/module.js#L7 |
Yeah i agree
…On Tue, Oct 22, 2019, 15:30 Robert Wagner ***@***.***> wrote:
We should not need to manually set sendHitTask to true though. It sounds
like something in Nuxt 2.10+ changed with regards to determining if we are
in dev or prod, so this is no longer sending hits.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#60>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACQV6VL5FVZ77SS7M3TJMWTQP3TN7ANCNFSM4JBVR57Q>
.
|
In prod mode In dev mode
|
@ricardogobbosouza When will the next version be published? I am using the top-level option so in the meantime should I just do this: googleAnalytics: {
id: 'UA-1234567-8',
debug: {
sendHitTask: process.env.NODE_ENV !== 'development'
}
} |
Version
2.2.0
Reproduction link
https://codepen.io/d--c/pen/rNNLXRq?editors=0010
Steps to reproduce
In development mode, with the debug code the script works fine. In production, I do not get any hits.
What is expected ?
Hits in production mode
What is actually happening?
No hits in production mode.
Additional comments?
I did contemplate just leaving it in dev mode
enabled:true
but then the console is riddled with info which I do not wish to be seen by the user. I am using Nuxt v 2.10.1.Do I need to change the 'Mode' in my Nuxt.config.js? Or shallI just use the Plugin method available on the official docs? https://nuxtjs.org/faq/google-analytics/
The text was updated successfully, but these errors were encountered: