Versions Compared

Key

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

...

...

...

...

Overview

Instructions to send "Wishlist" clicks information using the Javascript Tagging Library.

Step-by-step guide

This event must be triggered when users click on "Wishlist" button. At that moment trackWishlist function should be executed including parameters detailed below.

trackWishlist

Use this function to send information when a user clicks on an "Wishlist" button.

Code Block
languagejs
trackWishlist(terms, page, position, productid, title, url, options, callback)

Parameters

ParameterDescriptionData TypeMandatory
termsThe query typed by the userStringYes
pageThe page numberIntegerYes
positionThe position in SERP of the product selected.IntegerNo
productIdThe product ID of the selected result.StringNo
titleThe product or result titleStringYes
urlDestination URL, for example product detail pageStringYes
optionsObject that may contain information about filters and other required dataObjectNo*
callbackFunction that will be executed after sending dataFunctionNo
*This parameters are not mandatory for the service but necessary for the statistics

Options

The options object should contains additional parameters not passed as parameters in function call:

...

Code Block
languagejs
{
	q: terms,
	page: page,
	productId: productid,
	position: position,
	title: title,
    url: url,
    follow: false
}


Code sample

Code Block
languagejs
empathyTAG.trackWishlist('test', 1, 3, "My product id", 'My product title', 'http://MY_PRODUCT_URL.com',{lang:'en',scope:'testscope'},function(){});

Filter by label (Content by label)
cqllabel = "empathy-tag-api-javascript" and space = currentSpace ( )