You may be better looking at using the HTML / JavaScript Snippet widget instead in this case.
https://docs.mendix.com/appstore/widgets/html-javascript-snippet/
Good luck
We're preparing for React and in the documantiation we read 'HTML and JavaScript snippets are not supported in Mendix's React client.'
So we have to move to the HTML Element, I tried placing an <script>-tag inside a <div> but the <script>-tag is not allowed.
We can't use a nanoflow because the script has to run before a user is logged in...
Has anyone a suggestion?
I haven't tried it myself yet, but what if you whitelist the script tag in the advanced tab of the HTML widget?
{"ADD_TAGS":["script"]}