Overview
Jekyll-analytics is a plugin designed to make it easy to add web analytics to Jekyll websites. It supports popular analytics services such as Google Analytics, Matomo, Piwik, mPulse, and Plausible. By installing and configuring the plugin, users can track and analyze website traffic and engagement.
Features
- Easily add web analytics to Jekyll websites
- Supports multiple analytics services, including Google Analytics, Matomo, Piwik, mPulse, and Plausible
- Simple installation and configuration process
Installation
To install the Jekyll-analytics plugin, follow these steps:
- Add the following line to your Gemfile:
gem 'jekyll-analytics'
- Execute the following command to install the plugin:
bundle install
Alternatively, you can install the plugin manually by running:
gem install jekyll-analytics
- Edit the _config.yml file of your Jekyll website to enable the plugin. Add the following configuration:
plugins:
- jekyll-analytics
- Configure the plugin by adding the necessary details for your preferred analytics service. For example, for Google Analytics, you would add:
jekyll-analytics:
provider: google
tracking_id: UA-XXXXXXXX-X
- By default, tracking will be disabled in development mode. To enable tracking in production mode, set the environment variable JEKYLL_ENV=production. If you are using Github Pages, it automatically sets the JEKYLL_ENV to production.
Summary
Jekyll-analytics is a convenient plugin for adding web analytics to Jekyll websites. With support for popular analytics services and a straightforward installation process, users can easily track and analyze their website traffic and engagement.