Problem with Hubspot code tracking subdomain


We have a problem with Hubspot code on a page on our client's website, which is causing some data to be sent twice when the user clicks a button and is redirected to a subdomain (

Looking at the source code for the page in question, it appears we have some Hubspot code in the page header which is doing some kind of tracking (I don't know how or why - I don't have knowledge of how Hubspot works as such)

It's this script:

Obviously we can't just remove that script from the header template without removing it from all pages and stopping the tracking, which was put there by the client for a reason.

But can we stop it tracking this specific subdomain somehow?

What happens is that when a user goes to the subdomain (where our client have Driveworks - a third party software application - installed) Hubspot adds an extra licence to the user session which is causing problems. So we need it to "ignore" this subdomain and not track it at all. Is this possible?


Great, looks like the site stripped out my script. I'll try again: (commenting so hopefully it won't get stripped?)

< script type="text/javascript" id="hs-script-loader" async defer src="//"></script >

Anyone got any ideas?


Hi @sw78235, happy to help here. The hs script loader script tag is simply a tag that's placed into the header that loads in the larger HubSpot tracking script. This is done to make sure that larger tracking code script is non render blocking, and loads more quickly. In regards to ignoring a subdomain there's not really any way to do this. You can limit tracking to the subdomains listed in your Reports Settings here:, or exclude traffic from different referrers, but overall, there isn't an off-switch so to speak.

If you send over the page that you're seeing this issue on, I'd be happy to investigate this issue a bit more in detail.


Thank you Connor, can you let me know how I can send a private message to you with the link? Many thanks.


Hi @sw78235 you can reply to the thread here with the link to the site since it should not be sensitive info



Got it, thanks for that! You could toggle the "limit tracking to only the domains listed" button in your Reports Settings here: It would make sense to add different subdomains to those settings since your www. subdomain would be included in the one thats currently listed as, but if you don't want tracking on that domain, since it's external you could make sure to choose to not track the www one. Here's the help article on that:

If this doesn't work, can you provide a bit more info? You said "when the user clicks a button and is redirected to a subdomain" you were having some issues. Which button was that and which subdomain do you not want to track?


It's the subdomain and the user is sent there when they click the Start Configuring button on the page I sent the link to. What we really need to do is stop that subdomain being tracked if possible...


Got it, so yeah I'd recommend adding the subdomains individually here: and get rid of the domain that's in your settings I just linked. This configure subdomain is being tracked because of the catch-all If you replace that domain with just specifically the subdomains you want tracked, then resources. wouldn't be bucketed under Make sure to follow the article I linked above to limit tracking only to specific domains. If you do get stuck, you should be able to call into Support or open a webticket with them


Great, thanks for the info, I will see if we can make the necessary changes in the company account.