Integration of external scripts with fixed container IDs in Wix Live

Hi,

sorry for the late reply! I’ve tried multiple approaches and want to summarize clearly using dummy/example data (no sensitive info).

  1. Static div requirement
    The script requires a fixed div in the HTML source, e.g.:
<div id="example-container"></div>

The script cannot use a different ID and only works on our domain, so JSFiddle tests aren’t useful.

  1. What I’ve tried
  • Custom elements / custom code in Wix: creates div dynamically but cannot place it in a specific section/box; shows only a white container.

  • setTimeout hacks: work in isolated HTML tests, not in Wix due to ID rewriting.

  • Embedding scripts in boxes/sections: Wix resizes or resets the div, breaking initialization.

  1. Observations
  • Your test code shows the div only top-left, not where I need it.

  • Wix old editor rewrites IDs like comp-mf9h5875, so fixed IDs aren’t preserved.

I’ve tried everything I could think of, but the combination of custom elements + Wix’s ID rewriting + domain restrictions makes it impossible for me to get it working alone.

I’ve also sent you an email. I would really appreciate your personal guidance on how to get this working in the old Wix editor.

Thanks a lot!