Source: https://usedataowl.com/docs/excluding-analytics
Markdown source: https://usedataowl.com/docs/excluding-analytics.md
Description: Keep your traffic metrics clean: block your own team's visits via localStorage flags, ignore localhost, and filter out headless browser automation.

# How to Exclude Your Own Visits, Localhost & Bots from Analytics

## Exclude your own browser

Run this in the browser console on your site:

```js
localStorage.setItem("datasense_ignore", "true")
```

Remove the key to be counted again.

## Honor Do Not Track

```html
<script
  defer
  data-respect-dnt="true"
  data-website-id="YOUR_SITE_ID"
  src="https://usedataowl.com/js/script.cookies.js"
></script>
```

## Excluded automatically

- Localhost and `file:` pages (allow localhost with `data-allow-localhost="true"`).
- Automated browsers: WebDriver, Cypress, PhantomJS and Nightmare.
- Known bots. Crawlers are counted separately in [bot traffic tracking](/docs/bot-traffic-tracking).
