Schedule a Meeting

First, initialize your Drift Widget

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

Note: Enable Drift Meetings

Make sure you have Drift Meetings enabled. Here's how.

api.scheduleMeeting(driftUserId)

api.scheduleMeeting(driftUserId) will Trigger the scheduling card flow. driftUserId is a necessary parameter.

You will need your Drift User ID

If you don't know yours, just ask us!

Here's what that looks like:

Scheduling card flow

Scheduling card flow

Examples

<script>
drift.on("ready", function(api) {
  api.scheduleMeeting(driftUserId); /* <-- your Drift User ID here */
});
</script>

Below is a more complex example, where we trigger the API when the schedule-meeting-button on the page is clicked.

<button id="schedule-meeting-button">
  Book a meeting with me
</button>
    
<script>
(function() {
  var driftUserId = 6;
  var $button = document.getElementById("schedule-meeting-button");
  $button.addEventListener("click", function() {
    drift.on("ready", function(api) {
      api.scheduleMeeting(driftUserId);
    });
  });
})();
</script>

Not using Drift yet? Get your free account here!