Hey team! Is there a way to adda <script>
tag to the document <head>
while using plasmic hosting?
Hey @bodacious_basilisk Currently in the same boat. There is no way at the moment, other than doing it with a code based plasmic implementation. I’m currently exploring a way on how to do that just for the script injection, and can get back to you once I learn more
This doesn’t literally add add a script to the head, but rather the body of the page but you can use the Embed HTML component to add custom JS to any page in the tag.
It only runs client side and only on that page. But you could wrap in in a site template that you have on every page.
It is actually best practice is to put JavaScript tags just before the closing tag rather than in the section of your HTML. The reason for this is that HTML loads from top to bottom. The head loads first, then the body, and then everything inside the body.
Let me know if you have any questions or need any more help.
@attainable_catshark thanks for that, however given your explanation of HTML loading top to the bottom is the exact reason why one would want the script to load in the HEAD before anything else is loaded on the page