wix-cli-embedded-script

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

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/nirganon/nir-beauty --skill wix-cli-embedded-script-nirganon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wix-cli-embedded-script
Source: https://github.com/nirganon/nir-beauty/tree/main/.agents/skills/wix-cli-embedded-script
Command: npx skills add https://github.com/nirganon/nir-beauty --skill wix-cli-embedded-script-nirganon

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @wix/app-management, @wix/astro.

What problem does it solve? Adding tracking pixels, third-party integrations, popups, or custom 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: Creates embedded.html and extensions.ts files with correct script type (ESSENTIAL, FUNCTIONAL, ANALYTICS, ADVERTISING) and placement (HEAD, BODY_START, BODY_END). - Dashboard Configuration Pages: Builds companion dashboard pages using the embeddedScripts API from @wix/app-management so site owners can configure parameters. - Template Variable Patterns: Implements {{parameterKey}} template variables passed through data attributes with type-safe JavaScript access. - Use Case: Add a Google Analytics tracking script typed as ANALYTICS in the HEAD, or a coupon popup typed as FUNCTIONAL at BODY_END with configurable cart-value thresholds. ## Quick Start Ask the assistant to add a Google Analytics tracking script or a coupon popup to your Wix CLI app and it will scaffold the embedded script and dashboard configuration 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?

Create an embedded script extension with scriptType ANALYTICS and placement HEAD, then register it in src/extensions.ts with a unique UUID. The tracking ID is passed as a template variable configured through a companion dashboard page.

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 via getAttribute() or the dataset property. Parameters are set by site owners through the dashboard page using the embeddedScripts API.

What script type should I choose for a Wix embedded script?

Choose from ESSENTIAL, FUNCTIONAL, ANALYTICS, or ADVERTISING based on the script's purpose. If a script fits multiple types, select the most restrictive option closest to ADVERTISING, such as typing a combined analytics-and-ads pixel as ADVERTISING.

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

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

Can I use return statements at the top level of an embedded script?

No, Rollup does not allow return statements at module scope. Use throw new Error() for early exits at module scope and wrap your main logic in a named function where return is valid.