Hi, trying to add GA4 scripts, i put them in head.tpl (niara theme) immediately after <head> tag
<!-- Google Tag Manager -->
{literal}
<script async src="https://www.googletagmanager.com/gtag/js?id=G-***"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-***');
</script>
{/literal}
<!-- End Google Tag Manager -->
But what i get is that this one display where it should be:
<!-- Google Tag Manager -->
<!-- End Google Tag Manager -->
and all the script goes to very end of the page. How should i fix that. Thanks
Question
hedgehog
Hi, trying to add GA4 scripts, i put them in head.tpl (niara theme) immediately after <head> tag
<!-- Google Tag Manager -->
{literal}
<script async src="https://www.googletagmanager.com/gtag/js?id=G-***"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-***');
</script>
{/literal}
<!-- End Google Tag Manager -->
But what i get is that this one display where it should be:
<!-- Google Tag Manager -->
<!-- End Google Tag Manager -->
and all the script goes to very end of the page. How should i fix that. Thanks
3 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now