...
Parameter | Description | Data Type | Mandatory |
---|---|---|---|
selectors | One or more selectors (using any framework you want) pointing to the html elements to be tracked | Array of DOM selectors | Yes |
terms | The query typed by the user | String | Yes |
page | The page number | Integer | Yes |
scope | This parameter is used for separate analytic data between two or more different scenarios | String | No* |
options | Object that may contain information about filters and other required data | Object | No |
callback | Function that will be executed after sending data | Function | No |
*This parameters are not mandatory for the service but necessary for the statistics |
The options object should contains the following content:
Code Block | ||
---|---|---|
| ||
{
lang: LANGUAGUE,
productId: PRODUCT_IDENTIFIER
} |
The callback function receives an object with the following content:
...
Code Block | ||
---|---|---|
| ||
var selectors = [jQuery('a.myLink'),jQuery('a.myLink2')];
empathyTAG.trackClicks(selectors, 'test', 1, 'testscope',{lang:'en', productId:'11111'}, function(responseData){}); |
...