Inserting script into header section of embedded retool app

We're trying to use Freshpaint.io for event tracking, such as user clicks, page views, etc.

I was able to load the JS into a custom component and get page view to work (showing up as custom-components.html), but that's pretty minimal data.

I understand that JS is typically run in an external sandbox environment -- are there any workarounds to be able to use this type of event tracking?