Could be a simple question but I am full of doubts right now about adding Google Analytics Tracking ID to GitHub page.
I am using G
You can add Google Analytics to a Jekyll site the same way you would any other site.
First, after setting up your Google Analytics account, navigate to the admin tab.

Next, under the accounts panel, on the left, click: Create New Account.

In Google Analytics, an account represents a set of pages that you would like to track. Set up the website's account as desired.
After your account has been created you will be sent to a page which tells you your Tracking ID and has a JavaScript snippet for you to put on the pages you would like to track. Simply put this snippet in all the pages you would like to track. Or, if you use a default layout put this snippet somewhere in it.
By the way, since you are hosting on GitHub Pages you don't need Google Analytics unless you want very detailed analytics. If all you care about is page views GitHub has this.