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>WPCode plugin (recommended)
- In WP admin, go to Plugins → Add New and search for WPCode.
- Install and Activate the plugin (free tier is enough).
- Open Code Snippets → Header & Footer.
- Paste the snippet into the Header box.
- Click Save Changes.
Manual (header.php)
- Go to Appearance → Theme File Editor.
- Open
header.phpin a child theme (so theme updates don't overwrite your change). - Paste the snippet just before
</head>. - Save the file.
Verify
Visit your homepage and any post URL. Check the XPmetric dashboard live feed for new pageviews.
Related
- CSP troubleshooting if tracking stays silent
- Custom goals for form signup events