wix-cli-embedded-script

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

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/yaelbro/Shelf-Control --skill wix-cli-embedded-script-yaelbro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wix-cli-embedded-script
Source: https://github.com/yaelbro/Shelf-Control/tree/main/.agents/skills/wix-cli-embedded-script
Command: npx skills add https://github.com/yaelbro/Shelf-Control --skill wix-cli-embedded-script-yaelbro

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). - Dynamic Parameter Support: Implements template variables like {{apiKey}} passed from a companion dashboard configuration page using the embeddedScripts API from @wix/app-management. - Use Case: Add a Google Analytics tracking script typed as ANALYTICS in the HEAD, or build a coupon popup that reads {{couponCode}} and {{minimumCartValue}} parameters configured by the site owner in the dashboard. ## 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, extension registration, and 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?

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}} 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 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 the bottom of the list, such as ADVERTISING for a script with both analytics and marketing aspects.

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

Common causes include missing registration in the main src/extensions.ts file, a dashboard page lacking its own extensions.ts file, or the SCOPE.DC-APPS.MANAGE-EMBEDDED-SCRIPTS permission not being enabled in the Wix Dev Center.

Can I use return statements at the top level of a Wix 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.