nuxt-community / gtm-module

Google Tag Manager Module for Nuxt.js
MIT License
326 stars 70 forks source link

GA4 + UA dual setup: Two libraries/container loaded #159

Open mschneekluth opened 1 year ago

mschneekluth commented 1 year ago

Universal Analytics (UA) will be deprecated in summer of 2023, so while switching my setup from UA to GA4 I am having a dual implementation of both GA properties in a single GTM container. I have two tags for each pageview/event, one for UA and one for GA4.

The problem right now is that the GTM container loads two container for each of the tags.

This really slows down page speed score. Not sure if this is an issue with the module or with the Google Tag Manager. How to handle this situation because switching from setup to another could take some weeks?

kpyszkowski commented 1 year ago

I did some research and it turns out that vue-gtag plugin supports UA (gtm events) and GA4 events simultaneously. Moreover it's not mentioned in the plugin docs but the v1 of this plugin supports Vue 2 while v2 doesn't - Vue 3 only.