Shields
Shields let you exclude specific traffic from your analytics — IP addresses, URL paths, hostnames, and countries. Events matching shield rules are still tracked but excluded from your dashboard and aggregate views.
IP Exclusions
Exclude traffic from specific IP addresses or CIDR ranges. Common uses:
- Exclude your own traffic while developing or testing
- Exclude office network IPs
- Exclude CI/CD servers and automated tools
Adding IP Exclusions
- Go to Settings → Shields
- Under IP Exclusions, click Add IP
- Enter an IP address or CIDR range:
- Single IP:
203.0.113.42 - IPv4 range:
203.0.113.0/24 - IPv6:
2001:db8::1 - IPv6 range:
2001:db8::/32
- Single IP:
- Optionally add a label (e.g., "Office network", "My home IP")
- Click Save
Finding Your IP
Visit whatismyip.com or run curl ifconfig.me in your terminal.
Path Exclusions
Exclude specific URL paths from tracking. Events on excluded paths are still received but not counted in your dashboard.
Adding Path Exclusions
- Under Path Exclusions, click Add Path
- Enter a URL path pattern:
- Exact path:
/admin - Wildcard:
/admin/*(matches/admin/users,/admin/settings, etc.) - Multiple patterns: add one per line
- Exact path:
- Click Save
Common Path Exclusions
/admin/*— admin panel pages/staging/*— staging environment paths/internal/*— internal tool pages/preview/*— content preview pages
Hostname Filtering
Restrict tracking to specific hostnames. Only events from allowed hostnames appear in your dashboard. This prevents tracking from unauthorized domains that might have your script installed.
Setting Up Hostname Filtering
- Under Hostname Filtering, click Add Hostname
- Enter allowed hostnames:
example.comwww.example.comblog.example.com
- Click Save
When hostname filtering is active, events from any hostname not in the list are excluded.
Country Blocking
Exclude traffic from specific countries. Useful for filtering known bot-heavy regions or excluding markets you don't serve.
Adding Country Blocks
- Under Country Blocking, click Add Country
- Select countries from the dropdown
- Click Save
Events from blocked countries are still stored but excluded from your dashboard metrics.
How Shields Work
Shield rules are applied during event processing:
- Event arrives at the ingestion pipeline
- The event is checked against all active shield rules for the site
- Matching events are flagged as excluded
- Excluded events are stored but filtered out of dashboard queries and aggregate views
This means:
- No data is lost — excluded events are still in the database
- Shields are not retroactive — they only affect events received after the rule is created
- Multiple shields stack — an event excluded by any rule is excluded from the dashboard
Tips
- Start with IP exclusions — exclude your team's IPs first to clean up your data
- Test before deploying — use
data-debugon the tracking script to verify which events fire - Review periodically — IP addresses change, especially for home networks
- Use hostname filtering — if you notice traffic from unexpected domains in your sources