Single integration method
One script tag, every surface
The widget is delivered as a standalone script and mounted inside a shadow root, so host page styles and the widget never affect each other. There is no iframe. The same script works on public marketing sites and inside logged-in apps such as Pulse and Orbit. Page URL, page title and referrer are read from the host page at submit time.
Public website
Paste before the closing body tag. Visitors enter their own name and email.
<script
src="https://support.geocommerce.co/geochat-widget.js"
data-project-key="geocommerce-website"
data-contact-modes="chat,email"
data-business-hours="Mon to Fri, 10:00 to 19:00 IST"
async
></script>Logged-in app (Pulse or Orbit)
Pass the signed-in user so they never re-enter their details. Render this from the server with real user values.
<script>
window.GeoChatConfig = {
projectKey: "pulse",
contactModes: ["chat", "email"],
hostAppIdentity: {
externalUserId: currentUser.id,
name: currentUser.name,
email: currentUser.email,
companyName: currentUser.companyName,
role: currentUser.role,
},
hostAppContext: {
currentPage: window.location.pathname,
relatedProjectId: activeProject?.id,
relatedTaskId: activeTask?.id,
},
};
</script>
<script src="https://support.geocommerce.co/geochat-widget.js" async></script>Mount after sign-in
If identity is known only after login, update the config and call init again.
// After the user signs in, re-mount with verified identity.
window.GeoChatConfig = { ...window.GeoChatConfig, hostAppIdentity: identity };
window.GeoChat.init();Script attributes
Values in window.GeoChatConfig take priority over data attributes.
| Attribute | Default | Description |
|---|---|---|
| data-project-key | required | Project key from Projects: geocommerce-website, pulse, orbit. |
| data-contact-modes | chat,email | Comma separated list of the modes to offer. |
| data-default-mode | welcome | welcome, chat, or email. Sets the first screen. |
| data-default-open | false | Set to true to open the panel on load. |
| data-online | true | Set to false to hide live chat and offer email only. |
| data-business-hours | — | Text shown in the panel header and offline note. |
Notes for Phase 1
- → Requests are saved to the GeoChat database and appear in Inbox. No email is sent and no AI runs.
- → Host app identity is displayed and stored as context. It is trusted only for convenience in Phase 1; signed identity token verification lands in Phase 2.
- → Brand fonts are injected into the host page head so the widget renders correctly.