Docs

Inbound Filters

3 min read

You can configure Inbound Filters to control who can send events to your site (pageviews, errors, web vitals and custom events are all considered events).

Inbound filters

Event sampling

Sampling gives you control over how many events are captured. It can be a value between 0% (discard all events) and 100% (capture all events).

Event sampling

For example, a sampling rate of 85% means 15% of incoming events will be randomly discarded.

Please note it can take up to a minute for your configuration changes to propagate across our data ingestion servers.

Configure allowed origins

You can optionally restrict the hostnames that can send events to your site.

Allowed origins

Steps

  1. In your Cronitor dashboard go to your Site.
  2. Click on Edit.
  3. Look for the section Inbound Filters.
  4. Add one or more hostnames under Allowed origins.
  5. Save - you’re done!

Cronitor will only record events reported by the hostnames in this list, the rest will be discarded. If you leave this field empty, any hostname that contains your Site’s tracking code can record data.

Configure Blocked IPs

You can optionally deny IPs or Networks from sending events to you site. Besides helping protect your site analytics, this is useful for discarding analytics events coming from you or your office VPN.

Blocked IPs

Steps

  1. In your Cronitor dashboard go to your Site.
  2. Click on Edit.
  3. Look for the section Inbound Filters.
  4. Add one or more IPs or CIDR networks under Blocked IPs.
  5. Save - you’re done!

Cronitor will automatically translate an IP address into CIDR notation. For example if you input the single IP 1.2.3.4 it will be saved as 1.2.3.4/32, and if you enter a network like 10.0.0.0/16 it will be saved as-is.

Configure Blocked Countries

You can optionally deny events originating from particular countries to your site.

Blocked countries

Steps

  1. In your Cronitor dashboard go to your Site.
  2. Click on Edit.
  3. Look for the section Inbound Filters.
  4. Add one or more countries under Blocked countries.
  5. Save - you’re done!

Configure Blocked Paths

You can optionally deny events from specific paths on your site.

Blocked paths

Steps

  1. In your Cronitor dashboard go to your Site.
  2. Click on Edit.
  3. Look for the section Inbound Filters.
  4. Add one or more countries under Blocked paths.
  5. Save - you’re done!

You can add a * character to treat the path as a prefix. For example, /users/* will:

  1. Allow paths such as /users and /profile.
  2. Block paths starting with the /users/ prefix like /users/123 and /users/123/settings.

At this point only full matches and prefixes are supported (if using a wildcard, it must be the last character).

Filter out events from localhost

This option lets you discard events coming from known IPv4 and IPv6 localhost addresses. For example any event coming from localhost, ::1 or 127.0.0.1 will be discarded.

Filter out events from known crawlers

This option lets you discard events from known crawlers and bots.

Cronitor curates an internal list. If you’d like us to consider adding or removing a crawler or bot please reach out to us.