Initiating pop-up with a function
Triggering Speed-to-Lead™ pop-up when a link or button is clicked
This article is for your website support specialist. It will allow you to make a link/button which, when clicked, triggers the Convolo Leads 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 addapt it to your own website code.
- For buttons:
<button>OPEN</button> // add an attribute <button onclick="window.leadCM.open();">OPEN</button>
- For links:
- Adding it to one particular link tag:
- It's also possible to assign to existing element using JS snippet with addEventListener method:
- To assign popup to links <a href="#callback" ..>, it is possible to use a snippet as well:
<a href = "#" onclick = "window.leadCM.open();" > OPEN < /a>
document.querySelector("#myButtonId") .addEventListener("click", function() { if (window.leadCM.open) window.leadCM.open(); });
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 support@convolo.ai
Did this answer your question?
😞
😐
🤩
Last updated on July 20, 2022