# Excluding traffic

This is the markdown version of https://statlark.com/docs/excluding-traffic. Every docs and Learn page has one: add .md to its address. Index: https://statlark.com/llms.txt

Clean numbers mean keeping the noise out — your own visits, a staging domain, the admin area, or a region that’s all bots. Statlark drops excluded hits *before* they’re counted, so they never touch your reports or your event total.

## Exclude your own browser

The quickest one. Open any page of your site with `?statlark_ignore=1` and that browser is skipped from then on — no rule to manage, and it takes effect immediately. There’s a one-click **Copy link** for this under [Settings → Traffic exclusions](https://statlark.com/settings).

```bash
# Open your site once with this query string in any browser you
# don't want counted. It sets a local flag and that browser is
# skipped from then on:
https://yoursite.com/?statlark_ignore=1

# Changed your mind? Clear it the same way:
https://yoursite.com/?statlark_ignore=0
```

The flag is stored in that browser only (per site), so repeat it on each device or browser you want to leave out. It survives until you clear it with `?statlark_ignore=0`.

## Site-wide rules

For everything that isn’t “just my browser,” add a rule under [Settings → Traffic exclusions](https://statlark.com/settings). Every hit that matches an enabled rule is dropped. Three kinds:

- **Path** — a URL path, with `*` as a wildcard. `/admin*` drops the whole admin section; `/wp-*` covers WordPress paths.
- **Hostname** — an exact host, like `staging.example.com` or a Vercel preview domain, so pre-production traffic never lands in your live numbers.
- **Country** — a two-letter country code (e.g. `RO`), useful for shutting out a region that’s overwhelmingly bots.

Rules apply to page views and goals, but never to payments — a sale is a sale, so revenue is always recorded even from an excluded path.

A note on IP addresses: Statlark doesn’t store your visitors’ raw IPs (that’s the privacy promise), so there’s no IP-based rule. The self-exclude link covers “ignore me,” and path / hostname / country cover the rest.

## Hide app test devices

When you ship a new Android build, Google Play’s pre-launch report and Firebase Test Lab install it on test devices, sign in with throwaway Google accounts and tap through the app. Each device counts as a visitor and, once your app identifies it, as a person. An **Email** rule under [Settings → Traffic exclusions](https://statlark.com/settings) hides every device that signs in with a matching address:

```
*@cloudtestlabaccounts.com
```

`*` is any text and `#` is one digit; case doesn’t matter, and the whole address must match. As you type, Settings shows how many visitors and people the pattern matches right now, before you save it.

An email rule works differently from the rules above:

- **Nothing is dropped.** The device’s visits are still stored and still count toward your plan. They’re left out of every number in the dashboard, the API and the MCP server.
- **Past periods change too.** The address only arrives when the device signs in, so a new rule hides that device’s earlier visits as well. Until a device signs in, its visits count.
- **It’s reversible.** Delete the rule and everything comes back.
- **Anyone who has paid is never hidden.** A payment on the device, or on any device of the same person, keeps it in your numbers, so revenue never changes.
- **It hides the device, not the person.** If someone signs in with a test address on one device and a real one on another, only the first is hidden.

A hidden device shows again if it later signs in through the tracker or an app SDK without an address: those replace the stored address each time. The [REST identify endpoint](https://statlark.com/docs/api.md#writing) keeps an address it isn’t sent, unless you send `"user_email": null`.

You can see how many are hidden: the Overview shows a line under its numbers, the REST `/overview` response has a `hidden_visitors` field, and the MCP server’s answers say so in their caveats.

Some test accounts look like `first.12345@gmail.com`, which `*.#####@gmail.com` matches. Real people have addresses like that too, and they’d be hidden unless they’ve paid, so check the preview count before you save a pattern like that one.

Last reviewed 25 November 2026
