Block Visitor IPs and Bots
Last updated: 17th June, 2021
✋ A blocked visitor will not show up in GoSquared Analytics and will not be able to send or receive messages through Assistant. Blocking visitors applies on a per project basis.
You can use several methods to block users:
- Block a visitor currently on your site
- Block a specific IP address – or your own IP
- Block a full IP range
- Automatically block bots and site crawlers
- Block traffic from your developers when working on localhost
Why would I block visitors?
Sometimes it's important to be able to exclude certain visitors from your GoSquared stats:
- Block teammates who are browsing from your office's IP address so that your team doesn't skew the stats.
- Block abusive Chat users.
- Ensure you're tracking real people and not automated bots/spiders and crawlers. Creepy crawlies can massively impact your numbers if they're not ignored. Luckily, GoSquared can automatically detect bots for you – we'll get onto that shortly.
Automatic bot blocking is turned on by default for all new GoSquared accounts.
When bot blocking is enabled, GoSquared will ignore all traffic from:
- Search engine crawlers (e.g. GoogleBot)
- Known "referral spam" sources. We maintain a list of known spam referrers and regularly update it from Piwik's open-source list.
Only the GoSquared site owner can turn on automatic bot blocking. If you are not the site owner, you'll want to ask them to complete this process for you:
- Navigate to the in Settings > Current Project > Blocked
- Toggle the 'Automatically block bots' switch to On.
That's it! We maintain and update this list of blocked bots so you never have to worry about it again.
The Visitor widget in the Now dashboard shows you a full list of people currently on your website, in real time. To block a specific visitor:
- Head to the Now dashboard and take a look at the 'Visitors' widget.
- Find the visitor that you want to ignore and click on them - this will reveal the visitor's current session details.
- Click 'Ignore' in the top right of the widget.
- Tag the visitor with a memorable name and then click 'Tag and ignore'.
The visitor will now appear in the list of blocked IP addresses in Settings > Current Project > Blocked.
If you manage more than one site, make sure you have selected the site you wish to block visitors for in the project picker in the top left of GoSquared.
- In your GoSquared account, head to Settings > Current Project > Blocked
- Click 'Add an IP address to the blocked list'.
- Enter the IP address of a visitor you want to block (by default your own IP address will appear there).
- Click 'Block'.
That's it, you're done!
Sometimes, blocking a specific IP address may not be enough – in larger organisations, teams can often be spread across multiple IP addresses in a range. Bots and spiders can also run from varying IP addresses within a range, and so blocking an IP range can be more useful than adding a long list of IP addresses one-by-one.
Convert an IP range to CIDR
GoSquared uses the industry standard CIDR notation to specify a range of IP addresses. If you know the first and last IP addresses in the range, you can use this tool to convert them to the correct CIDR format for GoSquared to use.
Then just copy and paste the CIDR values into the 'Block an IP address' box in Settings > Current Project > Blocked.
When working on a new version of your website, it's common for developers to test their new code on a version of the site that they run locally on their own computer. Any tracked data from a 'localhost' environment is automatically blocked to prevent it from polluting your genuine site traffic.
If you want to turn on tracking for localhost (only recommended for developers), you'll need to add an extra line of code to your site. View our technical tracking code config options here.