You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm seeing a lot of comments in the scripts in my website's source code:
// Runs synchronously before any Google tag loads. It has to be inline and it has to read the
// cookie in JS rather than PHP, otherwise a statically cached page bakes in one visitor's consent.
// Consent defaults can only be set once, so a second copy on the page must not push again
// Runs synchronously before any Google tag loads. It has to be inline and it has to read the
// cookie in JS rather than PHP, otherwise a statically cached page bakes in one visitor's consent.
// There's some string sub done here before being loaded. It's meant to be odd
// Consent itself is handled in alt-cookies-consent-default.js, which runs before any tag
// loads rather than waiting for this event. All that's left to do here is show the toast
// to anyone who hasn't chosen yet.
I understand they are useful for development. Perhaps all the scripts can be bundled and minimised with Vite, which would automatically remove all comments?
Activity
Alt-Charlie commentedon Jul 29, 2026
Hi @stuartcusackie, I assume this is in the pre-release candidate version? If so, we will strip these out ahead of the final release.
stuartcusackie commentedon Jul 29, 2026
It's also occuring on v1.2.7. This is the source code of a production website: