Google Analytics for redirected domain
I'm currently working on a website of a client of mine to which i'm supposed to add a tracking script for Google Analytics. I have done this several times with other websites, but not with a redirected domain name. It does not work!
So i was hoping if you could tell me how can i fix this issue. This is the code that i have in my header.php file in Wordpress:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxx-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-xxxxxxx-1');
</script>
Thank you for your help!
Ankit Singh
Techugo - Top Mobile App Development Company