Activities

vunv-1219

vunv-1219 posted a new question

analytics-module •

How to use ignoreRoutes in modules option

I have some routes are /admin, /admin/1, /admin/2. And i do not want to send pageview if router change to these routes. I use option ignoreRoutes: ['/admin'], but it not working.
Sorry because my English is bad. I believe you can help me.!

xdcha

xdcha posted a new bug report

analytics-module •

bug Analytics module not working in production mode

Version

2.2.0

Reproduction link

https://codepen.io/d--c/pen/rNNLXRq?editors=0010

Steps to reproduce

In development mode, with the debug code the script works fine. In production, I do not get any hits.

googleAnalytics: {
   id: "UA-147623000-1"
  }

What is expected ?

Hits in production mode

What is actually happening?

No hits in production mode.

Additional comments?

I did contemplate just leaving it in dev mode enabled:true but then the console is riddled with info which I do not wish to be seen by the user. I am using Nuxt v 2.10.1.

Do I need to change the 'Mode' in my Nuxt.config.js? Or shallI just use the Plugin method available on the official docs? https://nuxtjs.org/faq/google-analytics/

mehidi258

mehidi258 posted a new question

analytics-module •

UTM parameters are not tracking without page reload.

I am using analytics-module with this option normal page views are tracking was working perfectly but UTM parameters are not working without page reload.
{ id: process.env.NUXT_ENV_GTAG_ID, config: { anonymize_ip: true, send_page_view: true }, debug: process.env.NODE_ENV === "production" ? false : true, disableAutoPageTrack: false }

redLineColor

redLineColor posted a new question

analytics-module •

Disable plugin programmatically

Hello,
I integrate this module using the documentation and i read https://matteogabriele.gitbooks.io/vue-analytics/content/docs/opt-out.html on how to disable the plugin.
Because I use nuxtjs config file i just add

modules: [
['@nuxtjs/google-analytics', {
id: 'UA-12301-2'
}]
]

If an user enter on my website, a popup will show to accept cookie consent and a cookie will be set. User can disable tracking libraries like google, facebook, etc, but i don't understand how i can disable this module if user choose to not been tracking.

On documentation the above example should work

Vue.use(VueAnalytics, {
id: 'UA-XXX-X',
disabled: () => {
return true
}
})

but i don't understand how to obtain that using nuxtjs.

I wanna make function like:

Vue.use(VueAnalytics, {
id: 'UA-XXX-X',
disabled: () => {
return this.$cookies.get('cookie-tracking-disabled') === true
}
})

daveatfuse

daveatfuse posted a new question

analytics-module •

Adding multiple items to a transaction

Not sure if this is a bug but I can't seem to find a way to implement adding multiple products to a transaction as per the https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce#sendingData

Setup:

Vue.use(VueAnalytics, {
                id: process.env.googleAnalyticsID,
                router,
                ecommerce: {
                    enabled: true,
                    enhanced: false,
                },
                debug:{
                    enabled: true,
                    sendHitTask: true
                }
            });

Request:

`this.$ga.ecommerce.addTransaction({
                id: this.id,
                revenue: "37.39", 
                currency: "NZD",
            });
        this.$ga.ecommerce.addItem([{
            name: "ClassCode - Description", // Product name. Required.
            category: "Vehicle",
            id: this.id, // Booking ID. Required.
            price: "11.99", // Unit price.
            days: "4", // HirePeriodInDays
            quantity: "1", // Quantity.
            currency: "NZD",
        }]);

        this.$ga.ecommerce.addItem({
            name: "Peace of Mind", // Product name. Required.
            category: "Insurance",
            id: this.id, // Booking ID. Required.
            price: "5.00", // Unit price.
            quantity: "1", // Quantity.
            currency: "NZD",
        });

        this.$ga.ecommerce.addItem({
            name: "Afterhours Pick up", // Product name. Required.
            category: "Other Fees",
            id: this.id, // Booking ID. Required.
            price: "5.00", // Unit price.
            quantity: "1", // Quantity.
            currency: "NZD",
        });

        this.$ga.ecommerce.addItem({
            name: "OneWay Fee", // Product name. Required.
            category: "Other Fees",
            id: this.id, // Booking ID. Required.
            price: "5.00", // Unit price.
            quantity: "1", // Quantity.
            currency: "NZD",
        });

        this.$ga.ecommerce.addItem({
            name: "Airport Concession Fee", // Product name. Required.
            category: "Other Fees",
            id: this.id, // Booking ID. Required.
            price: "5.00", // Unit price.
            quantity: "1", // Quantity.
            currency: "NZD",
        });

        this.$ga.ecommerce.addItem({
            name: "Accessory name", // Product name. Required.
            category: "Accessory",
            id: this.id, // Booking ID. Required.
            price: "5.00", // Unit price.
            quantity: "1", // Quantity.
            currency: "NZD",
        });

        this.$ga.ecommerce.send();`

I can see the collect request going through but only the transaction and last item is in there, I can get it working if I do a send() after adding each item but I doubt that's correct.

I have also tried passing in an array of items which was unsuccessful, and the addProduct function is not available in the non enhanced version. What is the correct way of handling this, or is it a bug?

