Setup the Chat Widget

Setting up the chat widget is incredibly simple. Simple add the following line of javascript to the bottom of your page, right before the </body> tag

<!--Yappy Chat Widget-->
<script type='text/javascript' async='' src='https://www.yappy.im/deploy/chatwidget.min.js?widgetid=[BusinessID]'></script>                                 

You can get your business ID from the widget integrations page.

You can pass in custom user attributes which will be available in the Yappy dashboard. To do so, simply create a script tag before you load the chat widget, create a yappyChatWidgetMeta array at the winow level, and pre-fill it’s values.


<!--Yappy Chat Widget - Add custom data -->
<script type='text/javascript'>
window.yappyChatWidgetMeta = [];

//Simply call the following to push user attributes (replace key value with your own data)
window.yappyChatWidgetMeta.push({'Name': 'Marius'});
window.yappyChatWidgetMeta.push({'Email': 'mariussoftllc@gmail.com'});
window.yappyChatWidgetMeta.push({'phone': '15626862709'});
</script>

The following Key names should be pre-filled if they are available:

 Name  This is the user’s name. We use it to identify the user in the dashboard. If the name is provided, we will replace the automatically generated visitor # with this value.
 Phone  This is the user’s phone #. If present, we will display this value in the dashboard.
 Email  This is the user’s email address.

 

Leave A Comment?