Hi, I'm trying to inject in the <head> tag of the document a third party script that creates a banner and a button to handle GDPR cookie management (Iubenda is the name of the service, but it acts exactly like Cookiebot or any other tool to manage accessibility etc.).
<script type="text/javascript" src="https://embeds.iubenda.com/widgets/XXXjs"></script>
When adding the script tag to the head of the site, it works on first page load (the cookie banner pops up, and also the little widget to edit the consent is showing), but after navigating to other pages with view transitions (ClientRouter) all the html elements disappear, like the script is not re-run.
I tried with data-astro-rerun, is:inline and also injecting the whole inline script with an astro page load listener around it, with no luck.
I confirm that disabling ClientRouter and returning to standard page navigation "solves" the problem, and all the injected widgets like the banner and the edit consent little button are shouwing correctly across all pages.
Is there anyone that could help?
I wonder if this problem would also occur with any other third party script that injects something into the DOM.
Many thanks!