Created
November 23, 2018 14:46
-
-
Save Sarapulov/0ad9e3f103e2e114bb5c0243f94658d3 to your computer and use it in GitHub Desktop.
Example of Web Widget config
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
<script> | |
window.zESettings = { | |
webWidget: { | |
contactOptions: { | |
enabled: true | |
}, | |
contactForm: { | |
suppress: false, | |
selectTicketForm: { | |
'*': 'Vælg dit problem' | |
} | |
}, | |
chat: { | |
prechatForm: { | |
greeting: { | |
'*': 'Vores telefonnummer: +45 78 76 27 41\n\nIndtast dit telefonnummer, og vi ringer til dig.' | |
} | |
} | |
} | |
} | |
}; | |
</script> | |
<!-- Start of sarapulov Zendesk Widget script --> | |
<!-- CUSTOM WIDGET CODE GOES HERE. BELOW IS MY TEST WIDGET CODE --> | |
<script id="ze-snippet" src="https://static.zdassets.com/ekr/snippet.js?key=3e9cab8b-9836-4495-9bec-e4d677fb2d6a"> </script> | |
<!-- End of sarapulov Zendesk Widget script --> | |
<script> | |
(function(ww){ | |
ww = {'do':function(a,b,c){return zE('webWidget'+(c?':'+c:''),a,b)},'on':function(a,b){return ww.do(a,b,'on')},'get':function(a,b){return ww.do(a,b,'get')}}; | |
ww.do('prefill', { | |
name: { | |
value: 'NAME', | |
readOnly: false | |
}, | |
email: { | |
value: '[email protected]', | |
readOnly: false | |
}, | |
phone: { | |
value: '1234567890', | |
readOnly: false | |
} | |
}); | |
})({}); | |
</script> | |
<!-- | |
OUTCOME: | |
https://cl.ly/077279a57315/Image%202018-11-23%20at%203.44.25%20PM.png | |
https://cl.ly/072a54e54f4d/Image%202018-11-23%20at%203.45.06%20PM.png | |
https://cl.ly/6133de1108ea/Image%202018-11-23%20at%203.45.14%20PM.png | |
https://cl.ly/f7ea35dca707/Image%202018-11-23%20at%203.45.36%20PM.png | |
--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment