Add analytics to Ghost with a 1.2 KB cookieless tag
To add analytics to Ghost, paste one <script> tag into Settings → Advanced → Code injection → Site header, then save. Ghost prints that field inside <head> on every page of your site, whatever theme you use. For Simplytics the tag is ~1.2 KB gzipped and sets no visitor cookies.
Ghost themes render full pages, so one tag in the head counts every view. There is no theme file to edit and no route-change code to write.
Where does the analytics tag go in Ghost?
This is the tag, with your site key in data-key:
<script async src="https://simplytics.dev/track.js" data-key="YOUR_KEY"></script>
YOUR_KEY is the public site key from your dashboard, so it is safe to paste anywhere. The dashboard's setup dialog shows the tag with your key filled in, and the Ghost setup guide keeps it for reference.

- In Ghost Admin, open Settings and find Code injection under Advanced.
- Paste the tag into Site header.
- Save, then reload any page of your site.
Three common places for a tag, and only one counts the whole site:
| Where | What it covers | Survives a theme change? |
|---|---|---|
| Settings → Advanced → Code injection → Site header | Every page | Yes |
| A post's settings → Code injection | That one post or page | Yes |
The theme's default.hbs |
Every page | No — a new theme drops it |
Use Site header. Per-post code injection only fits a script you want on a single page.
Does Ghost already have built-in analytics?
Yes, since Ghost 6.0. Ghost's own web analytics are cookie-free and powered by Tinybird, and the Analytics screen shows web traffic next to newsletter and member growth. Three limits decide whether you still want a script:
- Ghost(Pro) Starter. As of November 2026, Ghost's pricing page marks advanced native analytics "No" on Starter, and its help centre says moving to Starter means turning web analytics off. Starter lists "Third-party services" as "Basic".
- Self-hosted Ghost. Web traffic needs Ghost's Docker install and your own Tinybird account. A script tag needs nothing but Code injection.
- No history before 6.0. Ghost's help centre says web analytics have no data from before Ghost 6.0, and third-party data can't be imported.
Do Ghost Portal links count as extra page views?
No. Ghost's Portal opens sign-up, sign-in and account screens on hash links such as #/portal/signup. The Simplytics tag ignores hash-only changes, so opening Portal is not a new view. Real page loads, like a member clicking through to a post, count as usual.
How to keep your own visits out of the numbers
On your live site, run localStorage.simplytics_ignore = '1' in the DevTools console. The tag then sends nothing from that browser on that site. Simplytics stores no raw IP and sets no cookie, so there is no "exclude me" switch in the dashboard.
A local Ghost install doesn't need this. Views from localhost are refused, because the hostname has to match a site on your account.
How to check the first hit
- Open a page on your live site.
- In DevTools, open Network and filter for
track. You should see aPOSTtohttps://simplytics.dev/trackthat returns{"status":"success"}, or a201naming an add-on file, once you connect a payment provider (revenue) or turn on Page speed. - View the page source and confirm the
track.jstag is inside<head>. - Open your dashboard. The site shows as verified once a valid hit arrives. On a new account, that first view starts the 30-day free trial, no card needed.
Nothing in Network? Check that you saved Code injection. Brave and DuckDuckGo send Global Privacy Control by default, so the tag sends nothing in those browsers and your own test can look like a broken install.
When another tool fits better
- You are on Ghost(Pro) Publisher or higher and want traffic tied to members. Ghost's own analytics show which posts and sources bring sign-ups and paid members, which a page-view tool cannot see.
- You want per-visitor journeys. Simplytics keeps no long-lived visitor identifier. GA4 or Matomo fit better.
- Your team already reports in GA4. Keep it, and paste its tag in the same Site header field.
Simplytics is cookieless like Plausible, at a lower price: $12/year or $2/month for unlimited sites and pageviews, against Plausible's $9/month for 10,000 pageviews on one site. Its analytics database is in Warsaw. Compare Simplytics vs Plausible, try the demo, or see pricing.
Installing elsewhere? See Hugo and WordPress without a plugin.
Last verified: 2026-11-22.