Install Statsdot on Jekyll
Updated October 18, 2026
Add the script to the file that renders <head>, usually _includes/head.html. With a gem-based theme such as Minima, create _includes/head.html in your site (copy the theme's version first) and Jekyll uses yours. Some themes provide _includes/head-custom.html for exactly this.
{% if jekyll.environment == "production" %}
<script defer data-domain="yoursite.com" src="https://statsdot.com/js/script.js"></script>
{% endif %}
GitHub Pages builds with JEKYLL_ENV=production. For your own builds, run JEKYLL_ENV=production bundle exec jekyll build. jekyll serve on your computer is not counted, and the script also does nothing on localhost.
Track events by adding data-statsdot-event="Download" to a link or button. See Events and goals.