Giter Club home page Giter Club logo

Comments (15)

ricardogobbosouza avatar ricardogobbosouza commented on June 9, 2024 3

It may be necessary to update the documentation or enable sendHitTask in dev mode, what do you think @pi0 ?

from google-analytics-module.

syonip avatar syonip commented on June 9, 2024 3

Made a PR: #54

from google-analytics-module.

Anaphase avatar Anaphase commented on June 9, 2024 2

@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.

syonip avatar syonip commented on June 9, 2024 1

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.

azigler avatar azigler commented on June 9, 2024 1

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.

manniL avatar manniL commented on June 9, 2024 1

I'd accept a PR ☺️

from google-analytics-module.

azigler avatar azigler commented on June 9, 2024

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.

ricardogobbosouza avatar ricardogobbosouza commented on June 9, 2024

Hi @syonip , @azigler

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.

syonip avatar syonip commented on June 9, 2024

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.

ricardogobbosouza avatar ricardogobbosouza commented on June 9, 2024

@syonip
In mode dev sendHitTask is disabled

from google-analytics-module.

ricardogobbosouza avatar ricardogobbosouza commented on June 9, 2024

Think we can close this?

from google-analytics-module.

azigler avatar azigler commented on June 9, 2024

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.

MatteoGabriele avatar MatteoGabriele commented on June 9, 2024

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.

manniL avatar manniL commented on June 9, 2024

@Anaphase @ricardogobbosouza

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.

ricardogobbosouza avatar ricardogobbosouza commented on June 9, 2024

@manniL
I believe a tip in the documentation would help

from google-analytics-module.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.