wix-cli-embedded-script

Creates embedded script extensions that inject HTML and JavaScript into Wix sites.

Updated Feb 21, 2026
One-click install
npx skills add https://github.com/ESSSoWhat/live-translate-realtime-dubbing --skill wix-cli-embedded-script-esssowhat
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wix-cli-embedded-script
Source: https://github.com/ESSSoWhat/live-translate-realtime-dubbing/tree/main/wix-app/np/.agents/skills/wix-cli-embedded-script
Command: npx skills add https://github.com/ESSSoWhat/live-translate-realtime-dubbing --skill wix-cli-embedded-script-esssowhat

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding tracking pixels, analytics, chat widgets, popups, or other third-party JavaScript to Wix sites requires correctly structured embedded script extensions with consent typing, placement rules, and dashboard configuration, which is error-prone to set up manually. ## Core Features & Use Cases - Embedded Script Generation: Produces the embedded.html and extensions.ts files with correct script type (ESSENTIAL, FUNCTIONAL, ANALYTICS, ADVERTISING), placement (HEAD, BODY_START, BODY_END), and a unique UUID. - Dashboard Configuration Pages: Guides creation of the required companion dashboard page using the embeddedScripts API from @wix/app-management so site owners can set parameters. - Template Variable Patterns: Enforces the data-attribute pattern for passing {{parameterKey}} values into JavaScript with proper type conversion. - Use Case: When asked to add Google Analytics or a coupon popup to a Wix site, the Skill generates the full extension pair, registers it in src/extensions.ts, and reminds the developer to enable the SCOPE.DC-APPS.MANAGE-EMBEDDED-SCRIPTS permission. ## Quick Start Ask the assistant to add a Google Analytics tracking script to your Wix CLI app and it will scaffold the embedded script extension and its dashboard settings page.

Frequently Asked Questions about wix-cli-embedded-script

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Google Analytics or a tracking pixel to a Wix site with Wix CLI?

Create an embedded script extension with an embedded.html file containing the tracking code and an extensions.ts file registering it with extensions.embeddedScript(). Set scriptType to ANALYTICS and placement to HEAD, then expose the tracking ID as a dashboard-configured parameter.

How do I pass dynamic parameters to a Wix embedded script?

Store parameter values in data attributes on a configuration element using {{parameterKey}} template syntax, then read them in JavaScript with getAttribute() or the dataset property. Parameters are set by site owners through a dashboard page using the embeddedScripts API from @wix/app-management.

What script type and placement should a Wix embedded script use?

Choose from ESSENTIAL, FUNCTIONAL, ANALYTICS, or ADVERTISING, picking the most restrictive type when multiple apply. Analytics scripts go in HEAD, advertising pixels in BODY_END, and critical functionality in HEAD or BODY_START.

Why is my Wix embedded script not appearing on the site?

Common causes are missing registration in the main src/extensions.ts file, a missing extensions.ts for the dashboard page, or the SCOPE.DC-APPS.MANAGE-EMBEDDED-SCRIPTS permission not being enabled in the Wix Dev Center. All three steps are required for deployment.

Why does my embedded script fail with a return statement error?

Rollup, used by the Astro-based Wix CLI build, does not allow return statements at module scope. Use throw new Error() for early exits at module scope and wrap the main logic in a named function where return is valid.