• Resolved nicmare

    (@nicmare)


    I have a hubspot script which creates an iframe and outputs a form. This won’t be blocked by default by embed privacy. How to handle this properly please? at the moment i place the code via html block in gutenberg

    <script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/embed/v2.js"></script>
    <script>
    hbspt.forms.create({
    portalId: "8732334",
    formId: "4ef65701-d3a9-4014-88cb-2a0f4f098352",
    region: "na1"
    });
    </script>
    • This topic was modified 2 weeks, 2 days ago by nicmare.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Matthias Kittsteiner

    (@kittmedia)

    Hi @nicmare,

    since blocking alone would work with a regular expression, activating would not, since the second script would be executed before the first one is even loaded and thus hbspt is not available. It would require a custom integration, that triggers the hbspt.forms.create() only after clicking on the overlay and after the embed script has been loaded.

    If experienced enough, you can give your first script an ID, then check via MutationObserver if the script with this ID exists and run the hbspt.forms.create() as soon as the script with this ID has been loaded (unload).

    This is a pretty manual approach, but the best I can give you currently, since it’s no real embed.

    Best regards,
    Matthias

    Thread Starter nicmare

    (@nicmare)

    alright – thanks for the in depth explanation. i will see if i can get this work by myself. but this gives me a pretty good starting point.

    Plugin Author Matthias Kittsteiner

    (@kittmedia)

    If you need further assistance, feel free to ask. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.