Navigate to your account settingsIn your HubSpot account, click your photo or avatar in the top right-hand corner, then click Settings.
Set your target domain
Install Code & Tracking will be selected by default. The first thing you'll see in the Tracking Code tab of your settings is your target website domain. The Target domain is the domain that is used in the links, page performance, and competitors apps. This is also the domain listed above your Hub ID in the top-right corner of your account.
Install your tracking code
You'll need to embed the tracking code on any external website pages you want HubSpot to track. Once installed, it may take a few moments to write to all your pages. Check out these instructions on how to validate that the tracking code is properly installed on your external pages. Refer to this article on how to install the tracking code on a generic website.
Depending on the location of your company, you may be required by law to request consent for cookies to be used during a visitor's session, or you may not be allowed to track cookies at all. Please ensure you are following the proper use guidelines specific to your location. If you're doing business in Europe, check out this article to learn how to set this up.
Navigate to advanced tracking
You can view your other connected domains and add any external websites that have your HubSpot tracking code installed. To add an additional external domain, click +Add domain.
In this section, you can enable Automatic cross-domain linking to ensure that contacts who visit pages on one domain and click on a link to visit another domain (e.g., your-website.com to your-other-website.com) will be counted as the same visitor and not as a new visitor.
You can also select to Limit tracking to these domains in your list of site domains. This ensures that if somehow your tracking code ended up elsewhere that doesn't belong to your website, it will not count visits for those domains. With this setting enabled, visits will only be counted for the domains you choose to track.
Exclude traffic from your reports
The last section allows you to exclude traffic from specific IP addresses and referral domains. It is highly recommended that you filter out your own traffic so that you don't skew your data with internal visits. Previews of your pages do not count towards traffic; your views to live pages will count in your traffic analytics unless you filter your IP addresses. Note that filtering IP traffic also filters submissions data from your forms. Learn more about how IP filtering impacts form submissions here.
You can find your current IP address at the top of this section. If you need to determine other IP addresses for your home or business, ask your IT department or internet provider. Add your IP addresses to the IP Addresses to Exclude field. Use commas to separate different IP addresses (for example, 18.104.22.168, 22.214.171.124) and use dashes to represent entire ranges of IP addresses (for
You can also filter our traffic from specific domains, by adding the root domain (for example, mydomain.com) to the From these referrers field. When you're finished, click Save.