Analytics for builders

How to keep your own visits out of your site analytics

By Jonas Reed · Oct 28, 2026 · 9 min read

A shopkeeper repeatedly walking through the turnstile at their own shop entrance while a tally of visitors piles up.

You ship a page, open the dashboard, and the top page is the one you reloaded while fixing the layout. In your first week, your own testing is the most active visitor your site has. It lands in every number you read: page views, events, returning visitors, funnels.

This post covers what to change in your own code and browser, which works with any tracker. It also covers what the documented exclusion tools in Plausible, Umami and Google Analytics 4 do, and where each one stops. We have not measured how much a typical developer inflates a site, so there is no inflation figure here. There are only the places where it gets in.

Why an IP filter alone leaks

The usual first answer is to exclude your IP address. It works for a desk with a fixed address and fails everywhere else. Plausible's documentation says you add one address at a time, that it must be the full address because ranges are not supported, and that you can block up to 30 per site (as of Oct 2026). It also warns that if you block only your IPv4 address and your browser sends a request over IPv6, that visit is still recorded.

Which version your browser uses is not something you can guess from your country. Cloudflare's 2025 year in review reports that 29% of dual-stack requests worldwide were made over IPv6, with India at 67% and Hong Kong at 3.0%.

67%33%29%24%8.6%6.5%3%0.9%0.3%0.1%IndiaQatarWorldwideBelizeRussiaIrelandHong KongTanzaniaSyriaGibraltar

Source: Cloudflare, The 2025 Cloudflare Radar Year in Review, 2025-12. Retrieved Oct 25, 2026.

The chart counts requests from devices that can use both versions, measured at Cloudflare. It says nothing about your connection. It shows that a filter written for one address is a bet on which version your laptop picks, and on your phone, a hotel network and a coffee shop using the same address you listed.

What your own testing touches in Peeko

Each number in a dashboard is built from a different identity, so your testing leaks into each one differently.

  • Page views and events. Every reload is a page view. An event is a page view, an outbound click or a custom event, counted over the UTC calendar month, so reloads also spend your plan's allowance. Five kinds of click are recorded with no code: outbound, phone, email, whatsapp and form. Clicking your own mailto link to check it works is an email click.
  • People. The People number counts the first part of a one way keyed hash of your address and browser string, with the date mixed in and re salted every day. Reload all day from one laptop on one connection and you are one person. Open a second browser or switch to mobile data and you are two or three.
  • Returning visitors and journeys. A second hash, without the date, tells a returning visitor from a new one and strings page views into a journey. It is also the identity behind goals, funnels and revenue. Test your signup flow on Tuesday and again on Wednesday and you are a returning visitor who finished the funnel twice.
  • Funnels. A funnel holds two to five steps and follows a person rather than a visit, so one deliberate walk through the steps is one completion.
  • Revenue. A window.peeko.revenue call from your own site runs wherever your code runs, including on your test checkout. Revenue reported from your site and revenue confirmed by a verified Stripe webhook are two totals that are never added together, so a test can distort one without touching the other. Report revenue from your site or let Stripe confirm it explains the two paths.

Because the People hash changes every day, no tool can follow you across days to recognize and drop you. The fix has to happen before the beacon is sent, in your site.

Step 1: send the beacon only from your real hostname

Do not rely on NODE_ENV alone. A production build served on your laptop with npm run build && npm start is still a production build, and so is a preview deploy on a throwaway URL. A hostname check covers localhost, previews and local production builds at once. Put this in the <head> of your layout, with your own domain and site key:

<script>
  window.countMe =
    location.hostname === "yourdomain.com" &&
    !localStorage.getItem("skip-analytics");

  if (window.countMe) {
    const s = document.createElement("script");
    s.defer = true;
    s.src = "https://usepeeko.com/t.js";
    s.dataset.site = "YOUR_SITE_KEY";
    document.head.appendChild(s);
  }
</script>

Peeko is one script tag with a site key and needs no configuration once it is on the page, so gating the tag is the whole change. The second condition is the browser flag from Step 3. Because we cannot see your build, confirm the gated tag still reports with the test in Step 5.

Other tools put the same idea in their settings. Umami lets you add data-domains to the tracker script so it runs only on listed domains, and says each value matches against window.location.hostname, so check whether your site uses www. Plausible has a hostname allow list under Shields, where only listed hostnames are recorded. Its documentation notes that *.yourdomain.com records every subdomain but not yourdomain.com itself.

If a coding agent installed your analytics, check what it did. A tag added to the root layout renders in every environment, and an agent that verifies its work by loading your dev server has made a visit. Add analytics to Lovable, v0 or Bolt with one prompt shows a prompt, and you can add the hostname condition to it.

