Comments (22)
same here
"@nuxtjs/google-analytics": "^2.2.0",
"nuxt": "^2.10.0",
from google-analytics-module.
BROKEN, even when downgrading to 2.9.2!
from google-analytics-module.
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.
from google-analytics-module.
@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'
}
}
from google-analytics-module.
vue-analytics by default sets sendHitTask to true.
Not sure why, in the Nuxt module wrapper, this property has been set to undefined. Doesn't make any sense to me
VueAnalytics Nuxt version: https://github.com/nuxt-community/analytics-module/blob/master/lib/module.js#L7
VueAnalytics Original version: https://github.com/MatteoGabriele/vue-analytics/blob/master/src/config.js#L44
from google-analytics-module.
Not working either nuxt 2.6.3 & nuxtjs/google-analytics 2.2.0 weird because stopped working just 3 days ago.
from google-analytics-module.
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.
from google-analytics-module.
adding this resolved it for me too
debug: {
sendHitTask: true
}
from google-analytics-module.
Wonder if it is to do with the latest Nuxt?
from google-analytics-module.
same,
"nuxt": "^2.9.2",
"@nuxtjs/google-analytics": "^2.2.0",
from google-analytics-module.
confirming this isnt working on my end
from google-analytics-module.
Same here.
from google-analytics-module.
same here in nuxt 2.10
from google-analytics-module.
Same here. Downgrading nuxt to 2.9.2 works as temporary fix
from google-analytics-module.
Confirmed broken in 2.10, working in 2.9.2
from google-analytics-module.
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 nuxt-edge
build.
Settings:
['@nuxtjs/google-analytics', {
id: 'my-analytics-uid',
debug: {
sendHitTask: isProd // true
},
set: [
{ field: 'anonymizeIp', value: true }
]
}],
I'd appreciate a CodeSandbox as reproduction.
from google-analytics-module.
Im using GTM now after i saw this...
I tried using Google Tag Manager + Google Analytics with Nuxt.js
from google-analytics-module.
@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 package.json
if it is of any use?
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate"
},
"dependencies": {
"@nuxtjs/google-analytics": "^2.2.0",
"huntjs": "^5.0.0",
"lazysizes": "^5.1.2",
"nuxt": "^2.10.1",
"sniffer": "github:watsondg/sniffer",
"vue-scrollto": "^2.17.1"
},
"devDependencies": {
"coffee-loader": "^0.9.0",
"coffeescript": "^2.4.1",
"node-sass": "^4.12.0",
"pug": "^2.0.3",
"pug-plain-loader": "^1.0.0",
"sass-loader": "^8.0.0"
}
from google-analytics-module.
@manniL @sankhagowit Thanks so much both. I do have it working now. Thanks once more!!! :-)
from google-analytics-module.
from google-analytics-module.
In prod mode sendHitTask
will be set to true
in next version 9c55a28
In dev mode sendHitTask
is set to false
Note: By default, you won't see hits going out in dev mode. For testing analytics in dev mode, you must add the following to nuxt.config.js
https://github.com/nuxt-community/analytics-module#usage
from google-analytics-module.
Fixed in 2.2.1: https://github.com/nuxt-community/analytics-module/blob/master/CHANGELOG.md#221-2019-10-25
from google-analytics-module.
Related Issues (20)
- Disable Google Analytics for 404 pages generated by error.vue of layout component HOT 1
- Pageviews / Landing Pages are "not set"
- Custom Dimension for Pageview
- docs error?
- asyncID with multiple id does not seem to work HOT 2
- Google Ads says that my Google Analytics account is misconfigured and is underreporting visitors
- Content Security Policy
- Dependency Dashboard
- Any plans to support GA4? HOT 12
- $ga is missing from router middleware`s context HOT 3
- docs(setup): add typescript instructions HOT 1
- Multiple Google Analytic ID's
- Add support for nuxt 3 HOT 22
- Passing uid with event tracking
- Anonimize IP HOT 1
- Universal Analytics will no longer process new data in standard properties beginning 1 July 2023 HOT 3
- Measurement ID instead of Tracking ID
- Nuxt 3 GA4 timeline? HOT 11
- CORS issue
- Nuxt 3 Support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-analytics-module.