01. Initialization
Before deploying to a client site, you must generate a cryptographic Client ID or Project API Key. This binds the widget instance to your specific project context.
Required Credentials
demo-client-abc-12302. Universal Module Script
The most direct deployment method. Inject our ES module directly into your HTML document. It loads asynchronously, ensuring zero impact on your Core Web Vitals. Drop this inside the <head> or before the closing </body> tag.
<script type="module" src="https://widget.chatwithlead.com/index.js?clientId=demo-client-abc-123&theme=dark" async></script>Selected theme: dark
03. WordPress Integration
For WordPress client sites. We provide an official, zero-bloat plugin that manages the widget script, AI assistant configurations, and lead capture settings directly from wp-admin.
ChatWithLead for WordPress
v1.0.0 • Ready to install via ZIP upload
Download & Upload
Download chatwithlead.zip and upload it in your WordPress dashboard under Plugins → Add New → Upload Plugin.
Paste API Key
In WordPress, open ChatWithLead → Settings and paste your Project API Key from your dashboard.
Enable & Customize
Check Embed Widget and configure your AI persona, welcome message, and lead capture preferences.
04. Query Parameters
Configuration is handled strictly through URL query parameters appended to the script source. No complex global window objects required.
| Parameter | Type | Description |
|---|---|---|
| clientId | string | Required. Cryptographic identifier for the project instance. |
| theme | enum | Optional. Set to 'light' or 'dark' to force UI matching. Defaults to system preference. |
