An embedded script is an HTML or JavaScript fragment that loads in the site page head or body.
Follow the instructions below to:
Note: You can also ask Aria, Wix's AI assistant, to create and customize the extension.
To add an embedded script:
In the Studio Two editor, open the Code tab.
In the VS Code sidebar, open the Wix Extension Builder.

Under Create an Extension, choose Site, then Embedded Script.
Fill in the form:
My Script becomes the folder my-script.Click Generate.
You can find the new files under src/extensions/site/embedded-scripts/<script-folder>/. The extension is registered in your project's extensions.ts and listed under My Extensions. For what each file is for, see Embedded Script Extension Files and Code.
You can edit the generated files to match the script behavior you need. When you're happy with the script, move on to the next step.
For the full workflow, from the configuration file to dynamic parameters and a local script module, see Build an Embedded Script in Studio Two.
For example, to update the script content:
<script-folder>.html.console.log('Hello {{name}}'); with console.log('Hello world!');.When the script runs on the site, the browser console logs Hello world!.
To check the script on your site:
console.log output your script produces.If your script's content appears in the page HTML at the placement you configured, the extension is working.
When you're ready, click Publish in the Studio Two editor to ship the extension with your site.
Last updated: 2 November 2026