12

Add Google Analytics to Jekyll Minima Theme Simplified

 3 years ago
source link: https://cuda-chen.github.io/blogging/2020/05/03/Add-Google-Analytics-to-Jekyll-Minima-Theme-Simplified.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Add Google Analytics to Jekyll Minima Theme Simplified

May 3, 2020

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:

# Google Analytics
google_analytics: UA-XXXXXXXXX-X

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK