Block IP addresses

If you want Clarity to stop tracking certain IP addresses, you can add them to a blocklist. This excludes internal IPs such that related data isn't added to data gathered from your site's visitors.

  • Dashboard: Site visitors on the list won't contribute to the tracked metrics.
  • Recordings: No sessions from visitors on the list are recorded.
  • Heatmaps: Site visitors on the list won't have their activity included on click maps or scroll maps.

Note

Clarity only supports IPv4 addresses. We do not support IPv6 or dynamic IP addresses.

Block an IP address from tracking

Note

To set up IP exclusion, you need to be an administrator for your project. If you aren't, you can see which IP addresses are blocked, but you can't change anything.

Step 1

Go to Clarity > Settings > IP blocking, and select Block IP address.

IP blocking.

Step 2

On the Block IP address screen, make your selections and then select Block.

  • Name: Enter a friendly name to identify the IP address.
  • Block my current IP: Check the box if you want to exclude your IP address.
  • IP address: Enter the IP address.

Add an IP address to block.

Tip

You can also block a range of IP addresses. See the next section for details.

Once you've entered one or more IP addresses, each one is displayed in a list on the IP blocking page.

List of blocked IP addresses.

Note

You may need to wait about 15 minutes for the changes to come into effect.

Block a range of IP addresses

If you want to block a whole range of IP addresses, you don't need to enter them one by one.

Step 1

Go to Clarity > Settings > IP blocking, and select Block IP address.

IP blocking addresses.

Step 2

On the Block IP address screen, make your selections and select Add.

  • Name: Enter a friendly name to identify the range of IP addresses.
  • Block my current IP: Check the box if you want to exclude your IP address.
  • IP address: Enter a set of specific IP addresses you would like to block. If you want to block of range of contiguous IP addresses, you can specify them individually. However, you can also use the CIDR range of the form <Ip-address>/<prefix-length> to define a set of IP addresses. Use a slash after the first address followed by the end address. For example, specify the CIDR range 69.89.31.0/24 to block the range of IP addresses from 69.89.31.0 to 69.89.31.255.

Add a range of IP addresses to block.

Tip

For more information on CIDR ranges, visit Classless Inter-Domain Routing.

Stop blocking an IP address

Step 1

Go to Clarity > Settings > IP blocking, and select the icon to the right of the IP address you want to unblock.

Step 2

On the Unblock this IP address screen, select Unblock.

Right click and select inspect.

Verify that an IP address is blocked

You can verify that an IP address is blocked if you visit the page from that IP address.

Step 1

Browsing with a blocked IP address, go to the webpage you want to verify.

Step 2

Open the JavaScript console of your browser and look for a message.

Verify a blocked IP.

A message is displayed at the top of the console: "Data from this session is not being collected by Microsoft Clarity due to your configured project settings."

Note

You can find the JavaScript console in Edge or Chrome from your browser's main menu: More Tools > Developer tools.

FAQ

For more answers, refer to General FAQ.

Visit Clarity