Add custom code to a storefront page
Enable custom code, add HTML, CSS, or JavaScript in a sandboxed section, test it, and publish it safely.
Plan availability: Custom-code sections are available on Basic and Pro. On Free, saved code stays in the page record but does not run on the storefront. The section can stay or be removed while other page sections remain editable, but its code cannot be added or changed until Basic or Pro returns.
Enable custom code
- Open Website Builder → Settings.
- Turn on Allow custom code.
- Save the setting.
Add a custom-code section
- Open the page in Website Builder.
- Select Add section → Custom code.
- Enter the HTML, CSS, or JavaScript needed by the section.
- Preview the result and check desktop and mobile widths.
- Publish only after testing the storefront.
Security and size limits
Custom code runs inside a sandboxed iframe, isolated from the rest of the store. It cannot use same-origin access to read StoreMink pages, customer sessions, or checkout data. Each HTML, CSS, or JavaScript string is limited to 64 KB.
Know the limitations
Custom code is best for an isolated visual or interactive block. A third-party script that expects full control of the page, cookies, checkout, or the top-level window may not work. Turning the store-wide setting off prevents custom-code sections from being published.
Was this article helpful?