SDK Method Signatures

Below are details on the SDK's available methods with their signatures.

Please note - Floats must be formatted as float64 values without thousands separator, and with a decimal point (".").

For example, the price one thousand Euros and fifty cents, must be formatted as 1000.50

sendProductEvent

  • productId [String] - unique product identifier
  • shelfPrice [Float] - product shelf price
  • permalink [String] - product URL on your store
  • attributes [Object] - optional attributes hash containing product attributes
// without attributes
QL.sendProductEvent(productId, shelfPrice, permalink);

// with attributes
QL.sendProductEvent(productId, shelfPrice, permalink, attributes);

Please Note

Attributes passed in the optional attributes object can include only scalar values of types - string, number, array.

sendConfirmationEvent

  • productId [String] - unique product identifier
  • salePrice [Float] - product sale price
  • isNewUser [Boolean] - optional flag that marks whether purchase was made by a new or a returning visitor
// without isNewUser flag
QL.sendConfirmationEvent(productId, salePrice);

// with isNewUser flag
QL.sendConfirmationEvent(productId, salePrice, isNewUser);