Skip to main content

Client integration

Once you activated your domain, you can start integrating the client into your application.

Script tag#

Add the following script tag to the <head> section to your HTML files.

If you are using a framework (React/Vue/Svelte), add it to your main index.html.

<script async defer data-domain="coollabs.io" src="https://cdn.coollabs.io/js/cooltalk.js"/>

Configuration#

The script execution could be slightly altered with the following data attributes.

Data AttributeExplanationExample
data-domain*Your application's domain. Must match with window.location.hostname.coollabs.io
data-serverIf you use the self-hosted version, it points to your instance domain name.app.cooltalk.io (default)
data-themelight or dark theme.light (default)
data-emailEmail address of the user. If not set, the user will be anonymous and gets a session ID.andras@coollabs.io
data-nameFull name of the user.Andras Bacsai
data-avatarAvatar of the user.https://....
data-positionPosition of the chat window. left or rightright (default)

* Required attribute