Skip to content

Instantly share code, notes, and snippets.

@dannytranlx
Last active March 24, 2016 20:08
Show Gist options
  • Save dannytranlx/18d9228ee0896ae168ed to your computer and use it in GitHub Desktop.
Save dannytranlx/18d9228ee0896ae168ed to your computer and use it in GitHub Desktop.
Whisper on a timer
// on checkout.liquid
<script>
setTimeout(function() {
Smooch.track('checkout-2mins');
}, 120000);
</script>
// for customText and email
// in snippets/smooch.liquid
var skPromise = Smooch.init({
appToken: "appToken",
serviceUrl: "https://app.smooch.io/",
emailCapturedEnabled: true,
customText: {
headerText: 'How can we help?',
inputPlaceholder: 'Type a message...',
sendButtonText: 'Send',
introText: 'This is the beginning of your conversation.<br/> Ask us anything!',
settingsText: 'You can leave us your email so that we can get back to you this way.'
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment