In order for a Webchat Plugin to be loaded correctly, its source code needs to be loaded onto the site before the Webchat is initialized. When the Webchat starts up, it will load and register any previously loaded Plugins and do a simple
console.log to indicate that.
To add a Webchat Plugin to your embedded Website, just add a
script tag that loads it before the Webchat is being initialized.
<html> <body> <!-- rest of your website --> <script src="https://example.com/your-custom.webchat-plugin.js"></script> <script src="https://example.com/cognigy-webchat.js"></script> <script> cognigyWebchat.init('https://url.to/your-cognigy-endpoint-config'); </script> </body> </html>
For Cognigy-hosted Webchats (the ones directly accessible from the Endpoint configuration), there is an option to automatically load Webchat Plugins via a List defined in Cognigy UI.
You can find the "Webchat Plugins" section at the bottom of your Webchat configuration. By clicking
+, you can add a new Plugin URL.
When the hosted Webchat page is being loaded, it will load the additional Plugin before starting the Webchat.
Inserting wrong Plugin urls
When you add a Plugin URL that loads an incorrect or corrupted Plugin file, the Webchat may not start up correctly.