WordPress
Add Humblytics Analytics to WordPress
1 · Sign up (or log in)
Visit humblytics.com → Start Free Trial. Finish signup—or log in to your existing workspace.
2 · Add your website in Humblytics
In the sidebar, click Add Website.
Domain – enter
your-domain.com(omithttps://andwww)Site Name – internal label (e.g.
Marketing-Prod)
Copy the snippet from Install Tracking Code:
html
<!-- Start Humblytics Tracking Code -->
<script async src="https://app.humblytics.com/hmbl.min.js?id=YOUR_ID_HERE"></script>
<!-- End Humblytics Tracking Code -->Keep this tab open—we'll return and click Verify Website once the tag is live.
3 · Add the script to WordPress
Option 1: Using a plugin (recommended)
Best for: Most WordPress sites—survives theme changes and updates
Method A: WPCode (formerly Insert Headers and Footers)
In your WordPress dashboard, go to Plugins → Add New
Search for WPCode - Insert Headers and Footers
Click Install Now, then Activate
Go to Code Snippets → Header & Footer
Paste your Humblytics script into the Header section
Click Save Changes
Method B: Code Snippets (alternative)
In your WordPress dashboard, go to Plugins → Add New
Search for Code Snippets
Click Install Now, then Activate
Go to Snippets → Add New
Give it a name (e.g., "Humblytics Analytics")
Paste this code:
php
add_action('wp_head', function() {
echo '<script async src="https://app.humblytics.com/hmbl.min.js?id=YOUR_ID_HERE"></script>';
});Set to run Only run on site front-end
Click Save Changes and Activate
Note: Replace YOUR_ID_HERE with your actual project ID from Humblytics.
Option 2: Add to your theme
Only use this if: You manage a custom theme or child theme
⚠️ Warning: Direct theme edits will be lost when you update your theme. Always use a child theme or the plugin method instead.
Using a child theme (safe method):
Create or activate a child theme
In your child theme's
functions.php, add:
php
add_action('wp_head', function() {
echo '<script async src="https://app.humblytics.com/hmbl.min.js?id=YOUR_ID_HERE"></script>';
});Save the file
Direct theme edit (not recommended):
Go to Appearance → Theme File Editor
Accept the warning about editing theme files
Select header.php from the right sidebar
Locate the closing
</head>tagPaste your Humblytics script just before
</head>Click Update File
⚠️ Important: You'll need to re-add this script every time you update your theme.
4 · Verify installation
Clear your cache (if using WP Rocket, W3 Total Cache, etc.)
Return to Humblytics and click Verify Website
Open your live site in a private/incognito window and refresh once
Within ~30 seconds you should see a green Verified badge and live visitor count
If verification fails, check:
Script ID matches your project in Humblytics
You cleared WordPress cache and any CDN cache (Cloudflare, etc.)
The script appears in your page source (right-click → View Page Source, search for "humblytics")
No security plugins are blocking external scripts (check Wordfence, Sucuri settings)
No ad-blockers or browser extensions are interfering
Common WordPress caching plugins:
WP Rocket: Clear cache in Settings → WP Rocket → Clear Cache
W3 Total Cache: Go to Performance → Dashboard → Empty All Caches
WP Super Cache: Go to Settings → WP Super Cache → Delete Cache
5 · Explore & optimize
Dashboard – track traffic, top pages, and referrers
Heatmaps – auto-generated click & scroll analysis
Experiments – run A/B tests without extra code (Experiments → New Test)
Last updated
Was this helpful?