Analytics
LiSA Library

Callback Functions

19min

This article provides a comprehensive description of the Player Event Callback Functions and their signatures, as well as simple examples of integration with the Google Tag Manager data layer.

Player open

The player has been opened. In the Library context, this event get's fired, when a viewer click on a show item in the Library's show listings.

Parameter

  • showId — The universally unique identifier of the show.

Example

The example code show-cases a Google Tag Manager data layer push event.

Callback
showId


Show View

The show has been loaded in the player. This event is comparable to a page impression event in the website tracking context.

Parameter

  • eventData — An object providing show related data and a map of products featured in the show. Type definition at the end of this document.

Example

The example code show-cases a Google Tag Manager data layer push event.

Callback
eventData


View product

This event gets fired, when a user clicks a product card to see the product details.

Parameter

  • eventData — An object providing the product's identifier (id) and action. Depending on the Player integration action can either be a product URL or a serialized JSON structure required for executing a custom event action.
  • first — Indicator, whether this is the first event of this type for this product.
  • productData — The complete data object of this product.

Example

The example code show-cases a Google Tag Manager data layer push event.

Callback
eventData
productData


Product like / add to wishlist

This event gets fired, when a user clicks the reaction CTA on a product card to like a product or put it on their wishlist (depending on your integration),

Parameter

  • eventData — An object providing the product's identifier (id) and action. Depending on the Player integration action can either be a product URL or a serialized JSON structure required for executing a custom event action.
  • first — Indicator, whether this is the first event of this type for this product.
  • productData — The complete data object of this product.

Example

The example code show-cases a Google Tag Manager data layer push event.

Callback
eventData
productData


Product remove like / remove from wishlist

This event gets fired, when a user clicks the reaction CTA on a product card to remove a previously given like from a product or remove it from their wishlist (depending on your integration),

Parameter

  • eventData — An object providing the product's identifier (id) and action. Depending on the Player integration action can either be a product URL or a serialized JSON structure required for executing a custom event action.
  • first — Indicator, whether this is the first event of this type for this product.
  • productData — The complete data object of this product.

Example

The example code show-cases a Google Tag Manager data layer push event.

Callback
eventData
productData


Product add to shopping cart

This event gets fired, when a user clicks the add to cart CTA on a product card,

Parameter

  • eventData — An object providing the product's identifier (id) and action. Depending on the Player integration action can either be a product URL or a serialized JSON structure required for executing a custom event action.
  • first — Indicator, whether this is the first event of this type for this product.
  • productData — The complete data object of this product.

Example

The example code show-cases a Google Tag Manager data layer push event.

Callback
eventData
productData


View shopping cart

This event gets fired, when a user clicks the shopping cart CTA to open their shopping cart,

Parameter

  • url — Your storefronts shopping cart URL.

Example

The example code show-cases a Google Tag Manager data layer push event.

Callback
url