Source: https://datafa.st/docs/excluding-analytics
Markdown source: https://datafa.st/docs/excluding-analytics.md
Description: Guide to exclude your own visits, specific IP addresses, countries, hostnames, or certain URL paths from DataFast analytics. Ideal for developers, site owners, and ensuring data accuracy.

# Excluding your own visits, IPs, countries, hostnames, or paths

To refine your analytics data and prevent your own activity or irrelevant traffic from being counted, DataFast offers several exclusion methods.

> **Tip:** Exclusions are also a great way to reduce your DataFast usage. Excluded visits don't count toward your monthly event limit, so you can focus your quota on the traffic that matters most.

## 1. Exclude specific URL paths

You can prevent events from specific URL paths (e.g. `/settings`, `/test`) from being tracked. DataFast supports both exact paths and wildcard patterns.

- `/admin` - Excludes only the exact /admin page
- `/admin/*` - Excludes all pages under /admin (like /admin/users, /admin/settings, /admin/settings/general, etc.) but not the /admin page itself.

> All events will be excluded from tracking on these paths, even revenue attribution.

1.  Go to your **[Website Settings](/dashboard)** in DataFast.
2.  Navigate to the **Exclusions** tab.
3.  Add the URL paths you want to ignore. DataFast won't track visitors who visit these paths and you won't see them in your analytics.

## 2. Exclude IP addresses

You can prevent visits from specific IP addresses (e.g. `127.0.0.1`) from being included in your analytics.

1.  Go to your **[Website Settings](/dashboard)** in DataFast.
2.  Navigate to the **Exclusions** tab.
3.  Add the IP addresses you want to ignore. DataFast won't track visitors from these IPs and you won't see them in your analytics.

## 3. Exclude specific countries

You can prevent events from specific countries from being tracked in your analytics. This is useful for filtering out bot-heavy regions or complying with data regulations.

1.  Go to your **[Website Settings](/dashboard)** in DataFast.
2.  Navigate to the **Exclusions** tab.
3.  Select countries from the dropdown to exclude. DataFast won't track visitors from these countries and you won't see them in your analytics.

> All events will be excluded from tracking for these countries, even revenue attribution.

**Common use cases:**
- Filter out bot-heavy regions that skew your analytics
- Comply with regional data privacy regulations
- Focus analytics on your target markets only

## 4. Exclude specific hostnames

You can prevent events from specific hostnames from being tracked. Only the exact hostname will be excluded.

- `subdomain.example.com` - Excludes only that exact hostname
- `example.com` - Excludes only the root domain (not subdomains)

> All events will be excluded from tracking for these hostnames, even revenue attribution.

1.  Go to your **[Website Settings](/dashboard)** in DataFast.
2.  Navigate to the **Exclusions** tab.
3.  Add the hostnames you want to ignore. DataFast won't track visitors from these hostnames and you won't see them in your analytics.

**Common use cases:**
- Filter out white-labeled subdomains (e.g., `user1.example.com`, `user2.example.com`)
- Exclude staging or test environments
- Exclude internal tools or admin panels

## 5. Exclude your own visits (browser-based)

To prevent counting your visits from a specific browser, you can set a special `localStorage` flag. This method is useful for development and testing.

### To exclude your visits:

1.  Visit the website where you want to exclude your visits.
2.  Open the developer tools in your browser. (Right-click on the page and select **Inspect**, or press `F12` on Firefox/Chrome, or `Option+Command+i` on Safari).
3.  Go to the "Console" tab.
4.  Paste the following command and press Enter:

```javascript
localStorage.datafast_ignore=true
```

This needs to be done for each domain/subdomain and for every browser you use for testing.

### To re-enable counting of your visits:

1.  Visit the website and open the developer console as described above.
2.  Paste the following command and press Enter:

```javascript
delete localStorage.datafast_ignore
```

> **Tip:** For more ways to reduce your event usage and avoid plan limits, see the [reduce your usage](/docs/reduce-usage) guide.
