APIs & Integrations

CDP2023
Contributor

Hubspot Forms

SOLVE

Hi!
I was working with Hubspot forms (more specifically embedding it into my website) and had a few queries. When I have created a hubspot form, it gives me a embed code, lets say this

 

 

 

<script charset="utf-8" type="text/javascript" src="//js-eu1.hsforms.net/forms/embed/v2.js"></script>
<script>
hbspt.forms.create({
region: "eu1",
portalId: "143587670",
formId: "64549387-8218-5d08-a5b5-2d3dd954dc9f"
});
</script>

 

 

 

So

  1. Do I need to always add 

 

<script charset="utf-8" type="text/javascript" src="//js-eu1.hsforms.net/forms/embed/v2.js"></script>​

this when using hubspot form?

 

  • What if I dont have the Hubspot tracking code installed but instead directly have this form embed into my website what will be the consequences?

I am actually confused, if we have the hubspot tracking script already installed, why do we need add separately (

<script charset="utf-8" type="text/javascript" src="//js-eu1.hsforms.net/forms/embed/v2.js"></script>) this script before adding the hubspot form. What is its use? Or How does this whole system work?

)

0 Upvotes
1 Accepted solution
SteveHTM
Solution
Key Advisor | Partner
Key Advisor | Partner

Hubspot Forms

SOLVE

@CDP2023 - I try a quick answer here, but others in the community may want to give more specific advice.

 

Both parts of that embed script fragment will be required on any page where you want to embed the HubSpot form. The initial "import" fragment makes the form create Javascript call available for use on the page.

This mechanism does not rely in tracking code being installed - but of course this is always best practice to enable reporting, cookie banner management, etc. for your online brand footprint.

 

And, as always, watch out fror how you want to apply form styling on your site page. This can be done via the form setup or (using the raw form option) entirely by your own site CSS.

 

Hope this works out!

 

Steve

Steve Christian

HTM Solutions

https://info.htmsolutions.biz/meetings/stevec2

mobilePhone
+1 6195183009
emailAddress
stevec@htmsolutions.biz
website
www.htmsolutions.biz
address
San Diego, CA
Create Your Own Free Signature

View solution in original post

0 Upvotes
1 Reply 1
SteveHTM
Solution
Key Advisor | Partner
Key Advisor | Partner

Hubspot Forms

SOLVE

@CDP2023 - I try a quick answer here, but others in the community may want to give more specific advice.

 

Both parts of that embed script fragment will be required on any page where you want to embed the HubSpot form. The initial "import" fragment makes the form create Javascript call available for use on the page.

This mechanism does not rely in tracking code being installed - but of course this is always best practice to enable reporting, cookie banner management, etc. for your online brand footprint.

 

And, as always, watch out fror how you want to apply form styling on your site page. This can be done via the form setup or (using the raw form option) entirely by your own site CSS.

 

Hope this works out!

 

Steve

Steve Christian

HTM Solutions

https://info.htmsolutions.biz/meetings/stevec2

mobilePhone
+1 6195183009
emailAddress
stevec@htmsolutions.biz
website
www.htmsolutions.biz
address
San Diego, CA
Create Your Own Free Signature
0 Upvotes