Modify subdomain virtually with GTM


#1

Hi there

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

  • Our blog is running under www.yourposition.ch/blog/
  • Hubspot expects blog.yourposition.ch

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
Jens


#2

Hi @Jens_Hupperling,

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

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:


#3

Hi @Derek_Gervais

The hubspot UI expects a subdomain to differ between HP,LP and blog (e.g. www.yp.ch, lp.yp.ch and blog.yp.ch). Our blog has been existing at www.yp.ch/blog and we want not to migrate it due to SEO reasons.
So we have to push the subdomain (blog.yp.ch) 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
Jens


#4

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.