The SDK ships as a single UMD bundle on a CDN. Add the script — and, if you use the Web Components, the stylesheet — to your page:
<link rel="stylesheet" href="https://unpkg.com/@rechat/sdk@latest/dist/rechat.min.css">
<script src="https://unpkg.com/@rechat/sdk@latest/dist/rechat.min.js"></script>
That's it. The custom elements register themselves, and the JavaScript SDK is available
as the global Rechat:
const sdk = new Rechat.Sdk()
The stylesheet is only needed for the Web Components. If you only use the JavaScript SDK (lead capture, tracking, data access), the script alone is enough.
| Goal | URL |
|---|---|
| Always the latest release | https://unpkg.com/@rechat/sdk@latest/dist/rechat.min.js |
| Latest within a major version | https://unpkg.com/@rechat/sdk@^2/dist/rechat.min.js |
| An exact version | https://unpkg.com/@rechat/sdk@2.0.0/dist/rechat.min.js |
Use the same version specifier for rechat.min.css so the styles always match the script.
Rechat.Sdk.