I am developing an app in HubSpot. Once a HubSpot merchant add our app to their site, I want to insert some HTML code, including script tags, into the head section across their entire website. How can I achieve this using the HubSpot API?
Hello,
At this time, HubSpot’s APIs don’t provide a way to programmatically update the Site header HTML (the <head> section).
To make sure you get the right outcome, it’s helpful to clarify a few things:
- Is your site fully hosted on HubSpot CMS, or are you embedding HubSpot forms/tracking into an external site?
- Do you need the code across all pages or just certain HubSpot landing pages?
- What type of code are you looking to add (analytics tracking, chatbot, verification tag, etc.)?
Let me know if this helps, or if you have any other questions!
Was I able to help answer your question? Help the community by marking it as a solution.
| Brandon Woodruff Senior Software Developer @ PearagonStill have questions? Reach out at brandon@pearagon.com ![]() |

