You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No breaking changes: major version aligned across all Gleap SDKs for the data-region release. Without `Gleap.setRegion` the SDK behaves exactly as 17.x (EU hosts).
5
+
6
+
Added data regions: `Gleap.setRegion("eu" | "us")` (case-insensitive, call before `Gleap.initialize`) sets the API url, the SDK streaming (WS) url and the messenger realtime host for the region at once; `Gleap.getRegion()` returns the active region. The default region stays `eu`. An unknown region logs a console warning and changes nothing.
Manual host setters are unchanged and keep working: `setApiUrl`, `setWSApiUrl`, `setRealtimeHost`, `setFrameUrl`, `setBannerUrl`, `setModalUrl`. The last call wins: a manual setter called after `setRegion` overrides that single host, `setRegion` called after manual setters overrides the three region hosts.
9
+
The static widget hosts stay global for every region (`messenger-app.gleap.io`, `outboundmedia.gleap.io`, `sdk.gleap.io`, `js.gleap.io`); `setRegion` never changes the frame, banner or modal url.
10
+
Added `Gleap.setAgentConversationUrl` to override the `<gleap-agent-conversation>` iframe url (same as `setBannerUrl` / `setModalUrl`).
11
+
Added `gleap.ai` to the default network-log blacklist, so the SDK does not record its own US traffic.
12
+
Added the `GleapRegion` type to the TypeScript definitions.
13
+
Fixed the consentmanager allowlist (`window.cmp_block_ignoredomains`): `messenger-app.gleap.io` was never actually added because the result of `concat` was discarded.
Copy file name to clipboardExpand all lines: README.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,15 @@ Add the following code to initialize the Gleap JavaScript SDK. Replace "SDK-TOKE
34
34
Gleap.initialize("SDK-TOKEN");
35
35
```
36
36
37
+
### Data region (optional)
38
+
39
+
Projects hosted in the US data region select it before initializing. The default region is `eu`. See [docs/custom-widget-domains.md](docs/custom-widget-domains.md) for the host table and custom domains.
40
+
41
+
```
42
+
Gleap.setRegion("us");
43
+
Gleap.initialize("SDK-TOKEN");
44
+
```
45
+
37
46
Congrats, you are now all set! Report your first bug by using the feedback button.
`sdk.gleap.io` and `js.gleap.io` (SDK script and assets). `setRegion` never
69
+
changes `setFrameUrl`, `setBannerUrl`, `setModalUrl` or
70
+
`setAgentConversationUrl`; those setters keep working independently.
71
+
72
+
If you use a Content-Security-Policy or a network allowlist, US projects must
73
+
additionally allow `https://api.us.gleap.ai`, `wss://ws.us.gleap.ai` and
74
+
`wss://sockets.us.gleap.ai` (`connect-src`) next to the global `*.gleap.io`
75
+
widget hosts.
76
+
77
+
The region table lives in one place in the SDK: `src/GleapRegions.js`.
78
+
79
+
> The EU region is also reachable on `api.eu.gleap.ai`, `ws.eu.gleap.ai` and `sockets.eu.gleap.ai`. The JavaScript SDK keeps the `*.gleap.io` hosts as its EU default for now, because sites with a Content-Security-Policy allow-list `*.gleap.io`; add `*.gleap.ai` to your CSP today so a later SDK release can switch the default without any change on your side. To use the new hosts already, set them with `setApiUrl`, `setWSApiUrl` and `setRealtimeHost`.
80
+
25
81
## Hosting requirements
26
82
27
83
Provision DNS, valid TLS certificates and reverse proxy routing for each custom
@@ -36,7 +92,9 @@ Bundle the SDK with the customer's app or proxy its script delivery separately.
36
92
Test with Gleap domains blocked, including files/uploads, avatars, help content,
37
93
banners/modals and any enabled voice integrations. Proxy/configure remaining
38
94
required resources before promising that no Gleap domains need allowlisting.
39
-
Banner and modal frame URLs already have `setBannerUrl` and `setModalUrl` setters.
95
+
Banner and modal frame URLs already have `setBannerUrl` and `setModalUrl` setters;
96
+
the `<gleap-agent-conversation>` frame has `setAgentConversationUrl` (call it
0 commit comments