Recommended: use a “Header & Footer Scripts” module. Avoid placing code in a block region that does not render in
<head>
.Where to add
- Module path: Configuration → System → Header and Footer → paste into Header.
- Theme path (developer): in your theme’s
html.html.twig
, paste before</head>
.
Pluro script (copy & paste)
<script type="text/javascript">(function(){var e=document.createElement('script');e.async=true;e.defer=true;e.setAttribute("type","text/javascript");e.setAttribute("src","https://my.pluro.ai/unitoolbar.js?lang=en");document.getElementsByTagName("head")[0].appendChild(e);})();</script>
Steps
- Paste the script via module or in
html.html.twig
(before</head>
). - Clear caches: Configuration → Development → Performance → Clear all caches (or
drush cr
).
Verify
- View Source → script appears inside
<head>
. - Network →
unitoolbar.js
returns 200.
Troubleshooting
- Blocks placed in header regions do not inject into
<head>
— use module or Twig. - CSP/security policies: allow
my.pluro.ai
.