Exclude traffic from your site analytics
Last updated: August 9, 2024
Available with any of the following subscriptions, except where noted:
All products and plans |
After connecting your domain to HubSpot or installing the HubSpot tracking code on your external site, the next step is to exclude traffic from your site analytics, such as internal traffic, referrer domains, and bots.
The bot activity and IP addresses you set will be excluded in the following data:
- CTA views and clicks
- Page views and sessions
- Form views and submissions
- Clicked events
- Social post clicks
- Workflow enrollments (includes when an event occurs only)
Please note:
- It can take up to ten minutes for a newly added IP address to be excluded from your site analytics.
- It is recommended to use event workflow enrollments when basing enrollment triggers on exclusion activities.
Filter bot activity
By turning this setting on, HubSpot will detect any activity from bots and remove the engagement provided from these bots from your analytics. Going forwards, this may impact the existing metrics in your marketing emails, pages, and more.
- In your HubSpot account, click the settings settings icon in the top navigation bar.
- In the left sidebar menu, navigate to Tracking & Analytics > Tracking Code.
- Click the Advanced Tracking tab.
- Click to toggle the Bot filtering switch on to filter all activity from known internet bots.
- In the bottom left, click Save.
Exclude traffic from IP addresses or referrers
- In your HubSpot account, click the settings settings icon in the top navigation bar.
- In the left sidebar menu, navigate to Tracking & analytics > Tracking code.
- Click the Advanced Tracking tab.
- In the IP Addresses to Exclude text box, enter IP addresses or IP ranges to exclude:
- Your current IP address appears above the text box. To exclude it, copy and paste it into the text box. If you make changes to your network or have employees who visit the site from new networks, you can add additional IPs over time. If you need to find an IP address manually, try going to https://www.whatismyip.com/ or http://ip4.me, or ask your IT department or internet provider. If your IP address is dynamic, find out if your internet provider can provide you with a static IP for your corporate office or home network and use that instead.
- Both IPv4 and IPv6 addresses and ranges are accepted in this field.
-
An IPv4 address has the following format: x.x.x.x where x is called an octet and must be a decimal value between 0 and 255. Octets are separated by periods. An IPv4 address must contain three periods and four octets. The following examples are valid IPv4 addresses:
- 1.2.3.4
- 01.102.37.255
-
An IPv6 address can have either of the following two formats: Normal - pure IPv6 format or Dual - IPv6 plus IPv4 formats. An IPv6 (Normal) address has the following format: y:y:y:y:y:y:y:y where y is called a segment and can be any hexadecimal value between 0 and FFFF. An IPv6 (Dual) address combines an IPv6 and an IPv4 address and has the following format: y:y:y:y:y:y:x.x.x.x. The following examples are valid IPv6 addresses:
- 2001:db8:3333:4444:5555:6666:7777:8888 (Normal)
- 2001:db8:3333:4444:5555:6666:1.2.3.4 (Dual)
-
- Use commas to separate different IP addresses (e.g., 63.139.127.5, 63.139.127.23); and dashes to represent entire ranges of IP addresses (e.g., 64.159.127.0 - 64.159.127.255). Ranges can also be represented using subnet masks (e.g., 192.168.1.0/24).
- In the From these referrers text box, enter referrer domains or IP addresses to exclude. This is most commonly used to block unwanted or spam traffic. If you want to exclude traffic from your own external domains, learn how to track multiple domains with HubSpot.
- In the bottom left, click Save.
Please note:
- Once an IP address or referrer domain has been added to your excluded traffic, no visits, page views, submissions, or events data originating from that IP address or domain will be recorded in your HubSpot analytics. Adding an IP address or referrer domain does not retroactively remove any historical traffic from those origins.
- It is not possible to block a domain that is included as a site domain. For example, if the root domain hubspot.com is included as a site domain, then, app.hubspot.com cannot be excluded. If the site domain were a subdomain such as www.hubspot.com instead of the root domain, you can then block app.hubspot.com
- Excluding a subdomain does not exclude other subdomains on the same root domain, or the root domain itself. For example, if you choose to exclude example.thisdomain.com, you can still analyze traffic from thisdomain.com and blog.thisdomain.com.
- When a visitor visits a page from an excluded IP address, HubSpot sets a cookie in that user's browser but the cookie is not associated with a contact record. Therefore, analytics such as page views cannot be associated to the contact record, and personalization tokens will not work.