Install on Ghost

Add XPmetric to a Ghost publication through Settings → Code injection → Site header.

Ghost has a built-in place for site-wide scripts, on Ghost(Pro) and self-hosted installs alike.

Replace YOUR_SITE_TOKEN with your site token from Settings → Sites → Get Script.

Tracking snippet

<script defer data-site="YOUR_SITE_TOKEN" src="https://xpmetric.com/p.js"></script>

Steps

  1. Open Ghost admin and go to Settings → Code injection.
  2. Paste the tracking snippet into Site header.
  3. Click Save.

Verify

Open your published site in a browser, then check the XPmetric dashboard. The first pageview shows up within a few seconds.

The snippet covers every post and page. Member-only pages are counted like any other page.

If nothing arrives, check the CSP troubleshooting guide or reply to your welcome email and we will look at it with you.