We are trying to install Termly.com and their custom blocking map script needs to be placed at the beginning of the head section in order to work properly. I have tried adding the script to the following places:
Page HTML Header
Settings → SEO / metatags → Scripts/meta tags in header
Unfortunately, the added script is always displayed at the end of the section.
Any ideas or workarounds on how to deal with this?
We use Termly too but not the blocker since we do not allow trackers of any type.
To answer: I don’t think you can do anything about this. The section is completely controlled by the bubble page generation and everything we have access to falls way down the DOM node load sequence, as you have found out.
I have attempted to place JS in the SEO section to play with the DOM to force JS injection higher up in the DOM but it does not work and really why should it – a good thing actually. I think Bubble would have to open up a point to allow code to be placed earlier in the load sequence but this is not likely nor advisable.
If others have found a solution I am always excited to learn.
John
Yeah you’re right about this @jgellis. Bubble is a wrapper on your page and so all the stuff like run.js needs to load first or else… well there’s no bubble page. So, Termly is being naive, but unless there’s some other route for validation, the OP is hosed. (File bug report/RFE with Termly.)