Custom Widget Code

You can configure most of the settings in the Novocall dashboard but sometimes that is not enough. 


On top of the settings in the dashboard, we provide some custom javascript methods that could be used to 


get your desired results.



Open Widget Button

You can call the javascript method, novocallMaximizeWidget(), to open the widget.

To prefill a callback number when the widget is open you can add the number parameter in the j


avascript method. novocallMaximizeWidget("+12015550123");

Close Widget Button

You can call the javascript method, novocallMinimizeWidget(), to close the widget.

Hide Widget Button

You can call the javascript method novocallHideButton() to hide the Novocall widget.

However, if this method is called before the Novocall widget javascript code is fully loaded it will not work. 

This could still be achieved by using the javascript "_novocall" variable.

window._novocall = window._novocall || [];
window._novocall.push(['method', 'novocallHideButton']); 

The code should be inserted above the Novocall widget script as shown below.

<!--Start of Novocall App Script--> 
<script type='text/javascript'> 
window._novocall = window._novocall || [];
window._novocall.push(['method', 'novocallHideButton']);

(function(){var d=document,h=d.getElementsByTagName('head')[0],s= d.createElement('script');s.type='text/javascript';s.async=!0; s.src='https://call.novocall.co/v1/widgets?id=XXXXXXXXXXX'; h.appendChild(s)}())  
</script> 
<!--End of Novocall App Script-->


Redirect to another page after Lead submission

Novocall provides a default success page after a customer has submitted a lead (Call, Message, Schedule).

 Alternatively, you can redirect to another page by implementing a small trick. You can achieve this by using our 

callback methods novocallCallSuccess, novocallMessageSuccess, novocallScheduleSuccess.

window.novocallCallSuccess = function() { 
  window.location.href = "http://www.novocall.co"; 
}

window.novocallScheduleSuccess = function() { 
  window.location.href = "http://www.novocall.co"; 
}

window.novocallMessageSuccess = function() { 
  window.location.href = "http://www.novocall.co"; 
}

* Replace "http://www.novocall.co" with your own URL

Preload the Widget content

If you feel that the widget is taking too long to load the content you can preload the widget content. 

This is done with the code below.

window._novocall = window._novocall || [];
window._novocall.push(['method', 'novocallPreloadWidget']); 

The code should be inserted above the Novocall widget script as shown below.

<!--Start of Novocall App Script--> 
<script type='text/javascript'> 
window._novocall = window._novocall || [];
window._novocall.push(['method', 'novocallPreloadWidget']); 

(function(){var d=document,h=d.getElementsByTagName('head')[0],s= d.createElement('script');s.type='text/javascript';s.async=!0; s.src='https://call.novocall.co/v1/widgets?id=XXXXXXXXXXX'; h.appendChild(s)}()) 
</script> 
<!--End of Novocall App Script-->

* Define "document._novoinputs" after the Novocall script


* This may slow down the load speed of your website



Send Custom Data

You can pass custom data by defining the "_novoinputs" javascript variable. 


The data will be passed to the dashboard and webhooks when a request is submitted.


window._novoinputs = window._novoinputs || [];
window._novoinputs.push(['user_id', '123456']);

The code should be inserted above the Novocall widget script as shown below.



<!--Start of Novocall App Script--> 
<script type='text/javascript'> 
window._novoinputs = window._novoinputs || [];
window._novoinputs.push(['user_id', '123456']);

(function(){var d=document,h=d.getElementsByTagName('head')[0],s= d.createElement('script');s.type='text/javascript';s.async=!0; s.src='https://call.novocall.co/v1/widgets?id=XXXXXXXXXXX'; h.appendChild(s)}()) 
</script> 
<!--End of Novocall App Script-->

* Define "document._novoinputs" before the Novocall script

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.