ActionLab Analytics for Jekyll
Add privacy-first, AI-powered analytics to your Jekyll site in under 60 seconds. No cookies, no consent banners, no complex setup.
Setup at a Glance
Add ActionLab to Jekyll in 4 simple steps. Copy one script tag, paste it into your project, and start collecting privacy-friendly analytics immediately.
About Jekyll
Jekyll is a static site generator with deep GitHub integration, making it the default choice for GitHub Pages sites and a popular option for developer blogs, documentation, and personal websites. Jekyll Liquid templating and _config.yml configuration system provide a clean way to integrate external services. ActionLab integrates through Jekyll includes and site variables, following the conventions Jekyll developers expect.
Why Add Analytics to Jekyll
Jekyll and GitHub Pages power millions of developer blogs, documentation sites, and project pages. These sites typically attract technical audiences who frequently use ad blockers, making GA4 data unreliable. ActionLab privacy-first approach means it is blocked less frequently, providing more complete traffic data for technical audiences. The integration through _config.yml and Liquid templates follows Jekyll conventions, and the zero-dependency approach means no gem management or Bundler configuration.
Installation Code
<!-- _includes/head.html -->
<script
src="https://cdn.actionlabanalytics.com/actionlab.js"
data-site="{{ site.actionlab_site_id }}"
defer
></script>Step-by-Step Setup
- 1
Add the ActionLab script to your _includes/head.html or directly in your default layout file (_layouts/default.html).
- 2
Set your site ID in _config.yml: actionlab_site_id: YOUR_SITE_ID. This keeps the configuration centralized and separated from template code.
- 3
Build and deploy your Jekyll site. If using GitHub Pages, push to your repository and the site rebuilds automatically.
- 4
ActionLab works with GitHub Pages and all other Jekyll hosting platforms.
Why Use ActionLab with Jekyll
- Configurable via _config.yml, keeping the site ID in your central configuration file.
- Works with GitHub Pages deployments without any additional configuration or GitHub Actions.
- Static site compatible — no server-side processing needed.
- No Jekyll gem or plugin needed — the Liquid template include is the complete integration.
Frequently Asked Questions
Does ActionLab work with GitHub Pages?
Yes. ActionLab is a client-side script that works with any hosting platform including GitHub Pages. Add the script tag to your Jekyll layout, configure the site ID in _config.yml, push to your repository, and GitHub Pages serves the analytics-enabled site automatically. No GitHub Actions, custom build steps, or additional configuration needed.
Does ActionLab work with Jekyll themes?
Yes. Add the script to your layout or override the theme head include. For themes installed as gems, create a _includes/head.html file in your project to override the theme version, adding the ActionLab script alongside the existing head content.
Can I use different site IDs for different environments?
Yes. Jekyll supports environment-based configuration. Use a conditional in your template: {% if jekyll.environment == "production" %} to only load ActionLab on your production site, preventing local development traffic from appearing in your analytics.
Does ActionLab work with Jekyll collections?
Yes. Pages generated from Jekyll collections (documentation, portfolio items, etc.) are tracked individually with their own analytics metrics. The top pages report shows which collection items attract the most traffic.
Is there a Jekyll gem for ActionLab?
No gem is needed. The Liquid template approach is simpler, requires no Bundler configuration, and works with all Jekyll versions including the version pinned by GitHub Pages. No dependency management needed beyond adding the script to your layout.