Open
Description
🐛 The bug
Hello,
This change breaks the ability to set the consent mode for GTM.
Spreading the args for the dataLayer push results in an array being added to the dataLayer array. But the dataLayer array ignores entries of js type Array.
🛠️ To reproduce
https://stackblitz.com/edit/nuxt-starter-mxudpoge?file=app.vue,pages%2Findex.vue
🌈 Expected behavior
Instead the dataLayer array expects Arguments objects, which can be achieved by:
window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);}
The fix needs to be applied to the gtag function in onBeforeGtmStart
and the proxy push function
ℹ️ Additional context
No response