All Collections
Messenger
Customizing
Creating a Custom Launcher for Your Web2Chat Messenger
Creating a Custom Launcher for Your Web2Chat Messenger

Find out how you can create your own custom Messenger Launcher in Web2Chat.

Avatar of tanazmasaba06
Written by tanazmasaba06
Last updated Jan 29, 2025
In Web2Chat, you can customize how the Messenger is launched on your website or mobile application. By creating a custom launcher, you can trigger the Messenger to open when a user interacts with a specific button, link, or any other element that fits seamlessly with your site's design.

Creating a Custom Launcher on Your Website

To set up a custom launcher on your website, follow these steps:
  1. Identify the HTML Element:
    Choose the HTML element (e.g., a link or button) that you want to use to open the Messenger. Assign a unique id or class to this element.
    Example:
    html
    CopyEdit
    <a id="my_custom_launcher" href="#">Contact Us</a>
  2. Modify the Web2Chat Settings:
    • Locate the Web2Chat initialization script on your website.
    • Add the custom_launcher_selector property to the web2chatSettings object, specifying the selector for your custom launcher.
    Example:
    javascript
    window.web2chatSettings = { app_id: 'YOUR_APP_ID', custom_launcher_selector: '#my_custom_launcher' };
    Replace 'YOUR_APP_ID' with your actual Web2Chat application ID.
  3. Disable the Default Launcher (Optional):
    If you prefer to use only your custom launcher and hide the default Messenger icon, add the hide_default_launcher property to the web2chatSettings object.
    Example:
    javascript
    window.web2chatSettings = { app_id: 'YOUR_APP_ID', custom_launcher_selector: '#my_custom_launcher', hide_default_launcher: true };
By following these steps, clicking on the element with the id my_custom_launcher will open the Web2Chat Messenger.

If you need further assistance, contact our Customer Support.

Related Articles