Creating a Script
Script Settings
Each script has settings you can configure:Enable / Disable
Toggle scripts on or off without deleting them. Disabled scripts won’t load on your site.Scope
Choose where your script runs:- Global: Runs on every page of your site
- Page-specific: Runs only on pages you select
Pages
When using page-specific scope, select which pages should load this script. You can use:- Exact paths:
/about,/contact - Wildcards:
/blog/*(all blog posts)
Component Selector
Only load the script when a specific element exists on the page:Load Order
Control when your script loads:- Head: Loads early, before page content
- Body Start: Loads at the beginning of the body
- Body End: Loads after all content (default, recommended)
Working with Scripts
The Editor
The code editor includes:- Syntax highlighting for JS and CSS
- Auto-completion
- Bracket matching
- Multiple themes (change in Settings)
- Keyboard shortcuts (
Cmd/Ctrl + Sto save)
Dependencies
If your script needs an external library (like GSAP or Swiper), add it as a dependency:- Click the Dependencies button
- Enter the CDN URL
- Choose if it’s a script or stylesheet
- Save
Save as Block
Found yourself copying this script to other sites? Click Save as Block to make it reusable across your team.Best Practices
Name scripts descriptively
Name scripts descriptively
Use names like “Header Scroll Effect” or “Form Validation” instead of “Script 1” or “New Script”.
One purpose per script
One purpose per script
Keep scripts focused. Instead of one giant script, create separate scripts for separate features. This makes debugging easier.
Use page targeting
Use page targeting
Don’t load scripts globally if they only run on certain pages. This improves performance.
Use component selectors
Use component selectors
If a script powers a specific component, use a component selector. The script won’t load on pages without that component.
Disable instead of delete
Disable instead of delete
Not sure if you need a script? Disable it first. You can always re-enable it later.