How to maximize the widget when a website loads

Using the JavaScript API, you can make the widget maximize when your website loads. In this article, we’ll show you how to set this up by combining the onBeforeLoad callback function and the maximize(); action from the JavaScript API Documentation.

Please note, you can only use the JavaScript API functions if you embedded the Widget Code to install the software. If you used a plugin or app to add the widget to your content management system, you'll be unable to make use of the JavaScript API functions. 

Adding the JavaScript below to the embedded Widget Code will force the widget to maximize, allowing your visitors to see the full chat widget on your site as the page loads.

Just add the center portion of the code below (lines 4-7) to your widget code before the end of the script as shown.

To find your Widget Code, see this article: Where can I find the property and widget IDs?

For more ways to make changes to how the widget looks and behaves, check out our other JavaScript API articles in the Help Center.

In case you encounter any issues, our support team is always available. Schedule a call so we can better assist you.

Was this article helpful?

44 out of 69 liked this article

Still need help? Message Us