> ## Documentation Index
> Fetch the complete documentation index at: https://docs.videowise.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Widgets

> The Videowise Widget now supports interception and tracking of custom events. This provides customers with a more comprehensive view of user interactions with video content

To intercept and handle these custom events, customers can utilize the `window.addEventListener` method. Below is an example of how to listen for these events:

```javascript Code Block Example theme={null}
window.addEventListener("videowiseVideoClick", (event) => {
  // Your code here
});
```

```javascript Code Block Example theme={null}
window.addEventListener("videowiseVideoClick", (event) => {
  console.log("videowiseVideoClick executed");
  console.log(event.detail); // return Data from event
});
```

## Events

### videowiseProductAddToCart

Triggered when a user adds a product to the cart.

* productName
* productId
* variantId
* selectedVariant
* qty
* price
* currencyCode
* videoTitle
* videoId
* widgetId
* deviceType
* url

### videowiseVideoClick

Triggered when a user clicks on a video.

* videoTitle
* videoId
* widgetId
* deviceType
* url

### videowiseVideoStart

Triggered when a video played more than 3 seconds.

* videoTitle
* videoId
* widgetId
* deviceType
* url

### videowiseVideoFull

Triggered when played more than 80% of the video.

* videoTitle
* videoId
* widgetId
* deviceType
* url

### videowiseVideoSwipe

Triggered when a user swipes a video.

* videoTitle
* videoId
* widgetId
* deviceType
* url

### videowisePlayerClose

Triggered when a user closes the player.

* videoTitle
* videoId
* widgetId
* deviceType
* url

### videowiseVideoSoundOn

Triggered when a user turns on the sound of the video.

* videoTitle
* videoId
* widgetId
* deviceType
* url

### videowiseVideoSoundOff

Triggered when a user turns off the sound of the video.

* videoTitle
* videoId
* widgetId
* deviceType
* url

### videowiseProductClick

Triggered when a user clicks on a shoppable product.

* productId
* productName
* videoTitle
* videoId
* widgetId
* deviceType
* url

### videowiseProductBuyNow

Triggered when a user clicks on the buy now button of a shoppable product.

* productId
* productName
* variantId
* selectedVariant
* qty
* price
* currencyCode
* videoTitle
* videoId
* widgetId
* deviceType
* url

### videowiseVideoBounce

Triggered when a user close/swipe the video without playing it, noted video played less than 3 seconds.

* videoTitle
* videoId
* widgetId
* deviceType
* url

### videowiseDataReady

Triggered when the widget has all the necessary data and is ready for rendering

* widgetIds
* deviceType
* url

### videowiseCampaignReady

Triggered after campaign rendered

* campaignId
* deviceType
* url

### videowiseCampaignCheckout

Triggered before redirecting the user to the Shopify checkout page

* campaignId
* deviceType
* url
* items \[array]
  * productName
  * productId
  * qty
  * price
  * currencyCode

### videowiseCtaClick

Triggered when a user clicks on a call to action button.

* videoTitle
* videoId
* widgetId
* deviceType
* buttonClicked (text in the button)
* url

### videowiseCheckoutClick

Triggered when a user clicks the checkout button on the cart.

* products \[array]
  * productId
  * productName
  * variantId
  * selectedVariant
  * qty
  * price
* currencyCode
* videoTitle
* videoId
* widgetId
* deviceType
* url
