# Insert HTML into HubSpot Site \<head\> Using API

**URL:** <https://community.hubspot.com/t/insert-html-into-hubspot-site-head-using-api/135618>\
**Category:** APIs & Integrations\
**Tags:** free\
**Created:** [July 3, 2025, 8:10am UTC](https://community.hubspot.com/t/insert-html-into-hubspot-site-head-using-api/135618 "2025-07-03T08:10:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MMervin](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@MMervin](https://community.hubspot.com/u/MMervin)\
**Post date:** [July 3, 2025, 8:10am UTC](https://community.hubspot.com/t/insert-html-into-hubspot-site-head-using-api/135618/1 "2025-07-03T08:10:40Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![BrandonWoodruff](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/brandonwoodruff/32/61045_2.png) [@BrandonWoodruff](https://community.hubspot.com/u/BrandonWoodruff)\
**Post date:** [August 27, 2025, 1:25pm UTC](https://community.hubspot.com/t/insert-html-into-hubspot-site-head-using-api/135618/2 "2025-08-27T13:25:33Z")

</div>

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.**

| ![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/d/3/d314478a36473977ed45320812b9331d25e0d3c4.jpeg) | **[Brandon Woodruff](https://www.linkedin.com/in/brandon-woody-woodruff/)**  
Senior Software Developer @ [Pearagon](https://www.pearagon.com/)Still have questions? Reach out at [brandon@pearagon.com](mailto:brandon@pearagon.com) ![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/d/c/dcad77e6cf96145dd117147531ae4423b9b5cd91.png) |

* * *
