Widget not working in Firefox
回答済みWe are using Google Tag Manager to implement the widget. This works great in Chrome, but in Firefox I get the following error:
TypeError: zE.activate is not a function
Any reason why Firefox wouldn't see this function? Note we were using GTM with the old Feedback tab, and that worked in both browsers. Here is the full code we're using in GTM:
<style>
.supportButton{
background: #99CC66;
color: #ffffff;
display: block;
border: 0px;
position: fixed;
top:calc(50% - 44px) !important;
right:0px;
transform: rotate(-90deg);
transform-origin: right center;
margin-right: 15px;
font-size: 13px;
padding: 10px;
z-index: 9999;
width: 48px;
height: 48px;
float: right;
}
</style>
<script>
var supportButton = document.createElement('button');
supportButton.setAttribute('onclick','zE.activate({hideOnClose: true});');
supportButton.setAttribute('class','supportButton');
supportButton.innerHTML = 'Support';
var container = document.body;
container.appendChild(supportButton);
window.zEmbed || function(e, t) {
var n, o, d, i, s, a = [], r = document.createElement("iframe");
window.zEmbed = function() {
a.push(arguments)
}, window.zE = window.zE || window.zEmbed, r.src =
"javascript:false", r.title = "", r.role = "presentation", (r.frameElement ||
r)
.style.cssText = "display: none", d = document.getElementsByTagName(
"script"), d = d[d.length - 1], d.parentNode.insertBefore(r, d),
i = r.contentWindow, s = i.document;
try {
o = s;
} catch (e) {
n = document.domain, r.src =
'javascript:var d=document.open();d.domain="' + n +
'";void(0);', o = s
}
o.open()
._l = function() {
var o = this.createElement("script");
n && (this.domain = n), o.id = "js-iframe-async", o.src = e,
this.t = +new Date, this.zendeskHost = t, this.zEQueue = a,
this.body.appendChild(o)
}, o.write('<body onload="document._l();">'), o.close()
}("https://assets.zendesk.com/embeddable_framework/main.js",
"ck12support.zendesk.com");
zE(function() {
zE.hide();
});
window.zESettings = {
webWidget: {
position: {
horizontal: 'right',
vertical: 'top'
},
offset:{
horizontal: '50px',
vertical: '160px'
}
}
};
</script>
-
Hi Starr: Were you able to get this sorted out? If not, I'll convert this to a support request.
-
I have the same problem. Did you solve it? If you solved it, please post your solution. Thank you very much.
-
Hello
We have the same problem
Is there a solution for this?
Thanks! -
according to this document https://developer.zendesk.com/embeddables/docs/widget/gtm
<script> window.zEmbed||(function(){ var queue = []; window.zEmbed = function() { queue.push(arguments); } window.zE = window.zE || window.zEmbed; document.zendeskHost = 'your own website URL'; document.zEQueue = queue; }()); </script> <script src="https://assets.zendesk.com/embeddable_framework/main.js" data-ze-csp="true" async defer></script>
It works for me. Hope it works for you too.
ログインしてコメントを残してください。
4 コメント