Instructions to send "Wishlist" clicks information using the Javascript Tagging Library.
This event must be triggered when users click on "Wishlist" button. At that moment trackWishlist function should be executed including parameters detailed below.
Use this function to send information when a user clicks on an "Wishlist" button.
trackWishlist(terms, page, position, productid, title, url, options, callback) |
Parameter | Description | Data Type | Mandatory |
---|---|---|---|
terms | The query typed by the user | String | Yes |
page | The page number | Integer | Yes |
position | The position in SERP of the product selected. | Integer | No |
productId | The product ID of the selected result. | String | No |
title | The product or result title | String | Yes |
url | Destination URL, for example product detail page | String | Yes |
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 additional parameters not passed as parameters in function call:
{ lang: LANGUAGUE, scope: SCOPE, store: STORE, catalog: CATALOG, section: SECTION, user: USER_ID, session: SESSION_ID } |
Parameter | Description | Data Type | Mandatory |
---|---|---|---|
lang | Language identifier (es, en...) | String | No |
scope | Scope identifier (desktop, mobile, android app, iOS app...) | String | No |
store | Store value if it is required for the project | String | No |
catalog | Catalog value if it is required for the project | String | No |
section | Section value if it is required for the project | String | No |
user | UserID used for user based services | String* | No |
session | SessionID used for user based services | String | No |
*UserID should be an UUID identifier.
NOTE: The values for scope and lang will be provided by the Empathy Team.
NOTE: If you are setting up the trackWishlist function into the product detail page, terms and page values will be relative to the product situation into the results grid before being clicked by the user.
The callback function receives an object with the following content. Also options parameters are included:
{ q: terms, page: page, productId: productid, position: position, title: title, url: url, follow: false } |
empathyTAG.trackWishlist('test', 1, 3, "My product id", 'My product title', 'http://MY_PRODUCT_URL.com',{lang:'en',scope:'testscope'},function(){}); |
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.