HTML w/ Script : Read URL Parameter

Hi there !

I’ve got an script inside an HTML component…
Here is my script

  <div id="elements"></div>
  <script src="https://cdn.eduzzcddn.com/sun/bridge/bridge.js"></script>
  <script>
    (function () {
      const load = function () {
          window.Eduzz.Checkout.init({
            contentId: 14768d13,
            target: "elements",
            errorCover: false
          });
      }
      if (document.readyState === 'complete') {
          load();
          return;
      }
      window.addEventListener('load', load);
    })();
  </script>

It only works when I set “display as iframe”…
image

The problem, it does no reads url parameter, such as
https://www.site.com/teste?cupom=N15A7

Is there a way to put this script to work, reading URL parameters (cupom)?
Is Html Component the way to go?

Tks in advance!

Solution just done !!!

  1. Put Script at page level…
    image

  2. Keep HTML where you want
    image

And that’s it!

This topic was automatically closed after 70 days. New replies are no longer allowed.