How to install Google Analytics

Hi there,

I’m trying to install Google Analytics on the website I’m working on. I added the script in the head :

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

      gtag('config', 'UA-XXXXXXXXX-X');
    </script>

But nothing happen for the moment. Do I have to do something more ? Or just wait… ?

I missed that. Sorry. Thx @texnixe

When you open the real time tab in Google Analytics, your visit should be immediately visible so you can confirm it’s installed correctly.

Also: don’t forget to replace ‘UA-XXXXXXXXX-X’ with your personal tracking code.

It works. I just had to wait.

Thx