Get started in 4 steps
Set up XPmetric analytics on your website in minutes — add a site, install the snippet, verify tracking, and link revenue.
Set up XPmetric on your site in four steps. You'll need a free XPmetric account.
1. Create a site
- Sign in at xpmetric.com/login.
- Open the dashboard and click Add site.
- Enter your domain (e.g.
buildcove.io). - Copy your site token from Settings → Sites → Get Script.
Replace YOUR_SITE_TOKEN with your site token from Settings → Sites → Get Script.
2. Install the tracking script
Paste this snippet inside the <head> of every page so it loads before your content:
<script defer data-site="YOUR_SITE_TOKEN" src="https://xpmetric.com/p.js"></script>Pick the guide for your stack:
After saving, visit your site and check the dashboard — the live feed should show a pageview within a minute.
3. Link revenue to traffic (optional)
Connect Stripe or Polar in Settings → Integrations, then pass XPmetric visitor IDs into checkout metadata:
p.js exposes window.xpmetric.v (visitor hash) and window.xpmetric.s (session id) for attribution.
4. Track conversions (optional)
Fire custom events when users sign up, subscribe, or complete key actions:
window.xpmetric('signup')Promote events to conversion goals or build multi-step funnels in the dashboard.
Next steps
- Import Google Analytics history — backfill years of pageviews in one click
- UTM campaign tracking — works automatically with standard UTM params
- Fix CSP blocking — if your site sends strict Content-Security-Policy headers