Skip to main content

Your dashboard

Excluding your own visits

Five tools, applied at different points.

Five tools, applied at different points. The difference between them matters, because four of them are free and one is not.

Paths, hostnames and countries are chips — type one and press Enter. The IP field is different: Add stores the address as a hash straight away, and the line beneath tells you which address you are on right now.

Path exclusions

Stop counting whole sections of your site.

Site settings → Excluded paths. One pattern per line:

/admin
/admin/*
/wp-admin/*
/preview/*

The wildcard rule, exactly

* is the only wildcard, and it means "any characters".

PatternMatchesDoes not match
/admin/admin and nothing else/admin/users
/admin/*/admin/users, /admin/settings/general/admin

/admin/* does not match /admin itself. If you want both, list both — as in the example above.

A pattern with no * is an exact match. Everything else in the pattern is literal, including dots, so /v1.0/docs matches only that path.

Full regular expressions are not supported. That is deliberate: this runs on every incoming event, and a pattern that backtracks badly would be a self-inflicted outage on your own collector.

Hostname exclusions

Stop counting a whole subdomain — the signed-in half of your product, a staging server, or a preview deployment running the same snippet as production.

Site settings → Excluded hostnames. One per line:

staging.example.com
*.preview.example.com

Exact by default

A plain entry matches that hostname only. Subdomains are not included unless you ask for them with a *. prefix:

EntryExcludesDoes not exclude
staging.example.comstaging.example.comapi.staging.example.com
*.preview.example.coma.preview.example.com, b.preview.example.compreview.example.com

Note the second row: *. means "the subdomains", not "this and its subdomains". If you want both, list both.

The default is exact on purpose. If you run a product on per-customer subdomains — user1.example.com, user2.example.com — an entry of example.com excludes your marketing site and leaves every customer's subdomain counted, which is almost certainly what you meant.

www. is ignored on both sides, so www.old.example.com and old.example.com are the same entry.

You do not need to list localhost. The script skips localhost, 127.0.0.1, [::1] and any .local name before it sends anything, unless you deliberately add data-allow-localhost to the tag. The field requires a dot and will not accept them, which is why — there is nothing to exclude.

Worked example: the app is signed-in, the marketing site is not

The most common shape. Your marketing site is on example.com and the product lives behind login on app.example.com. You want the marketing numbers and not the app.

One line does it:

app.example.com
Someone visitsCounted?
app.example.comNo
app.example.com/login, and every page below itNo — same hostname
www.app.example.comNo — www. is ignored
example.comYes
www.example.comYes
blog.example.comYes
api.app.example.comYes — see below

That last row is the one to check. app.example.com matches that hostname and nothing underneath it. If you have hostnames below the app that also run the script, add the wildcard line too:

app.example.com
*.app.example.com

If the app never loads the script in the first place, you do not need this at all — nothing is being sent. Check for the <script> tag in the signed-in area before adding a rule.

Worked example: staging on a path, not a domain

If staging is example.com/staging rather than a separate hostname, this is the wrong tool — hostname rules only see the host. Use a path exclusion instead:

/staging/*

One thing these rules cannot do

They apply on arrival, so they change what happens from now on. Traffic already recorded from a hostname stays in your reports after you exclude it. The reason is the same one that makes exclusions free: nothing was stored, so there is nothing to hide later — and equally, nothing to un-store retroactively.

This uses the Origin header the browser already sends, so nothing is added to the tracking script and it works on every build.

Country exclusions

Stop counting visits from somewhere you do not sell to.

Site settings → Excluded countries. Search for the country and pick it; you never type a code, so there is no way to exclude UK and wonder for a month why Britain is still being counted.

Like the rules above, this applies on arrival. Visits already recorded from a country stay in your reports after you exclude it.

Other tools hide the past as well. We do not, and the reason is that hiding is the more dangerous default: a country excluded by mistake silently rewrites months of reporting, and nothing on the screen tells you it happened. Stopping the count is reversible — you remove the country and counting resumes. Rewriting history is not.

Visits whose country cannot be resolved are still counted. Some requests arrive without a location — a VPN, a corporate network, an address our provider does not recognise — and they show as Unknown in your reports. Excluding a country does not touch them, because they are not known to be from it.

IP exclusions

Stop counting a particular connection — your office, your home.

Site settings → Excluded IP addresses. Add the address.

The page shows the address you are browsing from — click it to fill the box, so excluding yourself takes one click and no lookup elsewhere.

The address is hashed before it is stored. The raw IP is never written. The hash is scoped to your site, so it is meaningless anywhere else, and it is computed in a way that survives our daily key rotation — an exclusion you set today still works next month.

One consequence is visible on the screen: we cannot show you the list back. A hash cannot be turned into the address it came from, so the panel tells you how many addresses are excluded and offers to clear them, rather than listing them with a delete button each. That is the honest shape of storing a hash — an analytics product that could show you the list would be one that kept your addresses.

The obvious limitation: most home connections have a dynamic IP. If yours changes, the exclusion stops working and you will not be told. The browser flag below is more reliable for a machine you control.

The browser flag

Stop counting this browser on this origin, with no account setting at all. Open the console on your own site and run:

localStorage.truestat_ignore = "true";

To undo it:

delete localStorage.truestat_ignore;

Three things about it:

  • Per origin and per browser. example.com and staging.example.com are separate. So are Chrome and Firefox, and so is each browser profile. You have to set it in each one.

  • Clearing site data clears it, silently re-enabling yourself.

  • It is checked in the browser before anything is sent, so it costs nothing and works even when the collector is unreachable.

Which one to use

SituationUse
An admin area nobody should countPath exclusion
A staging path on the same sitePath exclusion
Your app, staging, or any whole subdomainHostname exclusion
Your office, fixed connectionIP exclusion
Your own laptopThe browser flag
Your home, dynamic IPThe browser flag
A country you do not sell toCountry exclusion

Excluded traffic does not cost you anything

Path, hostname, country and IP exclusions are applied before the event is stored, so excluded views are never written and never count against your monthly event limit.

This is a real lever, not a footnote. If a large share of your traffic is your own admin area, excluding it directly reduces your usage and can keep you on a cheaper traffic step. See What counts as an event.

The browser flag is applied even earlier — in the browser, so nothing is ever sent.

What is not excluded

Bot and crawler traffic is never excluded at collection. It is always stored and filtered when you read it. That is what makes AI visibility possible at all: a crawler hit discarded on arrival can never be reported.

Crawler traffic does not count against your monthly event limit. It is metered separately, against a crawler allowance that is the same on every plan, so how often GPTBot or ClaudeBot fetches your pages never pushes you up a traffic step. See Crawler traffic has its own allowance.

Was this page helpful?

Last updated September 17, 2026