Platform
JavaScript API
Once meeton.js has run it exposes window.Meeton. Use it to open the chat, a calendar or a document from your own buttons, to pass hidden values into forms, and to debug the loader. Most sites never need any of this; it is here for the ones that do.
Configuration
The only configuration is the global the snippet sets before the loader runs. It has one required key and one optional one.
window.DynaMeetConfig = {
teamId: "YOUR_TEAM_ID", // required · UUID, lower case, from Settings → Setup
visitorId: "k3Jx9mQ2vL8pR4tW" // optional · the visitor ID your own server keeps in its cookie
};| Key | Type | Meaning |
|---|---|---|
teamId | string (UUID) | Your team. The loader checks it against a lower-case UUID pattern; anything else, including the same UUID in upper case, makes it log a message and do nothing. If the object is missing when the script runs, the loader polls every 50 ms until it appears, with no time limit. |
visitorId | string (optional) | The visitor ID your own server keeps in a cookie it sets itself. The loader derives the Meeton visitor ID from it, so the same person stays one visitor on Safari past its 7-day cap on script storage. See Using your own visitor ID. A value under 16 or over 256 characters is logged and ignored, and so is the key on a page served over plain HTTP. |
Nothing else is read from this object: language comes from the visitor's browser, and what the widget shows on each page is decided by your settings in the dashboard. The inline chat embed runs in embed mode, but that is set by DynaMeet's own iframe page, never by your snippet. See Embed mode.
Using your own visitor ID
By default the loader mints a random visitor ID and keeps it in localStorage and a first-party cookie, both written by JavaScript. Safari deletes everything a script writes after 7 days of Safari use without a click on your site, so a Safari visitor who stays away longer comes back as a new visitor. A cookie your own server sets with a Set-Cookie header is not capped that way. If you have one, pass its value as visitorId and the loader derives the Meeton visitor ID from it on every page view: the same value always gives the same visitor, on every subdomain, however long ago our own storage was cleared.
<script>
window.DynaMeetConfig = {
teamId: "YOUR_TEAM_ID",
visitorId: <%= json(request.cookies.your_visitor_cookie) %>
};
</script>Your page provides the value; the loader never reads your cookie. Print it from your server-side template, which also works for an HttpOnly cookie, or read it from document.cookie in the snippet or a tag manager when the cookie is readable by scripts. When the template prints it, pass the value through your framework's JSON or JavaScript-string encoder (Rails to_json, Jinja tojson, Django escapejs) rather than pasting it raw: a cookie can be set by anyone on a sibling subdomain, and an unescaped value inside a <script> block is a script injection on your own site. Four rules:
- Random, and at least 16 characters. The value becomes the key to that visitor's chat history, so it must be as unguessable as a password: an ID your server minted at random, never a sequential number, a user ID, an email address or a session token. The loader ignores anything shorter than 16 characters.
- Set by your own server. A cookie written by JavaScript, including the ones marketing tools set, is capped by Safari exactly like ours, and so is a cookie set through a subdomain that is really a CNAME to a vendor. Passing one of those changes nothing.
- Stable. Each new value is a new visitor. Keep it for the lifetime of your cookie, and do not rewrite it from JavaScript, which would cap it again.
- One value per visitor. The same value for everyone would fold your whole audience into one visitor.
Only a one-way hash of the value reaches DynaMeet, never the value itself; the cookie dynameetVisitorId then holds that hash instead of a random ID. A visitor who was already known before you added the key is kept: the loader sends their previous ID once, and the contact link moves over. The key must be present before the loader runs; it is read once, at boot, and only on a page served over HTTPS, since browsers withhold the hashing API from plain HTTP pages.
Is it ready? Calling the API safely
The snippet loads meeton.js with async defer, so it runs whenever the download finishes, which can be after your own inline scripts. Two things follow from that, and both matter for a button that calls the API:
window.Meetonmay not exist yet. It is created the moment the script evaluates. Before then,window.Meeton.openChat()throws aTypeError. Always guard the call:window.Meeton && window.Meeton.openChat().- Calls before boot are dropped, not queued. After the script evaluates, the loader still has to fetch your team's configuration. Until that is done,
openChat(),openCalendar(),openLibrary()andopenInquiryPanel()write a line to the debug log and do nothing. They are not replayed later. The one exception issetHiddenValues(), which works at any time.
There is no ready event or callback. For a button a visitor clicks, the guard above is enough: by the time a person has read the page and clicked, the widget has long since booted. For code that fires on page load, wait for the widget instead:
function whenMeetonReady(fn, tries) {
tries = tries || 0;
if (window.Meeton && window.Meeton.engagedBooted) return fn(window.Meeton);
if (tries > 100) return; // ~10 s: give up quietly (blocked, bot, wrong domain…)
setTimeout(function () { whenMeetonReady(fn, tries + 1); }, 100);
}
whenMeetonReady(function (Meeton) {
Meeton.openCalendar({ source: "thankYouPage" });
});Meeton.engagedBooted turns true once the configuration and the visitor's data have loaded, which is the point from which every method works. Give up after a few seconds: on a bot, a plain-HTTP page, a domain that is not on your allow-list or a browser with an ad blocker, the widget never boots, and your page should carry on as if the tag were not there.
For the common cases there is a no-code route that needs none of this: a link to any page where the tag is installed with ?calendarId=… opens that calendar on arrival, and ?downloadCenter opens the Library. Both wait for boot themselves.
Methods on window.Meeton
Pair them with your own buttons, links or analytics triggers. "No-op before boot" means the call is dropped, as described above.
Meeton.openChat()
Opens the chat window exactly as a click on the launcher would. No-op before boot, on a page whose rules hide the launcher, when chat is switched off for the team, and in embed mode, where the chat is always open. If the chat frame exists but is still loading, the call is held and delivered once the frame is ready.
<button onclick="window.Meeton && window.Meeton.openChat()">Ask us anything</button>Meeton.openCalendar(options?)
Opens a booking calendar in the widget overlay. Without options it opens your default calendar. No-op before boot.
openCalendar(options?: {
calendarId?: string; // a specific bookable calendar: its ID or its short slug
source?: "emailLink" | "otherLink" | "thankYouPage"; // how the booking is attributed · default "otherLink"
}): void;Use source: "thankYouPage" on a form thank-you page to offer a slot the instant someone converts. If the page contains an element with id="dynameet-calendar", the booking form renders inside that element instead of as a popup; give it a height, or it defaults to 425 px. The same thing is available with no code at all: a link to any page on your site with ?calendarId=… in the URL opens that calendar on arrival, which is how calendar links in emails and QR codes work.
Meeton.openLibrary(options?)
Opens the Library viewer, optionally on a specific document and page. No-op before boot. openDownloadCenter() is the older name for the same method and still works.
openLibrary(options?: {
docId?: string; // open straight to this document
pageNumber?: number; // and this page
src?: string; // free-text attribution, e.g. "pricing-cta"; recorded with the view
}): void;Meeton.openInquiryPanel(marketingOfferId)
Opens the inquiry panel of one marketing offer, so a static link on the page can do what an ad click does. The ID is required; no-op before boot.
Meeton.setHiddenValues(values)
Lead forms can include hidden fields configured as From your page. This method supplies their values, keyed by the field's property name, the same names CRM sync uses. It merges into the current bag, so call it again whenever a value changes; a null value removes a key. Safe to call before boot: the bag is handed to every frame when it opens.
// Declare values before the loader runs…
window.meetonHiddenValues = { plan: "enterprise", campaign: "spring-webinar" };
// …or update them at any time afterwards.
window.Meeton.setHiddenValues({ plan: "pro" });The values reach every open frame at once: the chat, any ad or marketing popup, the calendar form and the Library. A key your page sets that is not a From your page field on the form is ignored, and a value for a field with options must match one of them exactly. window.meetonHiddenValues is read once, at boot; later edits to that object are ignored, so use setHiddenValues() for anything that changes.
Meeton.recordLead(fields) deprecated
Kept so older integrations do not break, but it is now a no-op: the form watcher identifies visitors from your forms automatically, so there is nothing left for this call to do. You can leave it in place or remove it.
Lifecycle: boot(), bootEngagedVisitor(), tearDown()
The loader boots itself on page load, and calls bootEngagedVisitor() itself two seconds later, or at once for a returning visitor. tearDown() removes the chat frame, closes the live connection and detaches the form and navigation watchers; it exists for tests. It does not restore the page to a clean state, and boot() after it is not a supported way to re-initialise. You will not normally call any of them.
Two readable fields: Meeton.booted (the boot sequence has started) and Meeton.engagedBooted (configuration and visitor data have loaded; the API is fully usable).
Forms the tag already understands
You do not need the API to identify visitors from your forms. The loader watches the forms already on your pages for recognised contact fields. A value is staged when the visitor leaves the field, or at once on submit, and becomes a contact only once the submission is confirmed: a HubSpot form's success message or redirect, a thank-you page you registered, or your CRM receiving it. Unrecognised fields are ignored, passwords and payment fields are never read, and watching stops once the visitor is known.
| Recognised as | From the field's type, name, id, placeholder or autocomplete |
|---|---|
type="email", autocomplete="email", or email, mail, メール in the name | |
| First name · last name | given-name, firstname, first_name, fname, 名 · family-name, lastname, last_name, surname, 姓 |
| Company | organization, company, org, 会社, 企業 |
| Phone | type="tel", phone, tel, mobile, 電話 |
| Title · department | organization-title, jobtitle, position, 役職 · department, dept, 部署 |
| Website | type="url", website, url, site |
| Your custom fields | An exact name attribute mapped under Lead form → form watcher mappings; inputs, selects and textareas. |
HubSpot forms get special handling. Both the legacy inline embed and the v4 forms embed are detected, including the redirect URL they announce on success, and the identity is forwarded to HubSpot's own tracking queue (_hsq) when the HubSpot script is present, so the HubSpot contact and the Meeton visitor line up. Salesforce Pardot forms are captured through the Pardot setup card under Settings → Setup → Installation.
Links from Meeton Email
Links in emails that Meeton sends carry a contact reference, dmContactId, in the query string. When the visitor lands, the loader ties the click to the visit that follows, so the chat already knows who it is talking to. Nothing is required on your side; keep the parameter if you rewrite URLs on arrival.
URL parameters the loader reads
| Parameter | Effect on arrival |
|---|---|
?calendarId=… | Opens that bookable calendar once the widget has booted. ID or slug. |
?downloadCenter | Opens the Library; add &docId=…&page=N&src=… for a specific document and page. |
?inquiryPanelOfferId=… | Opens that marketing offer's inquiry panel. |
?dmContactId=… | Ties the visit to a contact; added by Meeton Email automatically. |
?dynameet | Shows a browser alert, DynaMeet is installed, if the loader ran. The quickest installation check. |
?debug=1 | Draws a red border around the widget frame so you can see where it is. |
Only the first of calendarId, downloadCenter and inquiryPanelOfferId acts when several are present.
Single-page apps
The loader wraps the browser's history.pushState and replaceState and listens for popstate, so route changes in React, Vue, Next.js or Nuxt count as page views: page rules are re-applied, ads re-armed, the chat told about the new page, and a thank-you page confirmed. Install the snippet once in the shared shell and never re-insert it on navigation; a second copy produces two widgets.
Debugging
The loader logs through the debug library under the dynameet:* namespaces. Turn it on in the browser console and reload; make sure the console shows verbose messages:
localStorage.debug = "dynameet:*"; // then reload the page
// A healthy boot, in order:
// Meeton initialized.
// Document state is 'interactive'. Booting immediately.
// Booting Meeton (Execution started)...
// Meeton booting (basic) with teamId=… visitorId=…
// Meeton basic config loaded: {…}
// New visitor, will load messages after 2 seconds.
// Engaged visitor data loaded: {…}
localStorage.removeItem("debug"); // turn it off again| Namespace | What it covers |
|---|---|
dynameet:meeton | Boot, config, the API methods, URL changes |
dynameet:formWatcherManager | Your forms being watched, staged and confirmed |
dynameet:chat:* | The chat frame, WebSocket, calendar form, Library, marketing offers, ads |
dynameet:journeyManager | Meeton Ads journeys arming and firing |
Troubleshooting
| Symptom | Likely cause | Check |
|---|---|---|
| Nothing renders, no log lines at all | Page is plain HTTP, or an ad blocker blocks app.dynameet.ai | The Network tab: is meeton.js loaded at all? Try a private window. |
| Bot detected, Meeton will not start. | A headless browser, an automation driver, or a user agent containing bot, crawler or spider | Expected for crawlers and QA automation. Test in a normal browser. |
| teamId is not a valid UUID | Wrong, truncated or upper-case ID in the snippet | Copy the snippet again from Settings → Setup |
| Error occurred while fetching basic config, or No valid config found for this page | Hostname is not on the allow-list, or the team is paused or over its plan limit | Settings → Setup → Domains: add the exact host or a wildcard. Check Settings → Billing. |
| Cannot open chat before Meeton is booted. | Your code called the API on page load, before boot finished | Use the wait-for-ready pattern above, or call from a click handler. |
TypeError: Cannot read properties of undefined (reading 'openChat') | Your code ran before meeton.js evaluated | Guard with window.Meeton &&. |
| openChat() ignored: the launcher is hidden on this page. | A page rule, a per-domain override or the team-wide switch hides the widget here | Settings → Setup → Where Meeton shows up. |
| Widget loads, chat replies never arrive live | A corporate proxy blocks WebSockets | Allow wss://api-ws.dynameet.ai; chat still works over HTTPS meanwhile |
| Same person counted as two visitors | Safari cleared storage after 7 days without interaction, or a private window | See Browser behaviour, or pass your own visitor ID |
| Hidden values never reach the CRM | The key is not a From your page field on the form, or an option value does not match exactly | Lead form settings; the debug log prints the keys on every setHiddenValues() call. |
| Form submissions are not identified | The form watcher is off for the team, the field names are not recognised, or the visitor is already known | Map the fields under Lead form → form watcher mappings; look for staging disabled in the log. |
Frequently asked questions
Can we load the script ourselves instead of using the snippet?
Yes, as long as window.DynaMeetConfig is set before or shortly after the script runs; the loader waits for it. Load it from https://app.dynameet.ai/meeton.js every time rather than bundling a copy, so you get updates.
Is there a TypeScript definition?
Not as a package. The signatures on this page are copied from the loader's own interface; declare window.Meeton with them in your project.
Can our page talk to the inline chat embed through this API?
No. In the inline embed the loader runs inside DynaMeet's iframe on app.dynameet.ai, so your page has no window.Meeton for it. See Embed mode.
Does the API work while the launcher is hidden on a page?
openChat() does not; the others do. Hiding the launcher is a presentation rule, and the calendar, the Library and form capture keep working on such pages.
Why do we see WebSocket not open. Skipping heartbeat. in the console?
The live connection dropped and is reconnecting, or a proxy blocks it. The widget keeps working over HTTPS; only the live push waits.