Test your chat widget in production without showing it to all visitors.
The previewQueryParam option lets you deploy your widget script to production
but only show it when a specific URL parameter is present. This is perfect for:
Test the widget on your live site without affecting real users.
Let store owners preview the widget before enabling it globally.
Share preview links with select users before full launch.
Add the param to any page to debug widget issues.
Add previewQueryParam to your widget initialization:
When the ?preview=true parameter is missing, the widget simply doesn't load.
No DOM elements are created, no CSS is injected, and no API calls are made.
For CDN/script tag installations, add the data-preview-param attribute: