Callback Functions
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.
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.
- showId — The universally unique identifier of the show.
The example code show-cases a Google Tag Manager data layer push event.
The show has been loaded in the player. This event is comparable to a page impression event in the website tracking context.
- eventData — An object providing show related data and a map of products featured in the show. Type definition at the end of this document.
The example code show-cases a Google Tag Manager data layer push event.
This event gets fired, when a user clicks a product card to see the product details.
- 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.
The example code show-cases a Google Tag Manager data layer push event.
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),
- 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.
The example code show-cases a Google Tag Manager data layer push event.
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),
- 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.
The example code show-cases a Google Tag Manager data layer push event.
This event gets fired, when a user clicks the add to cart CTA on a product card,
- 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.
The example code show-cases a Google Tag Manager data layer push event.
This event gets fired, when a user clicks the shopping cart CTA to open their shopping cart,
- url — Your storefronts shopping cart URL.
The example code show-cases a Google Tag Manager data layer push event.