Click-to-Call
Click-to-Call
Click-to-Call
SignalWire Click-to-Call (C2C) is an embeddable script that adds real-time voice communication functionality directly to your website with minimal setup. With just a few lines of code, you can embed SignalWire’s calling capabilities inside an HTML page, allowing your website visitors to initiate voice calls directly from your web pages without requiring any additional software or setup.
Click-to-Call provides a simple way to embed voice communication on your website. If you need more advanced customization or features, the C2C widget uses the SignalWire Client SDK. You can leverage this SDK directly to build more sophisticated communication applications with additional control and functionality.
The C2C embeddable script requires:
Start by creating a widget in your SignalWire Dashboard:
The copied script will look similar to this (but with your unique API key):
Before adding the script to your website, you need to add two HTML elements where the call button and interface will appear. Without these elements, the button and interface may appear in unintended locations, or not at all.
These elements can be positioned anywhere in your HTML based on where you want the button and call interface to appear on your page.
If you prefer to use existing elements on your page instead of creating new ones, you can modify the script to target those elements in the next step.
Simply note the IDs of your existing elements and update the buttonParentSelector and callParentSelector parameters accordingly.
See the Technical Reference for more details on these and other configurable selectors.
With your container elements in place, you’re ready to add the Click-to-Call script to your website:
Open your website’s HTML file in your preferred editor
Choose the best location for the script:
<head> ensures the script loads early, making the button available as soon as possible</body> tag if you prefer to load scripts lastAdd the script you copied from the dashboard to your chosen location:
The script will automatically find your container elements and render the call button and interface in those locations.
If the button doesn’t appear or calls don’t connect, check: