Last updated
Last updated
Gleen AI chat sdk can be installed in a website with iframe (like an embed). Here is the sample code for inserting in iframe
Do remember to replace gleen (as your company key) postfix in this https://gleen.ai/chat-iframe/gleen
You can also install gleen chat sdk with button similar to the experience of chat support.
Opening the chat widget from the button click
Chat sdk has a number of functions that can be configured to change the experience.
Following methods are exposed in the sdk
open - Opens the chat bubble. If it is already opened it will leave the chat sdk as it is on UI.
close - Closes the chat bubble. If it is already closed it will leave the chat sdk as it is on UI.
toggle - Closed the chat bubble if it is opened and vice - versa
Example code
Adding the ability to load the sdk only if it has scrolled some px
On page load you can set the sdk to not show the chat widget and only show it after user has scrolled some px
SDK has some properties that can be customize as per the need
styles can take the parameter
fontFamily
Please make sure your website has logic to load the font. sdk doesn't load any font. It will use in the style - whatever font has been passed.
Make sure to replace company with your company key. company key is the word before dashboard in the dashboard url e.g. If this is your dashboard url then company is gleen
Gleen's chat widget can either be installed into your pages multiple ways