Modify subdomain virtually with GTM


Hi there

We need to modify the subdomain of our blog virtually. The situation:

  • Our blog is running under
  • Hubspot expects

The needs:

  • We want to do a hsq_push() into GTM to virtually modify the subdomain

Could s.o. provide us with help?

Kind regards


Hi @Jens_Hupperling,

What exactly do you mean when you say that HubSpot expects Do you have a HubSpot hosted blog at

If you're pushing information into GTM, you wouldn't want to be pushing information to the _hsq tracker. You can set the page path using the HubSpot tracking code API, but it's not possible to change the domain/sub domain using that method and that doesn't update GTM:


Hi @Derek_Gervais

The hubspot UI expects a subdomain to differ between HP,LP and blog (e.g., and Our blog has been existing at and we want not to migrate it due to SEO reasons.
So we have to push the subdomain ( virtually into hubspot (via hsq_ push !?!).
But this isn't possible with pagePath, cause the pagePath starts always afterwards the (sub-)domain.

Did you now understand our issue?

Kind regards


Hi @Jens_Hupperling,

I think I do understand; currently, it's not possible to alter the subdomain for analytics coming into HubSpot. You can use the 'Set page path' method above to alter the path, but you cannot alter the root/sub domain.

If both your blog and website are hosted with HubSpot, then you don't have to keep them on separate subdomains. You can make a single subdomain primary for multiple tools (e.g. blog & website pages). This won't work for an externally hosted blog/website, but might be something to consider going forward.