Support Center
v1.0
Hubspot
To add Hubspot Analytics integration to DeveloperHub, you must have a plan with Custom HEAD Tags enabled.

Setting up Hubspot Analytics
Follow the steps as provided in Install the HubSpot tracking code. However, make sure to remove defer and async from the script tag.
The script should look like:
<script type="text/javascript" id="hs-script-loader" src="//js.hs-scripts.com/{{your-id}}.js"></script>
HubSpot Analytics integration is created for traditional websites, while your DeveloperHub documentation is built over a single page application. To trigger tracking page views, add the following Custom HEAD Tag after the embed code above:
<script>
var trackPage = function(event) {
var _hsq = window._hsq;
if (!_hsq) {
console.log('hsq not loaded yet');
return;
}
_hsq.push(['setPath', window.location.pathname]);
_hsq.push(['trackPageView']);
}
document.addEventListener('onsectionchange', trackPage);
document.addEventListener('onpagechange', trackPage);
</script>
Last updated on Aug 5, 2026
Anything missing? Leave us feedback
Staging Environment
Inline Blocks
Import & Export
Features
Comments
Developers