The main library for interacting with the system through browser window. The code for the connection, which is provided on carrot app registration, asynchronously loads this library (https://cdn.dashly.app/api.min.js).
After the code is added to the site, a global
dashly object will be created,
For example, to call the track method, you need to write
|connect||Connection to the system|
|identify||User properties identification|
|auth||Sending User ID|
|onReady||Put a callback, which will be called after the script is loaded|
|trackMessageInteraction||Tracking the message interactions (reading, clicking, replying)|
Carrrot allows adding handler functions which are called when certain conditions occur. For example, when you open a chat, receive an auto message, send a message to the dialog, when the conversation starts, etc. We call these functions callbacks.
After downloading the script and establishing a connection to the system, each user has an identifier.
It is stored in the cookie
You can store this ID for yourself to access the Web API in the future.
Important! Not that
dashly_uid can change its value during chat lifetime in case user auth process is called.