Skip to content

CoreBoost v3.3.3

Choose a tag to compare

@github-actions github-actions released this 12 May 01:44
· 7 commits to main since this release

🐛 Fixed - Tag Manager Breaking Google Analytics & Third-Party Scripts

  • <script type='text/template'> wrapper replaced with <template> for delayed head/body/footer tags. The HTML spec treats every <script> element as raw text terminated by the first </script> string it encounters, regardless of the type attribute. This caused the CoreBoost delay wrapper to be prematurely closed by the first </script> present inside a stored snippet (e.g. a GA4 / GTM tag that contains its own </script>). All content after that closing tag was emitted as loose, malformed HTML — breaking Google Analytics and any other multi-tag tracking snippets. Replacing the wrapper with a <template> element resolves this because <template> content is parsed as real HTML (not raw text), so inner </script> tags do not terminate the container. <template> is valid in <head>, its content is inert until explicitly moved, and it is universally supported.
  • Inline delay script updated to read innerHTML from <template> elements. The three loadCoreBoostTags() content reads (headTags, bodyTags, footerTags) previously used .textContent || .innerText, which is the correct API for <script> raw text. <template> exposes its parsed document fragment via .innerHTML, so all three reads are updated accordingly.

Files Modified

  • includes/public/class-tag-manager.phpoutput_head_tags(), output_body_tags(), output_footer_tags() PHP wrappers; output_delay_script() JS content reads