Jekyll themes not only enable you to present your GitHub Pages in style. You can also extend these with Custom Styling and you can even Point your Domain to your GitHub Jekyll styled site. In this post, we’ll link Google Analytics with your GitHub Pages.
I assume you already have Google Analytics Account created for your site. If not, please create one here and come back to this tutorial.
Linking Google Analytics with GitHub Pages
- Login to your Google Analytics and navigate to the Account that you wish to track on GitHub Pages
- Copy the Tracking Code from Admin => Tracking Info => Tracking Code section in the Google Analytics portal
- Login to your GitHub Page repository
- Find and edit _config.yml file in the root of the master branch with the following parameter
- Commit _config.yml, navigate to your GitHub Page and check if your visit is now logged in Google Analytics
Furthermore, if need to point your Domain to your GitHub Pages then please read my article on Pointing Domain to GitHub Pages.