Widget API: Drift Welcome Message

Updated 2 months ago ​by Sara Pion

If you would like to hide the welcome message on some pages, show or hide the welcome message based on your company's online or offline status, or completely hide the welcome message, this document is for you! Using our Widget API you an call these actions in your own code.

First, make sure that the Drift Widget is initialized and ready for use

drift.on('ready',function(api, payload) {
 // interact with the api here
Here is an example using our Widget API

Drift welcome message

  • Show- api.showWelcomeMessage()

    • This will open the default welcome message based on your site’s settings.

    • You can also pass some additional parameters to further customize the welcome message. All parameters are optional.

  • Show welcome OR away-api.showWelcomeOrAwayMessage()

    • This will show the proper message based on your organization's current online / offline status.

  • Hide- api.hideWelcomeMessage()

    • This will hide the welcome message and reset its state.


// a string. replaces the default welcome message with a custom one.
// a url. replaces the default avatar with a custom one.

Was this article helpful?

Can’t find what you’re looking for?

Talk To Us