Traffic Filtering
Block unwanted traffic by IP address or country to keep your analytics clean.
Overview
Traffic filtering allows you to exclude certain visitors from your analytics data. This is essential for:
- Excluding your own visits while developing or testing
- Filtering out known bot traffic (on by default)
- Blocking traffic from specific countries
- Ignoring hits from domains you don't own (see Included / Excluded Domains in site settings)
- Excluding office or team IP addresses
Excluding your own visits
Invoker counts your own visits like anyone else's, even while you're signed in to the dashboard. Pick one:
- Block your IP address (below). Works for every browser and device on that network, and is the best option for an office.
- Opt out a single browser: open your site, then run
window.invoker.blockTrackingForMe()in the developer console. It stores a flag in that site'slocalStorage;window.invoker.enableTrackingForMe()undoes it. Clearing site data removes it. - Skip development and staging: add
localhostorstaging.example.comto Excluded Domains in site settings.
Allowed (included) and excluded domains
Anyone can copy your snippet onto another website. To only accept data from hostnames you own, list them under Site → Settings → Included Domains. When the list is empty, every hostname is accepted.
- Matches are exact:
example.comandwww.example.comare different entries. *.example.commatches any subdomain but notexample.comitself — add both if needed.- Excluded Domains always win over included ones.
- The script has matching
data-included-domains/data-excluded-domainsattributes (exact hostnames only) if you'd rather stop hits in the browser.
Do Not Track
To skip visitors whose browser sends Do Not Track, turn on Respect Do Not Track in Site → Settings → Privacy & Tracking (the server drops those hits), and/or add data-honor-dnt="true" to the script (nothing is sent at all). Both are off by default. See Privacy & GDPR.
Bots
Known bots, crawlers and headless browsers are detected from the user agent and dropped. This is on by default.
IP Blocking
Block specific IP addresses or ranges from being tracked.
Supported Formats
| Format | Example | Description |
|---|---|---|
| Exact IP | 192.168.1.100 | Blocks a single IP address |
| CIDR Range | 192.168.1.0/24 | Blocks all IPs in a subnet |
| Wildcard | 192.168.*.* | Blocks matching pattern |
| IPv6 | 2001:db8::1 | Exact IPv6 addresses (CIDR ranges and wildcards are IPv4 only) |
Adding Blocked IPs
- Go to your site's Settings page
- Find the "IP Blocking" section
- Enter an IP address or range
- Click the add (+) button
- Save your settings
# Block your home IP 98.234.56.78 # Block your office network 10.0.0.0/8 # Block a range of IPs 203.0.113.0/24 # Block with wildcards 192.168.1.*
Finding Your IP Address
To find your current IP address:
- Search "what is my IP" in any search engine
- Or use a service like
ifconfig.me - Note: Your IP may change if you don't have a static IP
Country Blocking
Block all traffic from specific countries using ISO country codes.
How It Works
When country blocking is enabled:
- We determine the visitor's country using IP geolocation
- If the country matches a blocked code, the pageview is not recorded
- The visitor still sees your website normally
Adding Blocked Countries
- Go to your site's Settings page
- Find the "Country Blocking" section
- Select countries to block from the list (stored as ISO 3166-1 alpha-2 codes, e.g. DE, US)
- Save your settings
Common Country Codes
| Code | Country |
|---|---|
US | United States |
GB | United Kingdom |
CA | Canada |
DE | Germany |
FR | France |
AU | Australia |
CN | China |
Important Considerations
Filtering is Immediate
Once you add an IP or country to your block list:
- New pageviews from blocked sources are not recorded
- Historical data is not affected
- Changes take effect immediately
Filtering Does Not Block Access
Traffic filtering only affects analytics collection:
- Blocked visitors can still access your website
- They just won't appear in your analytics
- For actual access blocking, use your web server or CDN
VPN and Proxy Considerations
Be aware that:
- Users with VPNs may bypass country blocks
- IP blocking works on the visible IP, not the actual origin
- Proxy servers may cause different IP addresses
Best Practices
- Block development traffic: Add your office and home IPs to exclude internal visits
- Use CIDR for networks: Block entire office networks with CIDR notation
- Document your blocks: Keep notes on why each IP/country is blocked
- Review periodically: Remove outdated blocks when no longer needed
- Don't over-block: Only block what's necessary to keep data clean
API Access
Manage traffic filters via API by updating site settings:
PUT https://api.invoker.app/api/sites/{site_id}
Authorization: Bearer YOUR_API_TOKEN
{
"name": "My Website",
"blocked_ips": [
"192.168.1.100",
"10.0.0.0/8"
],
"blocked_countries": [
"CN",
"RU"
]
}