Docs

WordPress

Two ways to add the script: a small snippet in your theme, or a header plugin if you prefer no code.

Option A — theme (functions.php)

In your child theme's functions.php, hook the script into wp_head:

add_action( 'wp_head', function () { ?> <script defer src="http://localhost:3000/analytics.js" data-website-id="YOUR_TRACKING_ID"></script> <?php } );

Option B — header plugin

Use any "insert headers and footers" plugin, or your theme builder's custom-code area, and paste the plain snippet into the site head:

<script defer src="http://localhost:3000/analytics.js" data-website-id="YOUR_TRACKING_ID"></script>

Caching plugins

If you use a caching plugin, clear the cache after installing so the updated <head> is served.

Verify

Visit your site, then check the real-time view in your dashboard. The pageview should appear within seconds.