Installation
Adding Tiny Metrics to your website takes a few minutes: paste one script tag and you are tracking.
Before you begin
You need:
- A Tiny Metrics account (create one here)
- Access to your website's HTML
The script is the same for every website — only where you paste it differs. Pick your platform below.
HTML websites
Copy this snippet into the <head> of every page you want to track — typically your shared layout or template file:
For example:
Next.js
Add the script to your root layout (app/layout.tsx) using the built-in Script component, so it loads on every page:
WordPress
Edit your theme's header.php file and add the snippet inside the <head> section:
Alternatively, use a plugin that injects code into your site's header. If you are unsure how to edit your theme, follow this WordPress guide.
Verify the installation
- Open your website and navigate across a few pages.
- Open your Tiny Metrics dashboard.
Pageviews should appear within seconds.
Troubleshooting
If no data appears on your dashboard, check the following:
- Open the browser console and look for errors or failed requests to
tinymetrics.io. - Confirm the script is inside the
<head>section and loads on the pages you visit. - Check that your Content Security Policy allows the script.
- Disable ad blockers or browser privacy extensions and reload.
- If you use a CDN such as Cloudflare, purge its cache so the latest HTML is served.
Still no data? Email [email protected] and include your website URL.