Integration
HubSpot
Add the HubSpot tracking code to your published GitBook site.

Overview
This integration allows you to add the HubSpot tracking code to your published GitBook site.
How it works
The integration injects the HubSpot script on your page using the configured tracking ID, so that you can get analytics information from your GitBook site directly inside HubSpot.
Configure
Install the integration on the GitBook site of your choice.
Locate the HubSpot tracking ID you want to use, which is available in HubSpot's Reports & Analytics Tracking section.
The ID should be just the numeric ID from the script URL "//js.hs-scripts.com/{hubspot_id}.js" (i.e. only paste what you see in hubspot_id).

“We can use our documentation for prospects, not just customers. Finding a certain page in Google is just way easier with GitBook.”
Roman Musatkin
,
Head of Product & Design
Swarmia

“We can use our documentation for prospects, not just customers. Finding a certain page in Google is just way easier with GitBook.”
Roman Musatkin
,
Head of Product & Design
Swarmia

“We can use our documentation for prospects, not just customers. Finding a certain page in Google is just way easier with GitBook.”
Roman Musatkin
,
Head of Product & Design
Swarmia
Accurate docs. Better answers.
Your docs are already feeding AI. Are users getting the right answers or the wrong ones?
Accurate docs. Better answers.
Your docs are already feeding AI. Are users getting the right answers or the wrong ones?
Accurate docs. Better answers.
Your docs are already feeding AI. Are users getting the right answers or the wrong ones?
Product
Create & Publish
Solutions
Resources
© 2026 Copyright GitBook INC.
440 N Barranca Ave #7171, Covina, CA 91723, USA. EIN: 320502699
Get an AI summary

The State of Docs Report 2026
State of Docs brings together insights from documentation experts from across the industry

Product
Create & Publish
Solutions
Resources
© 2026 Copyright GitBook INC.
440 N Barranca Ave #7171, Covina, CA 91723, USA. EIN: 320502699
Get an AI summary
The State of Docs Report 2026
State of Docs brings together insights from documentation experts from across the industry

Product
Create & Publish
Solutions
Resources
© 2026 Copyright GitBook INC.
440 N Barranca Ave #7171, Covina, CA 91723, USA. EIN: 320502699
Get an AI summary
The State of Docs Report 2026
State of Docs brings together insights from documentation experts from across the industry
