Skip to main content
To add tinyanalytics to a Hugo site, place the tracking snippet in the <head> of your base template so it renders on every page.

Before you start

  • A tinyanalytics site. If you don’t have one yet, follow the Quickstart.
  • Your snippet from Settings → Tracking in your dashboard.

Add the snippet to your head template

Add the tag inside the <head> of layouts/_default/baseof.html (or your theme’s head partial, often layouts/partials/head.html):
layouts/_default/baseof.html
If your theme ships its own head partial, copy it into your site’s layouts/partials/ before editing so theme updates don’t overwrite your change. Replace YOUR_SITE_ID with your real site ID.

Verify

Build or deploy your site, open it in a browser, then check Realtime in your dashboard for your visit. See Verify your setup for the full check.
Your install is working when your own visit appears in Realtime in your dashboard.

Install on Jekyll

Another static-site generator.

Configure the tracking script

Every data-* option you can set.

Track custom events

Measure clicks and downloads.

Verify your setup

Confirm tracking works.