This article is for your website support specialist. It will allow you to make a link/button which, when clicked, triggers the Brightcall Speed To Lead pop-up. The pop-up is the one that asks you to fill out the form (with the phone number and other relevant information) and promises a callback in X seconds.
The easiest way to do that is to use the API function window.leadCM.open(). It will trigger the pop-up to show on the screen. Below are basic instructions on how to do it. You should be able to adapt it to your own website code. The Brightcall widget must already be installed and loaded on the page.
For buttons:
<button>OPEN</button> // add an attribute
<button onclick="window.leadCM.open();">OPEN</button>
For links:
Adding it to one particular link tag:
<a href = "#" onclick = "window.leadCM.open();" > OPEN </a>
It's also possible to assign to existing element using JS snippet with addEventListener method:
document.querySelector("#myButtonId")
.addEventListener("click", function() {
if (window.leadCM.open) window.leadCM.open();
});To assign popup to links <a href="#callback" ..>, it is possible to use a snippet as well:
document.querySelectorAll('a[href="#callback"]')
.forEach(el => el.addEventListener("click", function() {
if (window.leadCM.open) window.leadCM.open();
}));
If you have any questions, please email us at [email protected]
