Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
{    
	lang: LANGUAGUE,
	scope: SCOPE,
	store: STORE,
	catalog: CATALOG,
	section: SECTION,
	user: USER_ID,
	session: SESSION_ID
}

...

ParameterDescriptionData TypeMandatory
langLanguage identifier (es, en...)StringNo
scopeScope identifier (desktop, mobile, android app, iOS app...)StringNo
storeStore value if it is required for the projectStringNo
catalogCatalog value if it is required for the projectStringNo
sectionSection value if it is required for the projectStringNo
userUserID used for user based servicesString*No
sessionSessionID used for user based servicesStringNo

...

Code Block
languagejs
/**
* 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;
   });
});

...