Tagging visitors using mobile devices

Note: This guide applies only to the Chat widget from Chat-only accounts, not from Chat+Support accounts. See About Chat account types in Zendesk help.

You can identify mobile users via API.  The following code tag visitors using mobile devices:

<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) {
$zopim.livechat.addtags ('Mobile');
}</script>

Paste the above code after your widget embed code.  Once a visitor enters your website using a mobile device, the visitor will get a 'Mobile' tag, which you can see from the chat window or from the Visitor List.