Hi! I need help with including a form on an external page.
I was told that simply embedding a form will not work for 2 reasons.
- it will look ugly, cannot blend in properly with the website’s current look
- if the Hubspot script is blocked by the user’s consent choice (declining cookies), then the form will not appear.
I am very new to this second one, I seem to recall not having this issue at a previous company.
Currently, the solution was to use Hubspot’s API and get the form fill action into the CRM via that, but I guess this would also mean that lots of additional data like session source is lost, and we will have simply a lot of contacts from offline sources.
I feel the truth is somewhere between. Does someone know?
Hey @DoraM the HubSpot embed code is the supported, and suggested way of embedding your form on an external site. If you wish you can even enable the “set as raw html” feature, which will remove any HubSpot styling and allow you to fully customise the form’s styling from your site’s stylesheet. There’s a great guide covering all of this here:
Declining cookies should not affect the form loading, the form doesn’t load any cookies at all, the HubSpot tracking script does (which is a seperate script).
It’s possible if you have a third party cookie blocking app, it may block the form’s script in error, but you’ll need to set your cookie blocking app not to block this then.
Javascript is the most common way any external systems will embed themselves on your website (third party analytics, pop-ups, cookie banners, forms etc) they’ll all use javascript, if the visitor decides to block javascript loading or has an extension that does this, yes it will stop the form from loading, but it will also stop almost every system on your site loading as javascript is the main way to add “functiontlity” to your website page.
Regarding the looks, that’s completely down to yourself, you can use a HubSpot form theme, which I personally don’t think look ugly and are pretty standard so don’t usually stand out much, or you can fully style it yourself if you don’t like this style. So that’s not an issue.
Regarding the second point, cookies won’t affect the form loading, it’s possible someone blocking javascript will affect it, but if this is your concern then you should remove basically every system from your site. It’s just a consideration you have to make when adding functionality to your website. Personally I would say the amount of people who will have fully blocked javascript is very negligible.
To achieve this, you can use HubSpot’s Embed Code functionality to generate the code for your form and then customize it as needed. Here’s a general outline of the process refer to this link metioned below:
Hope this will helps you out. Please mark it as Solution Accepted & Upvote to help other Community member.
Thanks!