Analytics

LiSA Library

3min

The integration with your Analytics tool is done via events the LiSA Library exposes.

LiSA Library Events

  • Player openlibrary.player.Event.OPEN
  • Show viewlibrary.player.Event.SHOW_READY
  • View productlibrary.player.Event.PRODUCT_VIEW
  • Product like / add to wishlistlibrary.player.Event.PRODUCT_GRANT_REACTION
  • Product remove like / remove from wishlistlibrary.player.Event.PRODUCT_REVOKE_REACTION
  • Add to shopping cartlibrary.player.Event.PRODUCT_ADD_TO_CART
  • View shopping cartlibrary.player.Event.CART_VIEW

Libary on-ready hook

With the help of the on.ready hook in the library configuration you have the option to register callback functions for the respective events of the LiSA Player.

To be able to register callback functions for the events of the player, the on-ready hook of the library must be specified in the configuration.

JS


The first argument of the callback function is an instance of the LiSA LIbrary — we call it library in the example above. The Library instance exposes the Player instance of the library via the player property.

You can register callback functions using the player's on() method:

JS


For a detailed description of the event callback function signatures and examples read Callback Functions.