Instructions to use Javascript Tagging Library.
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:
<script src="https://assets.empathybroker.com/apijs/1.3/empathyuuid.js" type="text/javascript"></script> <script src="https://assets.empathybroker.com/apijs/1.3/empathyutils.js" type="text/javascript"></script> <script src="https://assets.empathybroker.com/apijs/1.3/empathytag.js" type="text/javascript"></script> |
<script src="https://assets.empathybroker.com/apijs/1.3/empathy.resources.js" type="text/javascript"></script> |
<script src="https://assets.empathybroker.com/apijs/1.3/empathy.resources.min.js" type="text/javascript"></script> |
Once the library is added to the page, you need to initialize the service:
var empathyTAG = new EmpathyBrokerTAG(INSTANCE_ID, ENVIRONMENT).init(); |
var empathyTAG = new EmpathyBrokerTAG('client-instance-id', 'stag').init(); |
At this point, you are ready to use the library:
Note: If you need to see requests received visit URL_EMPATHYBROKER/services/log/last