nuxt-community / google-gtag-module

Enable google gtagjs for NuxtJs
MIT License
145 stars 29 forks source link

The pageview is being sent separately from the setting of the send_page_view parameter. #49

Open shoyaUeno opened 3 years ago

shoyaUeno commented 3 years ago

Hello,

There is a problem with sending page views. Page views are sent when send_page_view parameter is set to true. However, apart from setting send_page_view parameter, the pageview is being submitted.

If I set send_page_view parameter to true, the pageviews would be sent twice, with "send pageviews independent of settings" and "send pageviews by settings".

Currently, pageviews are sent once if the send_page_view parameter is set to false.

I don't use other gtag.js or analytics.js modules. Please tell me the possible causes.

The following are the current settings in nuxt.config.ts.

{
  modules: [
    '@nuxtjs/google-gtag'
  ],
  'google-gtag': {
    id: process.env.GAID('UA-XXXX-XX'),
    debug: false,
    config: {
      send_page_view: false,
    },
  },
}