Recent searches
No recent searches
Hiding the Chat widget on mobile devices
Answered
Posted Mar 26, 2021
This is a continuing discussion about the article Hiding the Chat widget on mobile devices in the developer documentation.
0
5
Recent searches
No recent searches
Posted Mar 26, 2021
This is a continuing discussion about the article Hiding the Chat widget on mobile devices in the developer documentation.
0
5 comments
Andrew J
Not working. Using as below.
`<script type="text/javascript">
var ua = navigator.userAgent.toLowerCase(), platform = navigator.platform.toLowerCase();
platformName = ua.match(/ip(?:ad|od|hone)/) ? 'ios' : (ua.match(/(?:webos|android)/) || platform.match(/mac|win|linux/) || ['other'])[0],
isMobile = /ios|android|webos/.test(platformName);
if (!isMobile) {
id="ze-snippet" src="https://static.zdassets.com/ekr/snippet.js?key=e87=my-key=4e"
}
</script>`
0
Charles Nadeau
Please note that this article applies to Chat-only accounts. There are two main types of Chat accounts:
See About Chat account types in the Chat Help Center.
The embed code varies between the two. The Chat-only embed code looks as follows:
The Chat+Support embed code looks like Andrew's snippet above:
<script id="ze-snippet" src="https://static.zdassets.com/ekr/snippet.js?key=e87=my-key=4e"></script>
I'll update the introduction to make this clearer.
0
Peter Vandendriesse
Ah, thanks Charles, that makes sense!
So how can we hide the widget on mobile if we have a Chat+Support account?
0
Muvluv1987
0
Bryan Flynn
Thanks for that Muvluv1987!
0