Skip to content
whoisbrowsing

Add whoisbrowsing to Remix

Updated

TL;DR

To add whoisbrowsing to Remix, put one script tag in the <head> of the Layout component in app/root.tsx. The root route wraps every page, so the tag loads everywhere.

Using an AI coding agent? Give it this prompt:

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

By using a script an agent makes for you, you agree to the Terms.

Add the tag to app/root.tsx

The Remix docs show the root's Layout export rendering <html>, with <Meta /> and <Links /> in the <head> and <Scripts /> after the children (Remix root route). Add the tag in the head:

tsx
// app/root.tsx
import { Links, Meta, Outlet, Scripts, ScrollRestoration } from "@remix-run/react";

export function Layout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <head>
        <meta charSet="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <Meta />
        <Links />
        <script
          src="https://live.whoisbrowsing.com/s.js"
          data-site="YOUR_SITE_ID"
          async
        />
      </head>
      <body>
        {children}
        <ScrollRestoration />
        <Scripts />
      </body>
    </html>
  );
}

export default function App() {
  return <Outlet />;
}

Replace YOUR_SITE_ID with your script's ID. No script yet? Get your script. Free. No card, and no account needed.

Paste it on every page of your site, in the <head> or anywhere before </body>. In Remix, that is the root route's Layout, which wraps every page.

In JSX the tag closes itself, but it is the same plain tag every guide uses:

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

React Router v7 in framework mode (Remix's successor) uses the same file, with imports from react-router instead of @remix-run/react. Check the import for your version.

Older Remix without a Layout export

Older Remix apps put <html> in the default export of app/root.tsx. Put the same <script> in that <head>.

Where to get your script

Get your script: type your website on the home page. If this browser already has a script, the code on this page shows its ID in place of YOUR_SITE_ID.

One script for localhost and production

Use the same script everywhere, so nothing in your code changes when you go live. Add each address you use to it, such as localhost:5173 and yourdomain.com, on the home page (or in your dashboard, if you signed in). Each website gets its own live view, so visitors on localhost:5173 never show up on your real domain. www. and the bare domain are the same website.

Remix apps change pages in the browser without a full reload. You do not need extra code: the script follows client-side route changes on its own, so each page a visitor moves to shows up in your live view.

Content-Security-Policy

If your site sends a Content-Security-Policy header, allow the script and its live connection:

csp
script-src https://live.whoisbrowsing.com;
connect-src wss://live.whoisbrowsing.com;

Add these to your existing script-src and connect-src lists instead of replacing them. Nothing else is needed: the owner panel adds no inline styles, so your style-src can stay strict. If you have no CSP, skip this step.

Verify

Before your visitors see it, add whoisbrowsing to your site's privacy policy (a paragraph to paste), and if the law requires your visitors' consent, get it first: see your responsibilities to your visitors.

  1. Deploy, or run your site locally. Open your site once. If the panel shows there, you're watching. If it doesn't, press Watch your site live on the home page. The home page shows the website as "Installed" once the script has loaded (or "Live now" while someone is there).
  2. To see a visitor arrive, open your site in another tab or window, or press Open a visitor window on the home page. That tab shows up as "you, testing". The tab with the panel is your owner view, and it is never counted.
  3. Move the mouse in the visitor tab. When both tabs are on the same page, its cursor moves in your owner view, and the panel lists it either way.

If nothing shows up:

  • Is the tag in the page source? Search the source for live.whoisbrowsing.com.
  • Is this address in your script's list? The script runs only on the websites listed for it. If it ran on an address that isn't listed, the home page says so and offers to add it.
  • Is something blocking it? A Content-Security-Policy without the lines above, or an ad blocker, can stop live.whoisbrowsing.com.
  • Testing from the EU/EEA, UK or Switzerland, or with Global Privacy Control on? Visitors in the EU, Norway, Iceland, Liechtenstein, the UK and Switzerland, and browsers that send Global Privacy Control, are never shown or counted. In those countries nothing is shown, and nothing is kept on our servers: the script is empty there, and a visitor's live connection from there is refused. Your owner panel doesn't appear either. With Global Privacy Control on (Brave sends it by default), the panel still opens, but your own test tabs don't show.

See how it works for what is sent, and the privacy page for what is never sent or stored.

Remove it

  1. Delete the tag from app/root.tsx and deploy. Visitors stop showing as soon as the new version is live.
  2. To turn the script off everywhere at once, delete it: open Site details from your script on the home page (or, if you signed in, the script's page in your dashboard), press Delete this script… and confirm with Yes, delete. If the tag stays on a page, the live server refuses it: nothing is shown, and nothing is kept on our servers.

Let your AI agent do it

Claude Code, Cursor or Codex can do this for you. Copy the prompt at the top of this guide with Copy prompt for your AI agent: it points the agent at https://whoisbrowsing.com/SKILL.md, and when this browser already has a script, it hands the agent that script, so no second one is made. The agent puts the tag in the right file for Remix and gives you a watch link. The full walkthrough is in Install with an AI agent.

More install guides

See every platform on the install page, or jump to Next.js and React. To see what the tag does, go to the home page.

See who is on your website, right now

Type your website, paste one line, and watch your visitors live. No account needed.

Free · Under 4 KB · No cookies on your visitors · No data stored about your visitors