Skip to main content

All Questions

Tagged with
0 votes
0 answers
43 views

Route on Nuxt 2 fires 2 page views for every visit on nested route when using vue-gtag with Google Analytics 4

I am using Nuxt 2 with a custom router with the nuxtjs/router module I am using vue-gtag library to get Google Analytics 4 running as per the issue mentioned here This custom route fires 2 page ...
PirateApp's user avatar
  • 6,278
0 votes
2 answers
474 views

Vue-gtag @legacy query not returning client id

As I'm using Vue2, I insalled vue-gtag@legacy as it's the version compatible with version 2 of VueJS. main.ts plugin setup: import VueGtagPlugin from "vue-gtag"; Vue.use(VueGtagPlugin, { ...
papryk's user avatar
  • 464
0 votes
1 answer
2k views

vue-gtag is not tracking

I'm trying to track all visited page in my vuejs App, but is not working. main.ts import VueGtag from 'vue-gtag'; Vue.use(VueGtag, { config: { id: process.env.VUE_APP_GA }, enabled: false }, ...
Rafael Ortiz's user avatar
6 votes
2 answers
2k views

How to pass custom user dimension in Google Analytics 4 via VueJS application?

I have a VueJS SPA in which I have user specific information which I want to send in GA once user logged-in as a custom dimension for each and every hit. I have used VueGtag plugin to integrate GA 4 ...
Rohìt Jíndal's user avatar
3 votes
1 answer
3k views

What is the difference between @nuxtjs/google-gtag @nuxtjs/gtm @nuxtjs/google-analytics and vue-gtag, what to use for GA4?

Newbie to this whole analytics thing and am finding this very confusing I wanted to use Google Analytics 4 in my nuxt ssr webapp and am feeling overwhelmed with the number of options Quick issue on ...
PirateApp's user avatar
  • 6,278
3 votes
2 answers
5k views

How to get Google Analytics GA4 to recognise my nuxt website with vue-gtag?

I have a Nuxt.js web client which I'd like to track with Google Analytics. I'm using the vue-gtag like so: /plugins/vue-gtag.js import Vue from 'vue' import VueGtag from 'vue-gtag' export default ({ ...
IVR's user avatar
  • 1,858
2 votes
1 answer
615 views

How to pass SPA version in Google Analytics and VueJS?

I have a VueJS SPA in which I have defined a build version that I can easily access as a javascript variable. I have used VueGtag (https://github.com/MatteoGabriele/vue-gtag) to integrate Google ...
David's user avatar
  • 16.8k
5 votes
1 answer
6k views

Gtag in Nuxt.js

I'm really facing trouble configuring gtag in my nuxt js app. I follow this guide: https://www.carlcassar.com/articles/add-google-analytics-to-a-nuxt-js-app/ This is my plugin : import Vue from '...
Mauro's user avatar
  • 127
0 votes
0 answers
2k views

vue-gtag: `gtag.js couldn't be loaded`

I am new to javascript frameworks in general and trying to learn vue. I am trying to use google analytics for data collection on my site, so I'm using vue-gtag. I followed a couple of youtube ...
A Deshmukh's user avatar
4 votes
3 answers
7k views

How to access plugin from nuxt.js store?

I have this gtag (analytics plugin) that I can access on my components but never on my store. I would appreciate any opinions. Thanks plugins/vue-gtag.js import Vue from "vue" import VueGtag ...
obliviousfella's user avatar
5 votes
1 answer
9k views

Nuxt: Inside a plugin, how to add dynamic script tag to head?

I'm trying to build a Google Analytics plugin to Nuxt that will fetch tracking IDs from the CMS. I am really close I think. I have a plugin file loading on client side only. The plugin is loaded from ...
Drew Baker's user avatar
  • 14.5k
9 votes
1 answer
10k views

How to use gtag.js with nuxt.js?

I'm trying to use the gtag.js library with nuxt.js. To do this, I installed the plugin https://github.com/nuxt-community/google-gtag, but it does not work for me //nuxt.config if(APP_ENV.gtag !==...
Vladimir Fedyanin's user avatar
5 votes
1 answer
2k views

Google Analytics duplicate tracking name

I'm using gtag.js to set up two different trackers in a Vue.js SPA. I'm defining the trackers in my index.html like: <script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXX-1"&...
Jordi Nebot's user avatar
  • 3,409