Events
The Aploze JS SDK triggers various events to notify you that the user has taken some action (subscribed to a live, clicked on a product, etc.) or that an important event has happened.
This section describes what events are available and how to subscribe to them.
Usage
Aploze Events are attached to the document
and use CustomEvent interface so you need to use the native Web Event API to handle them, using:
You can access data in event.detail property. Further, when properly added, handlers can also be disconnected if needed using:
See examples on Github: https://github.com/aploze/integration-examples
Example
In this example, an event is fired when the Aploze tag is ready, and the handler list all available Live Shopping events.
How to destroy a listener ?
This example show how to destroy an Event Listener
Available Events
Here the list of events that you can subscribe with the event listener:
Type | Detail | Description |
---|---|---|
APLOZE_LOADED | When Aploze is loaded | |
APLOZE_WIDGET_GALLERY_LOADED | events | When the gallery widget is loaded |
APLOZE_WIDGET_GALLERY_EVENT_CLICKED | event | When an event is clicked in the gallery widget loaded |
APLOZE_WIDGET_PRODUCT_LOADED | event | When the product widget is loaded |
APLOZE_WIDGET_PRODUCT_EVENT_CLICKED | event | When the product widget is clicked |
APLOZE_PLAYER_LOADED | event | When the player is loaded |
APLOZE_PLAYER_OPENED | event | When the player is opened |
APLOZE_PLAYER_CLOSED | When the player is closed | |
APLOZE_PLAYER_PAGE_VIEWED | When user views the player page | |
APLOZE_PLAYER_LEGAL_CONSENTED | consent | When user use submit a consent (cookies or terms of service) |
APLOZE_PLAYER_LEGAL_COOKIES_CONSENTED | consent | When user use submit cookies consent |
APLOZE_PLAYER_LEGAL_TERMS_OF_SERVICE_CONSENTED | consent | When user use submit terms of service |
APLOZE_PLAYER_SUBSCRIBE_CLICKED | When the subscribe button is clicked | |
APLOZE_PLAYER_SUBSCRIBE_CALENDAR_CLICKED | When the subscribe to calendar button is clicked | |
APLOZE_PLAYER_EVENT_ADDED_TO_CALENDAR | When the event is added to calendar | |
APLOZE_PLAYER_SUBSCRIBE_SMS_CLICKED | When the subscribe to sms button is clicked | |
APLOZE_PLAYER_EVENT_SUBSCRIBED_BY_SMS | user | When the user subscribe to the event by sms |
APLOZE_PLAYER_UNSUBSCRIBE_CLICKED | When the unsubscribe button is clicked | |
APLOZE_PLAYER_EVENT_UNSUBSCRIBED_BY_SMS | user | When the user unsubscribe to the event by sms |
APLOZE_PLAYER_SHARE_CLICKED | When the share button is clicked | |
APLOZE_PLAYER_EVENT_SHARED | type | When the event is shared |
APLOZE_PLAYER_EVENT_STATUS_CHANGED | When the event status has changed | |
APLOZE_PLAYER_SHOPPER_NETWORK_CLICKED | link | When a shopper network is clicked |
APLOZE_PLAYER_BRAND_NETWORK_CLICKED | link | When a brand network is clicked |
APLOZE_PLAYER_CATALOG_CLICKED | When the catalog button is clicked | |
APLOZE_PLAYER_CART_CLICKED | When the cart button is clicked | |
APLOZE_PLAYER_PRODUCT_CLICKED | product | When a product is clicked |
APLOZE_PLAYER_PRODUCT_ADDED_TO_CART | product | When user adds a product to the cart |
APLOZE_PLAYER_PRODUCT_PAGE_CLICKED | product | When a user opens a product page link |
APLOZE_PLAYER_LIKE_CLICKED | When the like button is clicked |
Last updated