Skip to content

Commit

Permalink
doc: Adds configuration docs for baseDomain in SDK settings (#437)
Browse files Browse the repository at this point in the history
* doc: Adds configuration docs for baseDomain in SDk settings

* Adds sample code to settings display
  • Loading branch information
nithindavid committed Aug 25, 2023
1 parent 2cd3e50 commit c81a5c1
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/product/channels/live-chat/sdk/setup.md
Expand Up @@ -36,11 +36,40 @@ window.chatwootSettings = {
position: "left", // This can be left or right
locale: "en", // Language to be set
useBrowserLanguage: false, // Set widget language from user's browser
baseDomain: '.mydomain.com'
type: "standard", // [standard, expanded_bubble]
darkMode: "auto", // [light, auto]
};
```

### Persist chat session across sub domains `baseDomain` Configuration,

The `baseDomain` config retains user chat sessions across sub-domains, ensuring a seamless chat experience as users navigate through your domain's pages.

#### Setting Up

Add the `baseDomain` configuration to `window.chatwootSettings`

```
window.chatwootSettings = {
//other settings
baseDomain: ".yourdomain.com",
};
```

Replace `yourdomain.com` with your domain, keeping the preceding dot.

**Notes**

- Ensure SSL is set for all sub-domains.
- Configuration applies to sub-domains, not different domains.

**Example:**

```
baseDomain: '.chatwoot.com'
```

### Use browser language in your live chat widget automatically

To show the live chat widget in the user's browser locale, set the `useBrowserLanguage` to `true` in the `window.chatwootSettings` mentioned above.
Expand Down

0 comments on commit c81a5c1

Please sign in to comment.