Install on WordPress

Install XPmetric on WordPress with the free WPCode plugin or by editing header.php in a child theme.

WordPress sites can add XPmetric without editing theme files manually — the free WPCode plugin is the easiest path.

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>
  1. In WP admin, go to Plugins → Add New and search for WPCode.
  2. Install and Activate the plugin (free tier is enough).
  3. Open Code Snippets → Header & Footer.
  4. Paste the snippet into the Header box.
  5. Click Save Changes.

Manual (header.php)

  1. Go to Appearance → Theme File Editor.
  2. Open header.php in a child theme (so theme updates don't overwrite your change).
  3. Paste the snippet just before </head>.
  4. Save the file.

Verify

Visit your homepage and any post URL. Check the XPmetric dashboard live feed for new pageviews.