Giter Club home page Giter Club logo

Comments (22)

cksho avatar cksho commented on May 30, 2024 5

same here
"@nuxtjs/google-analytics": "^2.2.0",
"nuxt": "^2.10.0",

from google-analytics-module.

cliffordh avatar cliffordh commented on May 30, 2024 5

BROKEN, even when downgrading to 2.9.2!

from google-analytics-module.

RobbieTheWagner avatar RobbieTheWagner commented on May 30, 2024 5

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.

isaumya avatar isaumya commented on May 30, 2024 5

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

MatteoGabriele avatar MatteoGabriele commented on May 30, 2024 3

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.

ryarturogi avatar ryarturogi commented on May 30, 2024 2

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.

sankhagowit avatar sankhagowit commented on May 30, 2024 2

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.

yooneskh avatar yooneskh commented on May 30, 2024 1

adding this resolved it for me too

debug: {
  sendHitTask: true
}

from google-analytics-module.

xdcha avatar xdcha commented on May 30, 2024

Wonder if it is to do with the latest Nuxt?

from google-analytics-module.

vana-dev avatar vana-dev commented on May 30, 2024

same,

"nuxt": "^2.9.2",
"@nuxtjs/google-analytics": "^2.2.0",

from google-analytics-module.

tetreault avatar tetreault commented on May 30, 2024

confirming this isnt working on my end

from google-analytics-module.

maiconpazin avatar maiconpazin commented on May 30, 2024

Same here.

from google-analytics-module.

jake-101 avatar jake-101 commented on May 30, 2024

same here in nuxt 2.10

from google-analytics-module.

mfrascati avatar mfrascati commented on May 30, 2024

Same here. Downgrading nuxt to 2.9.2 works as temporary fix

from google-analytics-module.

DispatchCommit avatar DispatchCommit commented on May 30, 2024

Confirmed broken in 2.10, working in 2.9.2

from google-analytics-module.

manniL avatar manniL commented on May 30, 2024

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.

ryarturogi avatar ryarturogi commented on May 30, 2024

Im using GTM now after i saw this...
I tried using Google Tag Manager + Google Analytics with Nuxt.js

from google-analytics-module.

xdcha avatar xdcha commented on May 30, 2024

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

xdcha avatar xdcha commented on May 30, 2024

@manniL @sankhagowit Thanks so much both. I do have it working now. Thanks once more!!! :-)

from google-analytics-module.

yooneskh avatar yooneskh commented on May 30, 2024

from google-analytics-module.

ricardogobbosouza avatar ricardogobbosouza commented on May 30, 2024

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.

pi0 avatar pi0 commented on May 30, 2024

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)

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.