> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: About Embedded Scripts

## Article: About Embedded Scripts

## Article Link: https://dev.wix.com/docs/studio-two/code-your-site/build-a-custom-frontend/embedded-scripts/about-embedded-scripts.md

## Article Content:

# About Embedded Scripts

An [embedded script](https://dev.wix.com/docs/overview/extensions-framework/site-extensions/embedded-scripts.md) is an HTML or JavaScript fragment that loads in the site page head or body. In Studio Two you add one from the **Code** tab through the **Wix Extension Builder**, so the script is part of the site project.

For when to use an embedded script, script types and consent, dynamic parameters, and how embedding works on other development paths, see [Embedded Scripts](https://dev.wix.com/docs/overview/extensions-framework/site-extensions/embedded-scripts.md).

## Anatomy of an embedded script

An embedded script in a Studio Two project is a configuration file and the HTML fragment that gets injected:

- The **HTML file** is the fragment injected into the page.
- The **configuration file** declares the script's name, placement, script type, and path to the HTML file. For the full set of fields, see [Embedded Script Extension Files and Code](https://dev.wix.com/docs/site-extensions/embedded-scripts/embedded-script-extension-files-and-code.md).

The generated folder also includes `logger.ts`, a small module the generated HTML loads. You can replace that module, or remove the script tag that loads it.

You generate the files first, then edit the HTML. For that workflow end to end, see [Build an Embedded Script in Studio Two](https://dev.wix.com/docs/studio-two/code-your-site/build-a-custom-frontend/embedded-scripts/build-an-embedded-script-in-studio-two.md).

## How embedded scripts are used

- You add the script from the **Code** tab through the **Wix Extension Builder**, which puts its files in your site project and registers it.
- You set a placement of **Head**, **Body Start**, or **Body End**, and a script type that controls cookie consent.
- The fragment loads at that placement only after you call [Embed Script](https://dev.wix.com/docs/api-reference/app-management/embedded-scripts/embed-script.md) for your site, for example from a button on a dashboard page. Publishing the site alone doesn't load it. See [Build an Embedded Script in Studio Two](https://dev.wix.com/docs/studio-two/code-your-site/build-a-custom-frontend/embedded-scripts/build-an-embedded-script-in-studio-two.md).

## See also

- [Add an Embedded Script Extension in Studio Two](https://dev.wix.com/docs/studio-two/code-your-site/build-a-custom-frontend/embedded-scripts/add-an-embedded-script-extension.md)
- [Build an Embedded Script in Studio Two](https://dev.wix.com/docs/studio-two/code-your-site/build-a-custom-frontend/embedded-scripts/build-an-embedded-script-in-studio-two.md)
- [Embedded Scripts](https://dev.wix.com/docs/overview/extensions-framework/site-extensions/embedded-scripts.md)
- [Embedded Script Extension Files and Code](https://dev.wix.com/docs/site-extensions/embedded-scripts/embedded-script-extension-files-and-code.md)
- [About Custom Code](https://dev.wix.com/docs/overview/site-features-tools/about-custom-code.md): Paste a snippet from the site dashboard instead of adding it to the site project.