Add Plausible Analytics to Jekyll
Learn how-to add Plausible Analytics to your Jekyll’s theme.
Learn how-to add Plausible Analytics to your Jekyll’s theme.
Add the following code snippet to your theme’s default.html
file in between the <head></head>
HTML tags.
{% if site.plausible_analytics %}
<script async defer data-domain="{{ site.plausible_analytics }}" src="https://plausible.io/js/plausible.js"></script>
{% endif %}
Next add the following your Jekyll’s _config.yml
file:
plausible_analytics: yourdomainname.com
In the above code snippet, you should ensure that you change yourdomainname.com
to your website's domain name.