Zopim is now called Zendesk Chat. All API functionality will continue to work as normal and the namespace will not change in the immediate future.

Javascript API

$zopim.livechat.cookieLaw

Enable EU Cookie Law (e-Privacy Directive) compliance modes.

Important: These functions must be inserted immediately after the Zendesk Chat Script.

Summary
$zopim.livechat.cookieLawEnable EU Cookie Law (e-Privacy Directive) compliance modes.
Functions
complyDisplay a notice that cookies are used the first time the visitor opens the chat window.
setDefaultImplicitConsentDisable the live chat widget and do not store cookies until the visitor explicitly allows the use of cookies.

Functions

comply

function comply()

Display a notice that cookies are used the first time the visitor opens the chat window.  Visitors can choose to allow or disallow cookies from the Options menu only when this function is called.

Example

#NORUN
<script>

  $zopim(function() {
    $zopim.livechat.cookieLaw.comply();
  });

</script>

setDefaultImplicitConsent

function setDefaultImplicitConsent()

Disable the live chat widget and do not store cookies until the visitor explicitly allows the use of cookies.

Important: This must be called together with and immediately after $zopim.livechat.cookieLaw.comply.  Refer to the example below.

Example

#NORUN
<script>

  $zopim(function() {
    $zopim.livechat.cookieLaw.comply();
    $zopim.livechat.cookieLaw.setDefaultImplicitConsent();
  });

</script>
function comply()
Display a notice that cookies are used the first time the visitor opens the chat window.
function setDefaultImplicitConsent()
Disable the live chat widget and do not store cookies until the visitor explicitly allows the use of cookies.