N
Nuxt4mo ago
RicharDVD

Multiple pixels using Nuxt Scripts

We are currently working with a external marketing team that asks from us to also setup their google tag (and meta) tag on our website. I currently have something like this in the app.vue file:
useScriptGoogleAnalytics({
key: 'gtag1',
id: 'G-0987654321',
})
useScriptGoogleAnalytics({
key: 'gtag2',
id: 'G-1234567890',
})
useScriptGoogleAnalytics({
key: 'gtag1',
id: 'G-0987654321',
})
useScriptGoogleAnalytics({
key: 'gtag2',
id: 'G-1234567890',
})
I can see that they are both installed and I can send custom events to either one of these but the automatic pageview event is only send to one gtag id. I would however like to automatically send the pageview events to both tags. How can I achieve this? Thanks in advance!
2 Replies
RicharDVD
RicharDVDOP4mo ago
When using Tag Assistant I can see on both tags that the Data Layer is correct but the hits are only showing on one tag. It could be that I'm misunderstanding something about gtag?
Jacek
Jacek4mo ago
AFAIK one Google Tag replaces all the GA scripts. Think about it as a meta-script that will load everything that your marketing team needs based on the rules they control. If they ask you to attach GA scripts separately, they work against official Google guidance. To be frank I was doing the same thing before I switched to Plausible. But I was dev following some consultant guidance and I would expect actual "marketing" team to know the basics around GTag. In coding terms... You should probably use single useScriptGoogleTagManager(...).
Want results from more Discord servers?
Add your server