> For the complete documentation index, see [llms.txt](https://docs.humblytics.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.humblytics.com/how-to-track-custom-form-submissions/hubspot-forms/custom-self-hosted-how-to-track-hubspot-form-submissions.md).

# Custom/Self-Hosted – How to Track HubSpot Form Submissions

Embed a HubSpot form on any custom or self-hosted site and Humblytics tracks submissions automatically.

{% hint style="info" %}
**You need:** the Humblytics script in the `<head>` of your site. Already seeing page views in Humblytics? You're set.
{% endhint %}

## 1. Embed your HubSpot form

1. In HubSpot, open your form and click **Share → Embed code**, then copy it.
2. Paste it into your page's HTML or template where the form should appear.
3. If the code contains `hs-form-frame`, also paste the [snippet for newer HubSpot forms](/how-to-track-custom-form-submissions/hubspot-forms.md#which-hubspot-embed-do-i-have) right below it. Otherwise, you're done.
4. Deploy your site.

**Already using `onFormSubmit` to call Humblytics?** Remove that call if you use the standard `hbspt.forms.create` embed. It's now tracked automatically, and keeping both counts each submission twice.

## 2. Test it

1. Open the live page in a private window and submit a test entry.
2. In Humblytics, go to **Observe → Analytics → Forms** and look for **Hubspot Form** (or the name you chose) within a minute or two.

**Not showing?**

* Check which embed you have. Newer HubSpot forms (`hs-form-frame`) need the snippet.
* If your site uses a Content Security Policy, allow HubSpot's form domains (`js.hsforms.net`, `forms.hsforms.com`) and `app.humblytics.com`.
