Step 1. Place the following code before the closing tag </body>
:
Copy <!-- Zendesk widget source -->
<script id="ze-snippet" src="https://static.zdassets.com/ekr/snippet.js?key=[your_zendesk_key]"> </script>
<!-- Init and customize Freshchat widget -->
<script>
window.zESettings = {
webWidget: {
offset: {
horizontal: '100px'
},
},
};
zE('webWidget:on', 'close', function() {
zE('webWidget', 'hide');
});
</script>
<!-- Init and customize Blinger Widget -->
<script>
var showBlinger = function () {
if (typeof Blinger !== 'undefined' && !Blinger.launcherWidget.isOpen) {
document.getElementById('blinger-launcher-iframe').style.display = 'block';
}
};
window['blingerBeforeRender'] = function () {
var channel = new Blinger.Channels.SimpleActionChannel();
channel.tooltip = 'Livechat';
channel.color = '#75b145';
channel.imageUrl = 'https://app.blinger.io/images/widget2/livechat.png';
channel.action = function () {
zE('webWidget', 'show');
zE('webWidget', 'open');
};
Blinger.channelsWidget.addChannel(channel);
Blinger.channelsWidget.resizeEnabled = true;
};
window['blingerInit'] = function () {
document.getElementById('blinger-launcher-iframe').style.display = 'none';
};
var count = 0;
var waitForZEWidgetloading = function () {
var zEwidgetDisplay = zE('webWidget:get', 'display');
if (zEwidgetDisplay === 'launcher') {
var element = document.getElementById("launcher");
element.parentNode.removeChild(element);
showBlinger();
} else {
if (count < 20) {
setTimeout(function () {
waitForZEWidgetloading();
}, 300);
count++;
}
}
};
waitForZEWidgetloading();
(function (d) {
var s = d.createElement("script");
s.async = true;
s.charset = "utf-8";
s.src = "https://app.blinger.io/uploads/widgets2/[Value].js";
d.head.appendChild(s);
})(window.document);
</script>
Step 2. Insert widget's token from your Zendesk admin instead of [your_zendesk_key]
.
Copy <script id="ze-snippet" src="https://static.zdassets.com/ekr/snippet.js?key=[your_zendesk_key]"> </script>
Step 3. Define the necessary number of the widget instead of [Value]
.
Copy s.src = "https://app.blinger.io/uploads/widgets2/[Value].js"