Switch Your Jekyll Blog to Google Analytics 4 Simplified
As a reminder from Google [^1]. Google Analytics will be replaced by Google Analytics 4 after July 1st, 2023. As a user of Google Analytics, I write down the switching procedures so that other user can have a post to know how to switch your Jekyll blog from Google Analytics to Google Analytics 4.
Create a Google Analytics 4 Property. For more information you can visit the help center of Google.
Record your measurement ID. This answer will let you find your measurement ID.
- Put your measurement ID in
_config.yml. Usually you put your measurement ID like this:
- (Minima and GitHub Pages only) use remote theme. For some reasons, you have to use remote theme if your Jekyll blog uses minima theme and is hosted on GitHub Pages. Usually you set your blog to use remote theme like this:
# _config.yml - theme: minima + remote_theme: jekyll/minima plugins: + - jekyll-remote-theme