Messenger installation

Learn how to install the Messenger widget into your app to support your customers from where they are.

Written By Erik Kaljumäe

Last updated 2 months ago

Featurebase's messenger widget.

Provide frictionless support straight from your product, with Messenger. Aside from the live chat, Messenger allows your customers to view help articles, access changelog updates, submit feedback, and much more.

👨‍💻 This should take around 10 minutes to set up for an engineer. If you're uncomfortable with this, share this guide with a technical team member who can assist.


Installation

The widget can be installed using our JavaScript SDK. Here are some examples of popular JavaScript frameworks:

Example
<!-- 1. Load the Featurebase SDK --> <script>!(function(e,t){var a="featurebase-sdk";function n(){if(!t.getElementById(a)){var e=t.createElement("script");(e.id=a),(e.src="https://do.featurebase.app/js/sdk.js"),t.getElementsByTagName("script")[0].parentNode.insertBefore(e,t.getElementsByTagName("script")[0])}};"function"!=typeof e.Featurebase&&(e.Featurebase=function(){(e.Featurebase.q=e.Featurebase.q||[]).push(arguments)}),"complete"===t.readyState||"interactive"===t.readyState?n():t.addEventListener("DOMContentLoaded",n)})(window,document);</script> <!-- 2. Boot Featurebase with your messenger config --> <script> Featurebase("boot", { appId: "YOUR_APP_ID_HERE", // required email: "user@example.com", // optional, requires secure installation by default userId: "12345", // optional, requires secure installation by default createdAt: "2025-05-06T12:00:00Z", // optional theme: "light", // "light" or "dark" language: "en", // short code (e.g. "en", "de", etc.) // Hide the launcher button entirely // For custom launcher button implementation // hideDefaultLauncher: true // optional }); </script>

⚠️IMPORTANT FOR SETUP TO WORK: If you are sending attributes (like email or userId) you must follow secure installation guide → for the user to be authenticated.

If you do not follow the guide above, you must disable the secure login requirement for the example code to work here.

⚠️ Disabling secure login is ok for local testing, but it should never be used for production when using Messenger with user data.

Field descriptions

Here’s a list of all the main parameters you can include inside the boot function:

  • appId - (Required) Your Featurebase organization ID (not name), which can be found here.

  • email - User’s email address.

  • userId - The user’s unique ID in your application.

  • createdAt - When the user’s account was created.

  • theme - If the dark or light theme of the widget should be shown.

  • language - The language of the widget, you can check available languages from Localize Featurebase to work with multiple languages

  • hideDefaultLauncher - Hide the default launcher button, to open or close the widget only programmatically.
    Messenger Javascript API - Methods


Adding custom data about the user

You can include any custom data you want in the boot function as long as the required parameters are set.

This means you can add params like userPlan, userSubscriptionId, etc.. all in the same object. You can even add more complex nested parameters.

NB! To make sure custom attributes are added for users, please make sure to configure them by following this guide →


Leaving out user data

If you’d like to treat the communicating user as a lead instead, you can remove userHash and all other user identifying data.


Next steps

FAQ