Using Javascript Tagging Library - 1.3 - Deprecated
Overview
Instructions to use Javascript Tagging 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: 'live' (to use in live environment) and 'staging' (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 empathyTAG = new EmpathyBrokerTAG(INSTANCE_ID, ENVIRONMENT);
Example
var empathyTAG = new EmpathyBrokerTAG('client-instance-id', 'staging');
At this point, you are ready to use the library:
Note: If you need to see requests received visit URL_EMPATHYBROKER/services/log/last
Related articles
-
Javascript Tagging Library: Track Conversion Clicks (Empathy Knowledge Base)
-
Javascript Tagging Library: Track Wishlist Clicks (Empathy Knowledge Base)
-
Using Javascript Tagging Library - Deprecated (Empathy Knowledge Base)
-
Javascript Tagging Library: Track Add2Cart Clicks (Empathy Knowledge Base)
-
Javascript Tagging Library: Track Clicks (Empathy Knowledge Base)
-
Javascript Tagging Library: Track Queries (Empathy Knowledge Base)
-
Using Javascript Tagging Library - 1.3 - Deprecated (Empathy Knowledge Base)
-
Javascript Tagging Library: Track Checkout (Empathy Knowledge Base)
-
Javascript Tagging Library - Track Search (Empathy Knowledge Base)
-
Javascript Tagging Library - Track Browse (Empathy Knowledge Base)
-
Javascript Tagging Library: Track Browse Add2Cart (Empathy Knowledge Base)
-
Javascript Tagging Library: Track Browse Category (Empathy Knowledge Base)
-
Javascript Tagging Library: Track Query (Empathy Knowledge Base)
-
Javascript Tagging Library: Track Browse Product (Empathy Knowledge Base)
-
Javascript Tagging Library: Track Wishlist (Empathy Knowledge Base)