Hi all. We have a form we’re including via the Hubspot API from a self-hosted page. I’m receiving a javascript error “Uncaught ReferenceError: hbspt is not defined” when trying to display the form, see picture at Upload and share screenshots and images - print screen online | Snipboard.io. As a result, no form is created.
Some information:
- The page is found at Embedded Lending: Software Providers and Merchants. The form should be displayed at the bottom of the page, right before the footer.
- The code is:
<script charset=“utf-8” type=“text/javascript” src=“js.hsforms.net/forms/embed/v2.js”></script>
<script>
hbspt.forms.create({
region: “na1”,
portalId: “4139315”,
formId: “099ca015-dd21-4ea4-b08a-43bb6931c292”
});
</script>
- The page is from a WordPress site. The form only fails when the page is used anonymously. When logged into WordPress, the form displays fine.
- Hubspot support confirmed that the tracking code is firing as expected.
I have virtually no experience developing with Hubspot, so I’m hoping I just made a rookie error and this is easy to resolve. Any help is much appreciated!