Step 2: guard the calls you write yourself

The gate in Step 1 keeps the tag off the page. It does not stop your own code from calling it. A custom event is a name and one optional string, with no properties object. Wrap it once so every call is checked:

export function track(name, detail) {
  if (!window.countMe) return;
  window.peeko?.event(name, detail);
}

Use the same check around any window.peeko.revenue call. If you run the @usepeeko/bot-track middleware, it is a separate server side path from the script tag, so an environment check around the tag does not cover it. Register the middleware only when your production condition is true. The crawler path keeps no address and no visitor hash, so it has no People number for your testing to inflate. A test request there is still a crawler hit in your tab.

Step 3: flag your own browser for tests on the live site

Sometimes you have to test on the real domain, such as a checkout, a form or a redirect. For that, set a flag in your own browser. Open the developer console on your site and run:

localStorage.setItem("skip-analytics", "1");

The Step 1 gate reads it and the tag never loads in that browser. To count yourself again, run localStorage.removeItem("skip-analytics");.

This is the same idea Umami documents with localStorage.setItem('umami.disabled', 1);, and it carries the same limit: the setting applies per website, so repeat it for each one. A flag lives in one browser profile. A private window, a second browser, your phone and a fresh profile start without it, so repeat it wherever you test. Plausible recommends its own browser flag for people on VPNs or changing addresses, for the reason in the first section.

Step 4: add an IP filter only where the address is stable

An IP filter is still the right tool for a teammate at an office with one static address, or for a tester you do not control. Google Analytics 4 handles this better than most:

  • You define internal traffic on the web data stream, then create an Internal Traffic data filter.
  • Matching supports equals, begins with, ends with, contains, CIDR ranges such as 10.0.0.0/8, and regular expressions.
  • A filter in testing state labels matching data so you can check it before you activate it.
  • An active filter makes permanent changes to your data.
  • A data filter can take 24 to 36 hours to apply, and a property can hold up to 10.

The permanence is the cost. Switch from testing to active only after you have read what the filter labels, because an active filter cannot be undone on data it has already removed (as of Oct 2026). Use the filter alongside Steps 1 to 3 rather than in place of them.

Step 5: prove it with a 10 reload test

Do not trust the gate because the page loads. Run this once:

  1. Read the page view count for one page. Use the dashboard, or run npx @usepeeko/cli in a terminal, which needs no install and speaks the same MCP endpoint an agent does, so a command and a tool call return the same numbers. Connect Claude Code or Cursor to your site analytics shows the agent side.
  2. Reload that page 10 times on localhost. Read the count. It should not move.
  3. Set the browser flag, reload the live page 10 times, and read the count again. It should still not move.
  4. Open a private window with no flag, load the live page once, and read the count. It should go up by one.

Step 4 is the control, and it matters. A count that never moves can mean the exclusion works or the tag is broken. Only a visit that does move it tells you which one you have. Do not use a curl beacon as the control. The ingest endpoint answers 204 to every well formed beacon, valid key or not, so a 204 shows the request arrived and nothing about whether your key is real.

That one control visit stays in your numbers. Write down its date and path.

Testing you already did is in the history

Everything recorded before you added the gate is still there. Page views, events and crawler hits are kept three years by default, and a site owner can set that anywhere from 30 days to ten years. Goals are definitions rather than counters, so a goal you write today counts over the months before it existed, and your launch week testing is part of that history.

Two habits keep this readable. Keep a one line note of the dates you were testing, and read your first chart with that window in mind. And write goals after you have added the gate, so a goal's first weeks are not mostly you. Install analytics and prove it works in one agent session gives a way to do the install and the check together.

You are not the only non-human in the data

Keeping yourself out does not give you a purely human count. Cloudflare reports that as of Dec 2, 2025, human traffic generated 47% of HTML requests it served and non-AI bots generated 44%. Across 2025, AI bots averaged 4.2% of HTML requests. These are Cloudflare's network figures, not your site's, and yours can differ a lot. Crawlers also do not run JavaScript, so a script tag does not see them. Peeko tracks them on a separate server side path and files each recognized hit under AI answers, Search indexing, AI training or Other AI bots, and AI crawler hits are never billed. For what to expect on a new site, read AI crawlers on a new site: the first 30 days.

The short version

Gate the tag by hostname, guard your own event and revenue calls with the same check, and set a browser flag for live testing. Keep an IP filter for addresses that do not change. Then run the 10 reload test with the control visit, and write down when you were testing.