Skip to content

Instantly share code, notes, and snippets.

@ashleytbasinger
Last active March 15, 2021 21:01
Show Gist options
  • Save ashleytbasinger/68c56b737931ebff44fbb7bc8b41c086 to your computer and use it in GitHub Desktop.
Save ashleytbasinger/68c56b737931ebff44fbb7bc8b41c086 to your computer and use it in GitHub Desktop.
support_handoff_liveagent.js
// load Drift and LiveAgent here
// if Drift should fire first, hide LiveAgent -- if the other way, hide Drift.
window.drift.on("conversation:buttonClicked", function(data) {
console.log(data);
if (data.buttonBody == "File a ticket") { // be sure to change text to match your implementaton
drift.unload();
liveagent.startChat('57370000000TN5N'); // change for your live agent ID
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment