Install the tracking snippet
Add a single script tag to your site and Muro starts collecting pageviews automatically.
Installing Muro is one line of HTML. No SDK, no build step, no config file. Add it to the <head> of your site and you're tracking.
The snippet
<script async src="https://api.muroanalytics.com/muro.js" data-project-id="YOUR_PROJECT_ID"></script>Replace YOUR_PROJECT_ID with the ID of the project you want to track. You'll see your real snippet (with the ID already filled in) right after you create a project, and again any time in Settings → Project → Tracking script.
It's tiny
The muro.js script is under 2 KB gzipped and loads asynchronously. It won't slow your site down or block the page from rendering.
Where to put it
Put the snippet inside <head> on every page you want to track. The simplest place is your site's root layout or template, so it loads everywhere automatically.
If you're using a framework like Next.js, Astro, or Nuxt, see the framework guides for the cleanest way to add it.
If you're on a no-code tool like Webflow, Framer, WordPress, or Carrd, every one of them has a "custom code" or "site head" field. Paste the snippet there and save.
What gets tracked automatically
The moment Muro loads, it starts capturing:
- Pageviews, including single-page app navigation (no extra code).
- Referrer (where the visitor came from).
- UTM parameters if the URL has them.
- Device, browser, and OS.
- Country, region, and city (resolved from IP, never stored).
- Sessions, with a 30-minute inactivity timeout.
That's enough to populate every panel on your dashboard. For tracking your own custom events (like signups or purchases), see Track custom events.
Verify it's working
The fastest way to confirm Muro is collecting data:
- During onboarding. After you paste the snippet, the onboarding screen polls in the background. Within a few seconds of your site loading, you'll see "Data received!" and Muro will move you to the next step.
- From the dashboard. Open your project, set the time range to Live, then visit your site in another tab. You'll see your own visit appear within 30 seconds.
- From browser DevTools. Open the Network tab, reload your site, and look for a request to
api.muroanalytics.com/collect. A204response means the event was accepted.
A few good-to-knows
- Localhost works. You can develop against Muro from
localhost. The visit shows up as a real event, just without a meaningful country or referrer. - Ad blockers. A small percentage of visitors run ad blockers that block analytics scripts. Muro will simply miss those visits. You don't need to do anything about it.
- Privacy. Muro uses no cookies and stores no personal data. Visitor IDs are daily-rotating SHA-256 hashes. You don't need a consent banner for Muro alone.