codeofsumit

codeofsumit posted a new question

analytics-module •

Module not sending to GA anymore

Since a few days my site using this module does not send to GA anymore. Locally I can also not see anything sent nor trigger the realtime info in the Google Analytics dashboard.

Once I enable sendHitTask it works again.

    '@nuxtjs/google-analytics',
      {
        id: 'UA-118133246-14',
        debug: {
          enabled: false,
          sendHitTask: true
        },
      },

is that normal?

Bildschirmfoto 2019-09-11 um 10.23.39.png

arkhamvm

arkhamvm posted a new question

analytics-module •

How to add `require` `displayfeatures` ?

Hi. How i can add ga('require', 'displayfeatures'); ?

kaboume

kaboume posted a new feature request

analytics-module •

idea Nuxt Analytics & PWA (service worker)

What problem does this feature solve?

After installed the nuxt PWA module in my nuxt application, my application stopped to send the data to Google Analytics (whit the Nuxt Analytics module).
After many hours, I found a solution to let the module work again.
I had to add in the nuxt.config.js the sendHitTask like that

googleAnalytics: {
id: process.env.GOOGLEANALYTICSID,
debug: {
enabled: false,
sendHitTask: true
}
},

If you know why….

salamwaddah

salamwaddah posted a new question

analytics-module •

What is the option to control async attribute?

I need to control the async and the defer attributes on the script. Is there such an option?

Here's my current setup.

['@nuxtjs/google-analytics', {
  id: 'UA-XXXX..,
}]
fmoessle

fmoessle posted a new question

analytics-module •

How to integrate Google Optimize

On normal website google recommends to integrate google optimize like this:

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', '{{ENV.googleAnalytics}}', 'auto');
  ga('require', '{{ENV.googleOptimize}}');
</script>

My aproach with this nuxt-module is that I create a client side-only nuxt plugin like so:

export default ({ app }, inject) => {
app.$ga.require(process.env.googleOptimize)
}

This is working :)
But do you recommend to do it like I did or is there a better way?
Thanks in advance!

sebastianmarines

sebastianmarines posted a new bug report

analytics-module •

bug Analytics not loading and disabling css module

Version

2.2.0

Reproduction link

https://github.com/sebastianmarines/maz/

Steps to reproduce

Install google analytics

yarn install @nuxtjs/google-analytics

Add module to nuxt.config.js

modules: [
    '@nuxtjs/bulma',
    ['@nuxtjs/google-analytics', {
       id: 'UA-12301-2'
     }]
  ],

What is expected ?

Analytics module should load

What is actually happening?

The css module is being blocked from loading and the analytics module is not loading

syonip

syonip posted a new bug report

analytics-module •

bug Google analytics id not added to pages

Version

2.2.0

Reproduction link

https://github.com/syonip/nuxt-ga-bug

Steps to reproduce

npx create-nuxt-app nuxt-test
cd nuxt-test
npm i @nuxtjs/google-analytics

add following to nuxt.config.js:

modules: [
    ['@nuxtjs/google-analytics', {
      id: 'UA-****'
    }]
  ]

run

npm run dev

What is expected ?

I expect to see activity in GA realtime page.
I expect the html page to contain the 'UA-****' string somewhere but it doesn't.

What is actually happening?

I don't see any activity in GA realtime page when browsing to localhost:3000.
Generated html contains <script async="" src="https://www.google-analytics.com/analytics.js" charset="utf-8"></script> but not the required call to gtag function with my id.

josh-king

josh-king posted a new bug report

analytics-module •

bug Programmatically enabling/disabling not working

Version

1

Reproduction link

https://codesandbox.io/s/kor57z1vy7

(Please use the extension Google Tag Manager to view the tag)

Steps to reproduce

Whenever you try to programmatically fire the $ga.enable/$ga.disable the tracking is still active

What is expected ?

That specific user should be disabled from being tracked in the real time tracking

What is actually happening?

The calls don't seem to do anything, they are initialized but not functioning.

FelixRe0

FelixRe0 posted a new question

analytics-module •

How to access Analytics Ready

Hi I'm trying to implement a GDPR compliant tracking.
In my nuxt config I have disabled set to true. When the user enters the page I check the consent and run this.$ga.enable()
When the consent has already been given I check that in the mounted hook and run enable again.
However, it seems that window['ga-disable-UA-XXXXXXXXX-X'] is set to false but google analytics is loaded shortly after, setting it to true again.

According to the official article on GDPR it should be the way to implement or am I wrong?
https://medium.com/dailyjs/google-analytics-gdpr-and-vuejs-e1bd6affd2b4

I've tried to only run enable when ga is loaded, but the official implementation does not work for the nuxt module.
https://github.com/MatteoGabriele/vue-analytics/blob/HEAD/docs/when-google-analytics-is-loaded.md

ricardogobbosouza

ricardogobbosouza posted a new question

analytics-module •

Run CircleCI on PRs

Run CircleCI on PRs

ricardogobbosouza

ricardogobbosouza posted a new question

analytics-module •

Run CircleCI on PRs
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!