JavaScript and Global Scripts in CMS Max

CMS Max Help Center / Templates

Place scripts at the narrowest correct scope and treat third-party JavaScript as code that affects security, privacy, performance, and reliability.

CMS Max supports named global scripts with active state and injection position, plus scoped scripts on supported pages and reusable theme sections.

JavaScript and Global Scripts in CMS Max CMS Max interface and guidance visual
CMS Max administration workspace. Available controls depend on the site, role, plan, theme, and installed plugins.

Place scripts at the narrowest correct scope and treat third-party JavaScript as code that affects security, privacy, performance, and reliability.

CMS Max supports named global scripts with active state and injection position, plus scoped scripts on supported pages and reusable theme sections.

Choose the correct scope

  • Page script: behavior used only by one page.
  • Theme-section script: behavior tied to elements inside one reusable header, footer, or section.
  • Global script: behavior required across the site, such as an approved analytics or consent integration.
  • Application integration: use a native plugin or supported configuration instead of duplicating provider code when available.

Add a global script

  1. 01
    Open Theme Configuration and JavaScript.
  2. 02
    Create a clear script name. Make ownership and purpose understandable to future administrators.
  3. 03
    Select the injection position. Use the provider or implementation requirement; do not assume every script belongs at the end of the body.
  4. 04
    Wrap valid JavaScript in script tags. Keep secrets and private API credentials out of browser code.
  5. 05
    Test consent, errors, network activity, performance, and duplicate loading.

Turn the guide into a verified website change.

CMS Max can help confirm scope, configuration, integration boundaries, and launch testing for the actual site.

Building Relationships with Web Developers and Marketing Agencies that want better results

The world's fastest and most SEO friendly website code.