> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usefrictionless.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Booking events

> Know when someone books, for analytics or your own thank-you screen.

Our form and your own form fire events on the element with `data-frictionless-booking`. They bubble, so you can listen on the document:

```js theme={null}
document.addEventListener("frictionless:booked", (e) => {
  // e.detail: { id, title, start, day, time }
  // start is an ISO time, like "2026-10-08T08:00:00.000Z"
  gtag("event", "booking", { value: 1 });
});

document.addEventListener("frictionless:error", (e) => {
  // e.detail: { message, field }  field is a box name, or null
});
```

On your own form, call `e.preventDefault()` in either listener to show the thank-you or the error yourself.

Booking from the chat's Book tab? Use `Frictionless.on("booking", fn)` instead: see [Control the chat](/website-chat/control#bookings).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.