Using Javascript Search Library - 1.3 - Deprecated
Overview
Instructions to use Javascript Search Library.
Step-by-step guide
First of all, you need your INSTANCE_IDÂ (i.e. client-instance-id) from our Account Manager, Appointed Lead Developer or alternatively contact our Support team. The possible values for ENVIRONMENTÂ are: 'liv' (to use in live environment) and 'stag' (to use in staging environment).
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://assets.empathybroker.com/apijs/1.3/empathy.resources.js" type="text/javascript"></script>
LIVE environment resources import
<script src="https://assets.empathybroker.com/apijs/1.3/empathy.resources.min.js" type="text/javascript"></script>
Usage
Once the library is added to the page, you need to create an instance of the service (It is no longer necessary to call the init() method):
var empathySearch = new EmpathyBrokerSearch(INSTANCE_ID, ENVIRONMENT);
Example
var empathySearch = new EmpathyBrokerSearch('client-instance-id', 'stag');
At this point, you are ready to use the library:
Related articles
-
Javascript Search Library: TopClicked (Empathy Knowledge Base)
-
Javascript Search Library: Empathize (Empathy Knowledge Base)
-
Javascript Search Library: FullSearch (Empathy Knowledge Base)
-
-
Javascript Search Library: Links (Empathy Knowledge Base)
-
Javascript Search Library: Search (Empathy Knowledge Base)
-
-
Javascript Search Library - 1.4 : SkuSearch (Empathy Knowledge Base)
-
Javascript Search Library - 1.4: Empathize (Empathy Knowledge Base)
-
Javascript Search Library - 1.4 : Search (Empathy Knowledge Base)
-
Javascript Search Library - 1.4 : nextQueries (Empathy Knowledge Base)
-
Javascript Search Library - 1.4: TopClicked (Empathy Knowledge Base)
-
Javascript Search Library - 1.4 : querySignals (Empathy Knowledge Base)
-
Javascript Search Library - 1.4: Links (Empathy Knowledge Base)
-