-
Transitioning _setDomainName from legacy to Google Analytics 4: Need guidance
Hey! I’m moving to Google Analytic 4 and this is the old code I’ve got.
var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXX']); _gaq.push(['_setDomainName', ''])
I need to substitute _gaq.push([‘_setDomainName’, ”]) but when I try the code below, it’s giving me an error. I’ve googled everywhere, but I’m stuck. Any idea?
function gtag(){ dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'G-XXXX'); gtag('_setDomainName', '');
Log in to reply.