Activities

jkhlim

jkhlim resolved the question #c32

analytics-module •

Calling this.$ga.set() in created causes an undefined error.

fixed

jkhlim

jkhlim posted a new question

analytics-module •

Calling this.$ga.set() in created causes an undefined error.

We fixed it.

Thanks guys.

jericopulvera

jericopulvera posted a new feature request

analytics-module •

idea Cacheable Option or Async analytics

What problem does this feature solve?

pagespeed insight optimization suggestion.

What does the proposed changes look like?

It would swap out analytics js to galite when cache: true

Just thought that it would be a good idea to have this in main analytics module of nuxt.

Thanks

emerg

emerg posted a new question

analytics-module •

E-Commerce tracking not registering in GA Dashboard.

I am having an issue getting e-commerce tracking data to actually register and display on the GA dashboard.
I am running a laravel/vue/nuxt app in a vagrant virtual machine on my local computer. Regular analytics data, such as page views, etc is registering and displaying in the GA dashboard just fine, as are "real time" metrics, so I know that my localhost environment is successfully communicating to googles servers and there's no network connectivity issues. The GA e-commerce script is successfully loading into the site, and events seem to fire off correctly, and I'm not seeing any issues when I use the official GA Debugger browser extension for chrome. Initially, I thought perhaps that it was the google analytics delay time that might have been preventing any data from registering in the dashboard immediately, so I waited a day or so, but I'm still getting this screen when I view the e-commerce dashboard in analytics.
Screen Shot 2018-10-22 at 1.28.07 PM.png

This is what the implementation code looks like in my nuxt.config file:
Screen Shot 2018-10-22 at 1.27.19 PM.png

This is my network tab in the developer console showing that both analytics and e-commerce scripts are loading into the site:
Screen Shot 2018-10-22 at 1.30.38 PM.png

This is the code in my vue template which is calling the GA e-commerce functions.
Screen Shot 2018-10-22 at 1.29.10 PM.png

This is what the GA Debugger is logging in the console:
Screen Shot 2018-10-22 at 1.39.07 PM.png

Everything seems to be working fine, but for some reason I am still getting the "This report requires e-commerce tracking to be set up for this view" issue in the GA dashboard, so I'm not able to see any actual data showing up in the dashboard.

This is my first time using vue/nuxt/analytics-module, so I think there might be a slight mishap on my end. Any help/insight would be greatly appreciated.

Thank you!

designcourse

designcourse posted a new question

analytics-module •

Works locally, but not in production

I'm trying to figure out what the issue could be here. I followed the very simple setup instructions as outlined on this repo (npm i --save @nuxtjs/google-analytics), and adding it to the nuxt.config.js modules array.

When I run npm run build and npm run start locally, the analytics "real time" shows my footprint on the site.

When I pushed the code to the production server, ensured npm installed the dependency, reran npm run build / start -- nothing. No errors (even when ran in dev mode), and it's not showing my real time footprint in GA. In GA for the property settings, I have it set to use the correct URL https://mysite.com..

Any ideas?

raapperez

raapperez posted a new feature request

analytics-module •

idea Allow ga's id be a function

What problem does this feature solve?

I have a server that is used for different domains. I want to for each domain it uses a different ga id.

What does the proposed changes look like?

{
  modules: [
    // Simple usage
    ['@nuxtjs/google-analytics', {
      id: () => {
        switch (document.domain) {
          case 'github.com':
            return 'UA-12301-2';
          case 'foo.com':
            return 'UA-12301-3';
          default:
            return 'UA-12301-4';
        }
      }
    }]
 ]
}
raapperez

raapperez posted a new question

analytics-module •

Feature proposal: Allow ga's id be a function

I have a server that is used for different domains. I want to for each domain it uses a different ga id.
Example of use case:

{
  modules: [
    // Simple usage
    ['@nuxtjs/google-analytics', {
      id: () => {
        switch (document.domain) {
          case 'github.com':
            return 'UA-12301-2';
          case 'foo.com':
            return 'UA-12301-3';
          default:
            return 'UA-12301-4';
        }
      }
    }]
 ]
}
Morpheu5

Morpheu5 posted a new question

analytics-module •

How do I preemptively disable the tracking code, e.g. based on opt-out cookie?

