smilevo / smilevo.github.io

https://smilevo.netlify.app/
MIT License
0 stars 3 forks source link

Adding Google Analytics #19

Closed mkaouer closed 1 year ago

mkaouer commented 2 years ago

Here is the code to be added everywhere:

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

  gtag('config', 'UA-69945343-1');
</script>
mkaouer commented 2 years ago

@ravichandranvigneshwaran do you need something else to make this work?

mkaouer commented 1 year ago

I have added the Analytics ID on the corresponding website configuration file instead of using the code provided by Google.