Last active
March 15, 2021 21:01
-
-
Save ashleytbasinger/68c56b737931ebff44fbb7bc8b41c086 to your computer and use it in GitHub Desktop.
support_handoff_liveagent.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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