Install Muro on WordPress
Add Muro to a WordPress site using a plugin like WPCode, or by editing your theme's header.php directly.
There are two common ways to add a tracking script to a WordPress site. Pick whichever fits how you already manage your site.
Option 1: WPCode (or similar plugin)
This is the safest option for most users. You don't touch theme files, and the snippet survives theme updates.
-
From the WordPress admin, go to Plugins → Add New.
-
Search for WPCode, install it, and activate it.
-
Open Code Snippets → + Add Snippet.
-
Choose Add Your Custom Code (New Snippet) and pick HTML Snippet as the code type.
-
Paste:
<script async src="https://api.muroanalytics.com/muro.js" data-project-id="YOUR_PROJECT_ID"></script> -
Set Location to Site Wide Header (which inserts the code into
<head>on every page). -
Toggle the snippet to Active and click Save Snippet.
The script is now on every page of your site.
Other plugins that work the same way: Insert Headers and Footers, Header Footer Code Manager, Code Snippets. Pick whichever you already use.
Option 2: Edit header.php directly
If you're comfortable editing theme files, you can paste the snippet into your theme's header.php.
-
From the WordPress admin, go to Appearance → Theme File Editor.
-
Open
header.php. -
Find the closing
</head>tag and paste the snippet just before it:<script async src="https://api.muroanalytics.com/muro.js" data-project-id="YOUR_PROJECT_ID"></script> </head> -
Click Update File.
Use a child theme
Editing header.php on a parent theme means your snippet gets wiped on the next theme update. If you go this route, use a child theme.
Where to find your project ID
Open your Muro dashboard, go to Settings → Project → Tracking script, and click Copy script. The project ID is the value of data-project-id.
Verify
- Open the front of your site in a browser.
- In Muro, set the time range to Live.
- Reload your site in another tab.
- Your visit appears within 30 seconds.
If you see nothing, view source on the site and confirm the snippet is actually in the <head>. WordPress caching plugins can sometimes serve a stale copy. Clear your cache (for example in WP Rocket, LiteSpeed, or W3 Total Cache) if that's the case.