Answer
Why is my Wix custom code not working?
Wix custom code commonly fails when it is tested in the editor, added through an HTML iframe, limited to the wrong page, or used before the site is published on a connected domain. Add it in Settings → Custom Code, choose All pages, load it once, place it at Body-end and test the live domain.
Use dashboard Custom Code
Wix has two different code paths. The Embed HTML element displays content in an iframe on one area of a page. Settings → Custom Code adds a script to the site itself.
Check scope and duplicates
Choose All pages for a site-wide popup and Load code once. Remove older copies so two scripts do not compete or create repeated popups.
Check the domain and consent
Use the published connected domain. If your cookie banner categorises the script, test after the matching consent is given and keep its category accurate.