Comments (15)
It may be necessary to update the documentation or enable sendHitTask
in dev mode, what do you think @pi0 ?
from google-analytics-module.
Made a PR: #54
from google-analytics-module.
@ricardogobbosouza I agree! I just spent too long trying to figure out why it wasn't working locally, and it turns out that it was because I wasn't setting debug.sendHitTask
to true. The readme doesn't really make that clear, and I feel like it should default to true anyway?
from google-analytics-module.
Update: in production it seems to work.
So maybe it's just the configuration for dev mode that's not taking effect
from google-analytics-module.
Yes, I just checked and the UA string is present when generating in production, but not in dev mode. Is there a way to enable it in dev mode for sanity checking?
from google-analytics-module.
I'd accept a PR
from google-analytics-module.
I'm also having this bug in Nuxt 2.7.1 with @nuxtjs/google-analytics 2.2.0. I tried using both configuration options in the README.
from google-analytics-module.
Have tried this?
https://matteogabriele.gitbooks.io/vue-analytics/content/docs/turn-off-development.html
Or
https://matteogabriele.gitbooks.io/vue-analytics/content/docs/console-logs.html
from google-analytics-module.
Thanks @ricardogobbosouza, I've tried this setting and it works in dev:
debug: {
enabled: true,
sendHitTask: true
}
so I guess the only problem is that the docs say:
You can disable module for nuxt dev by setting dev: false option in module options
,
but it seems the default is for it to be disabled in dev mode.
What should the default be for dev mode?
from google-analytics-module.
@syonip
In mode dev sendHitTask
is disabled
from google-analytics-module.
Think we can close this?
from google-analytics-module.
The documentation seems unclear, like @syonip says. Setting dev: true
in the module options doesn't execute sendHitTask
, which is the expected behavior.
from google-analytics-module.
The documentation in the vue-analytics repo is exclusively for vue-analytics. The package was created standalone and just wrapped in a Nuxt component to be boot up and start doing certain things automatically.
You won't find anything about Nuxt in the documentation so if something specifically about Nuxt is working adding or removing a boolean here or there, is not intentional
from google-analytics-module.
A hint in the docs (that the module won't send data to GA in dev mode) would make sense from my POV. Please also take into consideration that changes are only made in nuxt dev
which makes sense as you usually don't want to have development traffic.
https://github.com/nuxt-community/analytics-module/blob/master/lib/module.js#L14-L24
from google-analytics-module.
@manniL
I believe a tip in the documentation would help
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.