If you want your widget to be maximized on page load or after the visitor clicks on an image or text, you can do it by using the Freshchat.maximizeChat() function


If your widget is installed, then skip 1 & 2


  1. Login to your Freshchat account as an Owner or Manager

  2. Go to Settings -> Installation Snippet, Copy and paste the Installation Snippet before the last body tag in your website


Once you paste the script into your website, ensure you call Freshchat functions after the script loads onto your web page. 


These are some of the ways in which you can access Freshchat functions:


window.onload = function(){

//Freshchat functions

}



If you are using jquery,


$(window).load(function(){

//Freshchat functions

})



Or, if you’re using Onreadystatechange event,


document.onreadystatechange = function(){

if(document.readystate === ‘complete’){

//Freshchat functions

}

}


Here is how you call the Freshchat.maximizeChat() function


Maximize code.png