How do I tag visitors before they chat in?

Return to top
Have more questions? Submit a request

1 Comments

  • Sam Livingstone

    The syntax is wrong in the above-mentioned script - 

     

    This worked for me:

    <!-- Start of Zendesk Widget script -->
    MY WEB WIDGET CODE
    <!-- End of Zendesk Widget script -->
    <script type="text/javascript">
    zE('webWidget:on', 'userEvent', function(event) {
    console.log(event.category, event.action, event.properties);
    if (event.action === "Chat Request Form Submitted") {
    zE('webWidget', 'chat:addTags', ['vip_customer']);
    }
    });
    </script>

     

     

    0

Please sign in to leave a comment.

Powered by Zendesk