Wishi partner widget/SDK documentation
  • The Formal Stuff
    • Introduction
    • iOS SDK
      • Setup
        • View controller setup example
      • Public protocols
      • Public API's
      • Data structures/types
    • Web SDK
      • Setup
      • Initialization
      • Data structures
      • Public API's/interfaces
      • Events subscription
      • Telemetry
    • Pixel
      • Set up the base code
      • Set up events
      • Tracking parameters
    • Client-side authentication
    • FAQ
Powered by GitBook
On this page

Was this helpful?

  1. The Formal Stuff
  2. Web SDK

Events subscription

Optional events to subscribe on

Register for events and handle them

Item Clicked

Emitted hen a user clicks on an item either on pieces tab or inside the chat

wishiSDK.on('item-clicked', function (itemId) {
    console.log(`[item-clicked] on event emitter, itemId);
});

An error has happened

wishiSDK.on('error', function(error) {
    console.error(`on event emitter, JSON.stringify(error));
});
PreviousPublic API's/interfacesNextTelemetry

Last updated 1 year ago

Was this helpful?