Site logo

Archived topic

Need Steps to Add Google Analytics Script

3 replies · Started by Kamal on December 3, 2022

Viewing posts 1–4 of 4

Hi,
I am trying to link my blog with google analytics. I need to add the following script tag in the code of every page of the website, immediately after the <head> element. I have no idea on how to do this. Can you please provide me the step by step instruction to add the following script?

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-ZZ1XXX9T0ET"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-ZZ1C2XXX0ET');
</script>

Thanks & Regards.
Kamal

I am able to do this through elements. Thanks.

Fixed on my own.

Glad to hear that !

This archived topic is closed to new replies.