1. Make an index.html file with the below code and deploy it using GitHub pages

    <html>
      <head>
        <title>
          Analytics Test
        </title>
      </head>
      <body>
        Hello!
      </body>
    </html>
  2. Go to google analytics dashboard, click on create a new property

  3. Choose “Web” as the platform

  4. Setup the web stream by entering your site’s url

  5. Click on view tag instructions and add Google’s script tag to your index.html

    <html>
      <head>
    	<!-- Google tag (gtag.js) -->
    	<script async src="https://www.googletagmanager.com/gtag/js?id=<G_TAG>"></script>
    	<script>
    	  window.dataLayer = window.dataLayer || [];
    	  function gtag(){dataLayer.push(arguments);}
    	  gtag('js', new Date());
    	
    	  gtag('config', '<G-TAG>');
    	</script>
    	<title>
    	  Analytics Test
    	</title>
      </head>
      <body>
    	Hello!
      </body>
    </html>