Using Javascript Search Library - Deprecated


Instructions to use Javascript Search Library.

Step-by-step guide

First of all, you need your URL_EMPATHYBROKER (i.e. from our Account Manager, Appointed Lead Developer or alternatively contact our Support team.

The library must be included inside your code before using the API. This piece of code should be inserted at the bottom of the page:

STAGING environment resources import

<script src="https://URL_EMPATHYBROKER/js/api/empathyutils.js" type="text/javascript"></script>
<script src="https://URL_EMPATHYBROKER/js/api/empathysearch.js" type="text/javascript"></script>

LIVE environment resources import

<script src="{EB_INSTANCE_NAME}/js/api/empathyutils.js" type="text/javascript"></script>
<script src="{EB_INSTANCE_NAME}/js/api/empathysearch.js" type="text/javascript"></script>

Note: Do not use your URL_EMPATHYBROKER in your LIVE environment.

Note: i.e. EB_INSTANCE_NAME = sb-demo-guide


Once the library is added to the page, you need to initialize the service:

var empathyTAG = new EmpathyBrokerSearch(URL_EMPATHYBROKER).init();

At this point, you are ready to use the library: