Skip to content
whoisbrowsing

Add whoisbrowsing to plain HTML

Updated

TL;DR

To see live visitors on any hand-written HTML site, put one script tag just before </body>, or in <head> with defer. It is under 4 KB gzipped and never changes how the page looks.

Using an AI coding agent? Give it this prompt:

Add whoisbrowsing (live visitor view) to this project. Follow https://whoisbrowsing.com/SKILL.md exactly.

The canonical snippet

<script src="https://live.whoisbrowsing.com/s.js" data-site="YOUR_SITE_ID" defer></script>

Replace YOUR_SITE_ID with your site's ID. Create one with no sign-in if you need it.

Where it goes

<!doctype html>
<html>
  <head>
    <title>My site</title>
  </head>
  <body>
    <!-- your page -->
    <script src="https://live.whoisbrowsing.com/s.js" data-site="YOUR_SITE_ID" defer></script>
  </body>
</html>

Both placements work. The defer attribute makes the browser load the script without blocking the page and run it after parsing. Put it on every page you want to watch, ideally in a shared layout or include. A static site generator or template engine lets you add it once.

Static hosts

Netlify, GitHub Pages, Cloudflare Pages, Vercel and similar hosts just serve your files, so editing the HTML and redeploying is all it takes. Remember that localhost and production are separate websites in whoisbrowsing.

Content-Security-Policy note

If your site sends a Content-Security-Policy header, allow the script and its live connection: script-src https://live.whoisbrowsing.com and connect-src wss://live.whoisbrowsing.com. Most plain HTML sites send no such header, so you can usually skip this.

Verify

  1. In whoisbrowsing, click Watch for your site.
  2. Open your site in a Chrome Incognito or Safari private window. Your own normal browser is never counted, so a private window is how you test.
  3. You should see yourself as a coloured cursor on your real page, and one line for you in the side panel.

Each website is separate: www. and the bare domain count as the same website, but localhost and production never mix. If you see nothing, check that the site ID matches the one shown for this site.

If you see nothing

  • Is the tag on the page you opened? Without a shared layout or include, every HTML file needs its own copy.
  • Did you open it through a web address? A page opened straight from disk (file://) has no website address to match. Serve it locally or deploy it, and use the site made for that address.
  • Is an old copy cached? After deploying, reload in a fresh private window; a CDN or host cache can serve the old HTML for a while.
  • Is it in the page source? Search the source for live.whoisbrowsing.com and check the data-site value.

Let your AI agent do it

Add whoisbrowsing (live visitor view) to this project. Follow https://whoisbrowsing.com/SKILL.md exactly.

Use this when your HTML lives in a project folder an agent can edit: it creates the site, adds the tag to each page or your shared include, and gives you a watch link. See install with an AI agent.

How it works, privacy, all install guides, or try it with no sign-in. Other platforms: WordPress, Shopify, Webflow.