...
Code Block | ||
---|---|---|
| ||
{
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 |
...
Code Block | ||
---|---|---|
| ||
/** * 1 -> Capture click on the desired product * 2 -> Avoid default action (redirect to destination url) * 3 -> Execute trackClick function with the desired callback (including url redirection) */ jQuery('a#myLink').click(function(){ event.preventDefault(); var myURL = this.href; var title = this.title; var productId = this.prodID; var options = { lang: LANGUAGUE, scope: SCOPE, store: STORE, catalog: CATALOG, section: SECTION, user: USER_ID, session: SESSION_ID }; empathyTAG.trackClick('test',1,3, this.prodID, this.href, options, function(){ //Add your code here document.location.href = myURL; }); }); |
...