Jekyll Analytics screenshot

Jekyll Analytics

Updated: 8 Apr 2025
221 Stars

Plugin to easily add webanalytics to your jekyll site. Currently Google Analytics, Piwik and mPulse are supported.

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:

  1. Add the following line to your Gemfile:
gem 'jekyll-analytics'
  1. Execute the following command to install the plugin:
bundle install

Alternatively, you can install the plugin manually by running:

gem install jekyll-analytics
  1. Edit the _config.yml file of your Jekyll website to enable the plugin. Add the following configuration:
plugins:
  - jekyll-analytics
  1. 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
  1. 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.