Welcome Message

Use Cases

  • Customize welcome messages based on page
  • Hide the welcome message completely, or on select pages
  • Show or hide the welcome message based on your company's online or offline status
The Welcome Message

The Welcome Message

Don't Forget!

Some tasks can be done within the Drift app. Here's how to Set up your welcome/away message and how to set online/offline hours.

First, Initialize the Drift Widget

<script>
drift.on('ready',function(api, payload) {
 // your code goes here
})
</script>				
<script>
analytics.ready(function(){
    //interact with the api here
})
</script>

Welcome Message Functions

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.

api.showWelcomeOrAwayMessage()
This will show the proper message based on your organization's current online / offline status.

api.hideWelcomeMessage()
This will hide the welcome message and reset its state.

Example with Parameters

Here's an example with parameters message and avatarUrl.

<script>
  drift.on('ready',function(api, payload) {
  
    api.showWelcomeMessage({ 
      
    	message:undefined,
    	// a string. replaces the default welcome message with a custom one.
      
     	avatarUrl:undefined 
    	// a url. replaces the default avatar with a custom one.
    })
    
  })
</script>	

Not using Drift yet? Get your free account here!

Welcome Message