The HubSpot tracking code can be used across multiple sites with separate domains. This function will allow you to get the query parameters required to create create links that will allow you to track your visitors across those separate domains. These query parameters are used by the HubSpot tracking code to identify a visitor across domains by ensuring that the separate cookies for the separate domains are merged to a single tracked visitor.
Note: Cross-domain links are only needed when linking to a distinct domain (e.g.,
anotherdomain.com) that is also being tracked for a single HubSpot account. HubSpot tracking cookies are set at the domain level (
.thisdomain.com), so visits between subdomains (
blog.thisdomain.com) should not need the cross-domain link parameters.
Note: Cross-domain links are automatically set up by the HubSpot tracking code on load, so you should only need to update links that are dynamically added to the page after the tracking code is loaded.