Skip to content

Instantly share code, notes, and snippets.

window.usabilla_live('setEventCallback', function(category, action, label, value, userData){
function flat(source, target) {
Object.keys(source).forEach(function (k) {
if (source[k]!== null && typeof source[k] === 'object') {
flat(source[k], target);
return;
}
target[k] = source[k];
});
}
liveagent.findOrCreate('Case')
.map('Subject', 'Case Subject', false, false, true)
.map('Status', 'Case Status', false, false, true)
.saveToTranscript('CaseId').showOnCreate();
liveagent.addCustomDetail(‘First Name’, ‘Kimberly’)
@LMG23
LMG23 / PostChatSurvey
Created January 17, 2023 20:53
PostChatSurvey
?chat_key=32b68228-b86f-11e8-96f8-529269fb1459&chat_start_time=1536944676912&chat_request_time=1536964984331&chat_agent_id=0051XXXXXXXXXXX&chat_agent_name=Tym%20A&chat_last_visited_page=https://my-site.com/help&chat_disconnected_by=client
@LMG23
LMG23 / HTMLFeedbackTrigger
Created January 17, 2023 18:51
HTMLFeedbackTrigger
<!--integrated feedback button -->
<a href="#" id="usbl-integrated-button">Give Feedback</a>
@LMG23
LMG23 / Merge Fields to Web Overlay
Created January 16, 2023 20:47
Add Merge Fields to your Web Overlay Survey
<script>
(function(w,d,s,u,g,a,b){w['GetFeedbackObject']=g;w[g]=w[g]||function(){ (w[g].q=w[g].q||[]).push(arguments)};a=d.createElement(s),b=d.getElementsByTagName(s)[0];a.async=1;a.src=u;b.parentNode.insertBefore(a,b) })(window,document,'script','//websites.cdn.getfeedback.com/embed/dywem81odF/gf.js','gf') </script>
<script>gf('setParameters', {'ContactID': 'FIELD_VALUE'}) </script
@LMG23
LMG23 / gist:4c8d2bb6a0d3c79765ff9fff6a7a2083
Created January 16, 2023 20:20
findOrCreate.saveToTranscript
liveagent.findOrCreate(&#x27;Case&#x27;)
.map(&#x27;Subject&#x27;, &#x27;Case Subject&#x27;, false, false, true)
.map(&#x27;Status&#x27;, &#x27;Case Status&#x27;, false, false, true)
.saveToTranscript(&#x27;CaseId&#x27;).showOnCreate();
@LMG23
LMG23 / IntegratedFeedback
Last active January 16, 2023 19:41
Integrated Feedback Button
<!--integrated feedback button -->
<a href="add-your-link-here" id="usbl-integrated-button">Give Feedback</a>
<!--ADD GETFEEDBACK DIGITAL INSTALLATION SNIPPET HERE -->
<script>
//Hide GetFeedback Digital Default button
window.usabilla_live("hide");
//Find a Link and open de GetFeedback Digital Feedback form when the user clicks on the link