956 B
956 B
Script Editor Basics (2025.23)
Source: help-portal-2560f7cb6c2745dab84d2e12652a12b4.md (Write Scripts in Script Editor).
Purpose
Write JavaScript-based scripts on widgets/pages/popups to drive interactivity in analytic applications or optimized stories.
Open the editor
- In Outline, hover widget/page/popup → Edit Scripts (gear).
- If multiple events exist, choose the event (for example,
onSelect,onInitialization). - Editor opens in new tab titled
<Widget> - <Event>.
Authoring pattern
<ComponentVariable>.<function>(<arguments>);
Notes
- View available objects/functions in Analytics Designer or Optimized Story Experience API references.
- Edit Scripts also available via widget More Actions menu.
- Related indicator (gear) shows when scripts exist; run in view mode to test.
- See also: script variables (
script-variables.md), script objects (script-objects.md), keyboard shortcuts (Help Portal).