Installation guide
Last updated August 4, 2026
There are two ways to install SimpleStat's tracking snippet: pasting it straight into your site's <head>, or through Google Tag Manager if that's already how you manage scripts on your site.
Option 1: paste it directly
In SimpleStat, go to Settings > Installation and copy the snippet shown there (it looks like this, with your own site's ID already filled in):
<script
defer
src="https://simplest.at/tracker.js?site=YOUR-SITE-ID"
data-site="YOUR-SITE-ID"
></script>
Paste it once, right before the closing </head> tag, in every page you want tracked (or in your site's shared header/layout template if it has one). That's the whole setup, no configuration needed after that.
Option 2: install via Google Tag Manager
If you already use Google Tag Manager, you can add the snippet as a tag instead of editing your site's template directly:
- In Tag Manager, go to Tags and click New.
- For the tag configuration, choose Custom HTML.
- Paste your SimpleStat snippet (from Settings > Installation) into the HTML field, exactly as copied.
- For the trigger, choose All Pages (a plain Page View trigger).
- Save the tag, then Submit and publish your container.
Give it a minute after publishing, then go back to Settings > Installation in SimpleStat and click Verify installation.
Custom events
Once the snippet above is installed, scroll depth, outbound link clicks and file downloads are already tracked automatically, no extra work needed. For anything else you want to track, like a specific button click or a form submission, call this from your own code:
window.simplestat.track('signup_clicked');
// or with optional properties:
window.simplestat.track('purchase', { plan: 'pro' });
This works anywhere window.simplestat is available, so it can also be called from a Tag Manager Custom HTML tag with its own trigger, if you'd rather configure it there than edit your site's code.
Setting up a custom event via Tag Manager
For example, to track clicks on a "Sign up" button without touching your site's code:
- In Tag Manager, go to Triggers and click New.
- Choose trigger type Click > All Elements (or Just Links), firing on Some Clicks.
- Set a condition that matches your button, e.g. Click Text equals
Sign up, or a Click ID/Classes match if the button has one. Save the trigger. - Go to Tags, click New, and choose tag type Custom HTML.
- Paste in a small script that calls
window.simplestat.track(...), for example:<script> if (window.simplestat) { window.simplestat.track('signup_clicked'); } </script> - Set the tag's trigger to the one you just created, then Submit and publish your container.
The same pattern works for other trigger types too, like Form Submission for tracking a specific form, just swap the trigger and the event name in the script.
Custom events show up in their own panel on your dashboard, ranked by name and count.