nuxt-community/gtm-module

GA4 + UA dual setup: Two libraries/container loaded

mschneekluth opened this issue · 1 comments

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?

kpqrx commented

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.