> 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: Introduction ## Article: Introduction ## Article Link: https://dev.wix.com/docs/api-reference/app-management/embedded-scripts/introduction.md ## Article Content: # About the Embedded Script API You can use the Embedded Script API to inject custom script tags to the head tag of a site. If you have custom keys or data, you can use dynamic parameters in your embedded script. You can also [listen to predefined Wix events](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/site-extensions/embedded-scripts/analyze-user-behavior-using-embedded-scripts.md#listen-to-predefined-wix-events), and [report and listen to custom events](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/site-extensions/embedded-scripts/analyze-user-behavior-using-embedded-scripts.md#report-and-listen-to-custom-events). ## Using dynamic parameters The embedded script can include dynamic parameters. For example: `` ## Before you begin - You must [authenticate as a Wix App](https://dev.wix.com/docs/rest/articles/getting-started/about-identities.md#wix-app). - If an app has more than one embedded script component, the relevant component ID must be passed for all calls. The component ID for each embedded script component is available as a query parameter in the embedded script's extension page in the app dashboard. - If an app only has one embedded script component, don't pass the component ID. - The keys in the custom parameters passed in this API must be identical to the keys defined in the app's embedded script component. Using any other keys results in a 400 error. - Dynamic parameters must: - Be strings. - Contain only alphanumeric characters (no special characters or spaces). - Be wrapped in double curly braces (`{{`). - Be enclosed in quotes (") to prevent code evaluation. - Be provided upon installation when calling [Embed Script](https://dev.wix.com/docs/rest/app-management/embedded-scripts/embed-script.md). ## Use cases - [Listen when a visitor adds an item to a cart](https://dev.wix.com/docs/rest/app-management/embedded-scripts/sample-flows.md). ## Troubleshooting The `MISMATCHED ANONYMOUS DEFINE() MODULES...` error is a common issue when working with AMD/UMD bundled scripts. The error occurs when an embedded script defines an anonymous module, either because it's bundled with AMD or it adds a script tag to the head containing an anonymous module. To resolve the issue, try the following: * **For the embedded script itself:** If the script is bundled with AMD/UMD, make sure that you declare only [named modules](https://requirejs.org/docs/api.html#modulename). * **For scripts loaded by the embed**: * **If you own the code:** If the scripts are bundled with AMD/UMD, make sure that you declare only [named modules](https://requirejs.org/docs/api.html#modulename). * **If you don't own the code:** Check if `requirejs` exists on the window. If it does, load the script via `requirejs` instead of adding the script to the ``. This approach is suboptimal and might still lead to race conditions and errors. For more information on this issue, see [RequireJS: Common Errors](https://requirejs.org/docs/errors.html#mismatch). @sdk_package_setup