Skip to content

Configuration

Configure the widget by setting properties on window.receiveo before the loader script runs.

<script>
window.receiveo = window.receiveo || {};
window.receiveo.publicKey = "pk_live_YOUR_KEY_HERE";
window.receiveo.showBubbleOnLoad = false;
window.receiveo.hideBubbleOnClose = true;
</script>
<script src="https://widget.receiveo.com/loader.js" async></script>
Typestring
Default

Your workspace’s public key. Found in Settings → Widget Installation.

window.receiveo.publicKey = "pk_live_ABC123";
Typeboolean
Defaulttrue

Whether the chat bubble is visible when the widget loads. Set to false to start the widget completely hidden — useful for headless mode where you control visibility with your own UI.

window.receiveo.showBubbleOnLoad = false;
Typeboolean
Defaultfalse

When true, closing the chat window also hides the chat bubble. The bubble won’t reappear until you call receiveo.api.showBubble().

window.receiveo.hideBubbleOnClose = true;
Typeboolean
Defaultfalse

Automatically opens the chat window when the widget finishes loading.

window.receiveo.openOnLoad = true;
Typeboolean
Defaultfalse

Marks all conversations as demo mode. Useful for testing.

window.receiveo.demo = true;
Typeboolean
Defaultfalse

Enables console logging for debugging widget issues.

window.receiveo.debug = true;
Typestring
DefaultProduction URL

Override the API endpoint. Only needed for self-hosted or development setups.

window.receiveo.apiUrl = "https://api.your-domain.com";

The pre-chat form is configured in the dashboard under Settings → Conversations, not through JavaScript configuration. When enabled, visitors must provide contact details before starting a conversation.

  1. Enable the form in Settings → Conversations → Pre-chat form
  2. Choose which fields to require: Name, Email, Phone (any combination)
  3. Visitors see a form when they open the widget, collecting their details plus their first message
  4. After submission, the conversation starts normally

If you call identify() before the visitor opens the widget and provide all the required fields, the form is skipped automatically. This is useful when you already know who the visitor is (e.g., they’re logged into your app).

// If the pre-chat form requires name and email,
// identifying the visitor skips the form entirely
receiveo.api.identify({
email: user.email,
name: user.name,
});