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.
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 javascript method. novocallMaximizeWidget("+12015550123");
You can call the javascript method, novocallMinimizeWidget(), to close the widget.
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-->
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
Insert your own analytics tracking event using the custom success callback.
window.novocallCallSuccess = function() {
# your own tracking code
}
window.novocallScheduleSuccess = function() {
# your own tracking code
}
window.novocallMessageSuccess = function() {
# your own tracking code
# Example
gtag('event', 'aaa', {
'event_category' : 'bbb',
'event_label' : 'ccc'
});
}
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
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(['userid', '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(['userid', '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
Customise the design, working hours, call representatives and make the Novocall widget your own.