Channel Developers

This document clarifies common questions regarding the JavaScript SDK (hereafter referred to as "SDK").

The SDK differentiates between a member user and a non-member (unknown user) depending on whether the memberId is specified in the boot option during the boot.

For more details, refer to boot.

For setting up a member user's profile without user action, refer to the member user boot code in boot.

To position the channel button, navigate to Channel settings > General > Manage Plug-in > Web Plugin Setting in the desk.

You can set the image of a channel button via Channel settings > General > Manage Plug-in > Web Plugin Setting in the desk.

For customizing the channel button using HTML elements, see how to customize channel button.

The SDK does not provide CSS selectors for choosing HTML elements like the channel button or messenger.

Avoid using the id and class of the SDK's HTML elements as CSS selectors.

These values might change unexpectedly.

To prevent HTML elements like channel buttons and messengers from being obscured by other elements on the website, adjust the zIndex n the boot option to change the elements' z-index.

In Single Page Applications (SPA), the SDK and Channel Talk server do not automatically detect URL changes. To utilize workflow and marketing features effectively:

  1. When the web application's URL changes, use setPage to update the current page information in the SDK:

JavaScript
  1. Then, use track o send a PageView event, which includes the current page information as set by setPage.

JavaScript

This method ensures the SDK and Channel Talk server accurately recognize the user's current page and provide relevant marketing messages and workflow interactions.

For more detailed information about events and pages, please refer to What is an Event and What is a page.