> 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`).
> - 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.
- After you publish the site, the fragment loads at that placement on the published site.

## 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)