HubSpot form embed script fails to display in OptinMonster campaign builder

I’m having trouble getting a HubSpot form to show up inside my OptinMonster campaign. The embed code works fine on regular web pages, but when I paste it into OptinMonster’s builder, nothing appears. I’m pretty new to working with embedded forms, so I might be doing something wrong. Has anyone else run into this issue? The form should display automatically but it’s just not showing up at all.

<div>
  <img src="placeholder-image.jpg"/>
  
  <!--[if lte IE 8]>
  <script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script>
  <![endif]-->
  <script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
  <script>
      hbspt.forms.create({
          portalId: '1234567',
          formId: 'abc123de-4f56-78gh-90ij-klmnopqr5678'
      });
  </script>
</div>

i had this problem too! try placing your script in the custom html section of optinmonster, it helps avoid those issues. i wasted time too before figuring that out. hope this helps!