Adding Google Analytics to Jekyll GitHub Pages

WordPress GitHub Pages 0

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

  1. Login to your Google Analytics and navigate to the Account that you wish to track on GitHub Pages
  2. Copy the Tracking Code from Admin => Tracking Info => Tracking Code section in the Google Analytics portal
  3. Login to your GitHub Page repository
  4. Find and edit _config.yml file in the root of the master branch with the following parameter
  1. Commit _config.yml, navigate to your GitHub Page and check if your visit is now logged in Google Analytics

If your GitHub Page is themed with Jekyll then you might also be interested in how to modify the theme. In order to do so please read my Custom Styling Jekyll Themes article explaining just that.

Furthermore, if need to point your Domain to your GitHub Pages then please read my article on Pointing Domain to GitHub Pages.

Marcin Narloch

Marcin Narloch

Creative and out-of-the-box thinker with strong interests and knowledge in technology and innovation.
WordPress GitHub Pages 0 Previous post Adding Sitemap to Jekyll GitHub Pages
Docker Building Blocks Next post Kubernetes Housekeeping

Leave a Reply

Your email address will not be published. Required fields are marked *