Add Google Analytics to Jekyll Minima Theme Simplified

Create an account, add Tracking ID, and all you go!

Lu-Hsuan Chen
1 min readMay 3, 2020
Photo by Agence Olloweb on Unsplash

So you want to get some statistics about your blog, but you don’t want to install any plugins because you are too lazy and afraid of security issues. What’s more, you are using static site generator, which means many of items are just files.

As a matter of fact, Google Analytics lets you get the statistics of your site by just adding a code called Tracking ID.

So let’s get started!

First create an account of Google Analytics.

Then get your Tracking ID of Google Analytics. You can see this post how to get your Tracking ID.

Next, add the following lines in your _config.yml:

Remember to change the UA-XXXXXXXXX-X to your Tracking ID.

That’s all!

Reference

https://letianfeng.github.io/github/2018/05/27/github_pages_and_google_analytics.html

Originally published at https://cuda-chen.github.io on May 3, 2020.

If you have any thoughts and questions to share, please contact me at clh960524[at]gmail.com. Also, you can check my GitHub repositories for other works. If you are, like me passionate about machine learning, image processing and parallel computing, feel free to add me on LinkedIn.

--

--

Lu-Hsuan Chen
Lu-Hsuan Chen

Written by Lu-Hsuan Chen

Enthusiastic of image processing, machine learning, and parallel computing. Current status: beggar on the street.

No responses yet