I tried calling this.$ga.disable() at many different points in my nuxtjs application, but I always send out a page tracking event — I can see it in the GA real-time view. Obviously you can't have this in a middleware, as this.$ga is not available server-side. So, how am I supposed to do this?

paolodina

paolodina posted a new question

analytics-module •

update to 5.16.0

Is there any technical reason to not update to vue-analytics v5.16.0?

aureliendebord

aureliendebord resolved the question #c23

analytics-module •

Installation problem

Yes, it's solved.

tvvocold

tvvocold posted a new feature request

analytics-module •

idea Update analytics.js to gtag.js

What problem does this feature solve?

Since Google Analytics has released the gtag.js as the recommended tracking code for new implementations. So please update the codes and docs for analytics module: https://nuxtjs.org/faq/google-analytics

What does the proposed changes look like?

Check the GA's doc here: https://developers.google.com/analytics/devguides/collection/gtagjs/migration

aureliendebord

aureliendebord posted a new question

analytics-module •

Installation problem

Hello,
I can not install the analytics-module. I do not see the analytics code in the source code.
Can you tell what I am doing wrong?

I did npm i @nuxtjs/google-analytics --save
Then in my nuxt.config.js file, I set the module:

  modules: [
    ['@nuxtjs/pwa', {
      options: {
        icon: {
          sizes: [512, 192, 380]
        }
      }
    }],
    ['@nuxtjs/axios'],
    ['@nuxtjs/google-analytics', {
      id: 'UA-12345678-9'
    }]
  ],
  /* etc...
ismatim

ismatim posted a new question

analytics-module •

Error with Route Name in ScreenView.

Hi,

I have an issue when I want to enable ScreenView of Vue-Analytics:

Uncaught (in promise) Error: [vue-analytics] Route name is mandatory when using screenview.

[
    '@nuxtjs/google-analytics',
    {
      id: 'UA-XXX-X',
      debug: {
        sendHitTask: true,
        enabled: true,
        trace: false
      },
      autoTracking: {
        screenview: true
      }
    }
  ]

Any idea what's going on ?

amrshakya

amrshakya posted a new question

analytics-module •

two requests are fetching the same GA script js file on firefox browser

im using @nuxtjs/google-analytics and seems like two requests are fetching the same GA script.js file on firefox browser. In chrome it just fetch once. Can anyone help me out

lucpotage

lucpotage posted a new bug report

analytics-module •

bug Unrealistic bounce rate of 10%

Version

2.0.2

Reproduction link

https://www.myscript.com

Steps to reproduce

Installing the module.

What is expected ?

To have a realistic bounce rate.

What is actually happening?

I get a 10% bounce rate which is super low. I'm thinking something is broken with the module.

Here is the link about bounce rates: http://www.gorocketfuel.com/the-rocket-blog/whats-the-average-bounce-rate-in-google-analytics/

homerjam

homerjam posted a new feature request

analytics-module •

idea Urgent: Please publish master to npm so we can opt out for GDPR compliance!

What problem does this feature solve?

Hi - this solves the issue of not being able to opt-out of analytics which is necessary for GDPR compliance in the EU. Your swift attention is most kindly appreciated 🙏 😄

lucpotage

lucpotage resolved the question #c18

analytics-module •

this.$ga is undefined

It does not work inside a mixin. So I moved it into a Vue file directly and it worked.

lucpotage

lucpotage posted a new question

analytics-module •

this.$ga is undefined

I would like to track outbound links with Google Analytics. I tried to add a mixin with the function descibed here but I can't access to this.$ga.
I don't think I have to add Vue Analytics as a plugin on top of this module.

sobolevn

sobolevn posted a new feature request

analytics-module •

idea Add github issue template

What problem does this feature solve?

When creating my first issue for this project I was not informed on how to do it properly.
Since there's no clean sign about using cmty.io.

So, for future contributors it would be very nice to add a template that states, that issues must be created on cmty.io.
Or they will be closed otherwise.

What does the proposed changes look like?

Related: https://github.com/nuxt-community/analytics-module/issues/16

sobolevn

sobolevn posted a new bug report

analytics-module •

bug npm run test does not work

Version

master

Reproduction link

https://github.com/nuxt-community/analytics-module/issues/16

Steps to reproduce

  1. git clone this repo
  2. npm i
  3. npm test

What is expected ?

I expect that tests will be executed without any errors.

What is actually happening?

Tests fail.
Output:

» npm run test

> @nuxtjs/[email protected]2.0.2 test /Users/sobolev/Desktop/analytics-module
> npm run lint && jest


> @nuxtjs/[email protected]2.0.2 lint /Users/sobolev/Desktop/analytics-module
> eslint lib src test

  console.error node_modules/nuxt/lib/core/nuxt.js:166
    Error: [nuxt] Module undefined should export a function
        at ModuleContainer.addModule (/Users/sobolev/Desktop/analytics-module/node_modules/nuxt/lib/core/module.js:113:13)
        at promise.then (/Users/sobolev/Desktop/analytics-module/node_modules/nuxt/lib/common/utils.js:61:61)
        at <anonymous>
        at process._tickCallback (internal/process/next_tick.js:160:7)

Build completed in 12.375s% 

  console.log node_modules/progress-bar-webpack-plugin/node_modules/progress/lib/node-progress.js:179


  console.log node_modules/progress-bar-webpack-plugin/node_modules/progress/lib/node-progress.js:179


  console.log node_modules/friendly-errors-webpack-plugin/src/output.js:81



























  console.log node_modules/friendly-errors-webpack-plugin/src/output.js:103
     DONE  Compiled successfully in 12379ms                               2:40:38 PM

  console.log node_modules/friendly-errors-webpack-plugin/src/output.js:103


  console.log node_modules/nuxt/lib/builder/builder.js:485
    Hash: 129f262eedf51f4aaa86
    Version: webpack 3.12.0
    Time: 12379ms
                                      Asset       Size  Chunks             Chunk Names
        pages/index.d1944e94f3fa94fff074.js  410 bytes       0  [emitted]  pages/index
    layouts/default.cc1854ad9412fd1849aa.js  326 bytes       1  [emitted]  layouts/default
             vendor.a6e76812813970cf0d37.js     144 kB       2  [emitted]  vendor
                app.07d83a8721058ce9e65d.js      26 kB       3  [emitted]  app
           manifest.129f262eedf51f4aaa86.js    1.47 kB       4  [emitted]  manifest
                                   LICENSES  584 bytes          [emitted]  
     + 3 hidden assets

 FAIL  test/module.test.js (17.236s)
  Module
    ✕ render (30ms)

  ● Module › render

    StatusCodeError: 404 - "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Error</title>\n</head>\n<body>\n<pre>Cannot GET /</pre>\n</body>\n</html>\n"

      at new StatusCodeError (node_modules/request-promise-core/lib/errors.js:32:15)
      at Request.plumbing.callback (node_modules/request-promise-core/lib/plumbing.js:104:33)
      at Request.RP$callback [as _callback] (node_modules/request-promise-core/lib/plumbing.js:46:31)
      at Request.self.callback (node_modules/request/request.js:186:22)
      at Request.<anonymous> (node_modules/request/request.js:1163:10)
      at IncomingMessage.<anonymous> (node_modules/request/request.js:1085:12)

----------|----------|----------|----------|----------|-------------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files |        0 |        0 |        0 |        0 |                   |
----------|----------|----------|----------|----------|-------------------|
Test Suites: 1 failed, 1 total
Tests:       1 failed, 1 total
Snapshots:   0 total
Time:        17.878s
Ran all test suites.
  console.log node_modules/nuxt/lib/builder/builder.js:485
    Hash: 0b33a0986a0638a57d72
    Version: webpack 3.12.0
    Time: 604ms
                 Asset    Size  Chunks             Chunk Names
    server-bundle.json  112 kB          [emitted]  

  console.log node_modules/nuxt/lib/core/nuxt.js:126

     OPEN  http://localhost:5060


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @nuxtjs/google[email protected]2.0.2 test: `npm run lint && jest`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @nuxtjs/[email protected]2.0.2 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/sobolev/.npm/_logs/2018-05-15T11_40_40_668Z-debug.log

Additional comments?

My env:

  • Node: v9.4.0
  • Npm: 5.6.0