window.PSquaredChat object.
Initialization
The widget auto-initializes from the script tag, but you can also initialize manually:Widget instance
Access the active widget instance:Destroying the widget
Remove the widget from the page:Configuration options
| Option | Type | Description |
|---|---|---|
agentId | string | Your agent’s unique identifier |
theme | string | light, dark, or auto (follows system preference) |
primaryColor | string | Hex color for the widget theme |
position | string | bottom-left or bottom-right |
uiLang | string | en, de, or multi (auto-detect) |
buttonIcon | string | Preset icon or custom with buttonIconUrl |
buttonIconUrl | string | URL for a custom button icon |
buttonAnimation | string | Trigger button animation style |
showOnPages | string[] | URL patterns where the widget should appear |
hideOnPages | string[] | URL patterns where the widget should be hidden |