> ## Documentation Index
> Fetch the complete documentation index at: https://sailia-mintlify-5b02008a.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Booking tracking events

> Track booking funnel activity with automatic GA4 e-commerce events sent to your analytics providers.

Sailia automatically fires tracking events at key points in the booking flow. If you have an analytics provider connected — such as Google Tag Manager or PostHog — these events are forwarded automatically, giving you visibility into how customers move through your booking funnel.

When events are forwarded to Google Tag Manager, they are pushed using **GA4 reserved e-commerce event names** (such as `view_item`, `add_to_cart`, `begin_checkout`, `add_payment_info`, and `purchase`). This means you can wire your GTM container up to Google Analytics 4 with no custom event mapping — Sailia's funnel slots straight into the prebuilt **Monetisation** and **Funnel exploration** reports.

## How it works

When a customer interacts with your booking page, Sailia sends events to every analytics provider you have configured. Each event includes contextual properties like the session name, ticket counts, and order value. You can use these events to build conversion funnels, retargeting audiences, and revenue attribution reports in your analytics tool.

<Note>
  Tracking events are only sent when at least one analytics provider is configured. See [supported providers](#supported-providers) below.
</Note>

## Booking funnel events

The following events fire automatically during the booking flow. The **Sailia event name** is the internal name fired into PostHog and the Sailia backend tracker. The **GA4 event name** is the name pushed into the GTM `dataLayer` so it slots directly into GA4's prebuilt e-commerce reports.

| Sailia event        | GA4 event          | When it fires                                 |
| ------------------- | ------------------ | --------------------------------------------- |
| `booking_grid_view` | `view_item_list`   | Customer views a list of available sessions   |
| `session_view`      | `view_item`        | Customer views a session's details            |
| `add_to_basket`     | `add_to_cart`      | Customer adds tickets to their basket         |
| `booking_start`     | `begin_checkout`   | Customer begins the booking process           |
| `pay_now_click`     | `add_payment_info` | Customer clicks **Pay now**                   |
| `booking_completed` | `purchase`         | Payment succeeds and the booking is confirmed |

<Info>
  The `purchase` event fires from the payment success page using the authoritative paid total returned by the server. GA4 deduplicates on `transaction_id` (the basket UUID), so refreshing the success page does **not** double-count the conversion.
</Info>

### Common event properties

Every event includes a relevant subset of these properties:

| Property           | Description                                                      |
| ------------------ | ---------------------------------------------------------------- |
| `session_id`       | The unique identifier of the activity session                    |
| `session_name`     | The display name of the activity session                         |
| `session_type`     | The type of session (e.g. course, hire, event)                   |
| `tickets_selected` | Number of tickets the customer selected                          |
| `value`            | Order value in **major currency units** (e.g. pounds, not pence) |
| `currency`         | ISO 4217 currency code (e.g. `GBP`)                              |
| `transaction_id`   | The basket UUID. Present on `purchase`. GA4 dedupes on this.     |
| `coupon`           | Comma-separated list of any discount codes applied to the order  |
| `payment_type`     | The payment method used (e.g. `card`, `pay_at_pos`)              |
| `tax`              | Order-level fees, in major currency units                        |

<Info>
  Sailia reports **order-level data only** — `value`, `currency`, `transaction_id`, `coupon`, and `payment_type`. Per-item product data (the GA4 `items[]` array) is intentionally not forwarded to your analytics tools.
</Info>

## Supported providers

Sailia supports the following analytics providers. Events are sent to all active providers simultaneously.

<AccordionGroup>
  <Accordion title="Google Tag Manager (GA4)">
    Connect your GTM container to receive booking events in the `dataLayer` using GA4-standard event names. Each commerce event is pushed with a structured `ecommerce` payload, so you can connect a GA4 configuration tag with no custom event mapping.

    Sailia follows GA4 best practice and clears the `ecommerce` object before each push so values don't bleed between events:

    ```json theme={null}
    [
      { "ecommerce": null },
      {
        "event": "purchase",
        "sailia_event": "booking_completed",
        "ecommerce": {
          "transaction_id": "b1f4a4e2-5a2c-4f0a-9d8b-1a2b3c4d5e6f",
          "value": 50.00,
          "currency": "GBP",
          "tax": 1.50,
          "coupon": "SUMMER10"
        },
        "basket_uuid": "b1f4a4e2-5a2c-4f0a-9d8b-1a2b3c4d5e6f",
        "basket_value": 50.00,
        "basket_currency": "GBP",
        "basket_coupon": "SUMMER10",
        "basket_payment_method": "card"
      }
    ]
    ```

    The original Sailia event name is preserved on every push as `sailia_event`, so you can still trigger custom tags off Sailia-specific names if you need to.

    ### Top-level basket fields

    To make it easy to fire **non-GA4** tags — Meta Pixel, Google Ads, TikTok, server-side custom tags — Sailia also mirrors the key e-commerce fields at the top level of the `dataLayer` push under explicit, Sailia-named keys. You don't need to dig into the structured `ecommerce` object to read them.

    | Top-level key           | Description                         | Events              |
    | ----------------------- | ----------------------------------- | ------------------- |
    | `basket_value`          | Order value in major currency units | All commerce events |
    | `basket_currency`       | ISO 4217 currency code              | All commerce events |
    | `basket_uuid`           | Unique transaction id               | `purchase` only     |
    | `basket_coupon`         | Discount codes applied              | `purchase` only     |
    | `basket_payment_method` | Payment method used                 | `purchase` only     |

    ### Cross-domain tracking

    If you provide your website URL alongside the GTM container, Sailia automatically configures cross-domain tracking between your website and your Sailia booking page. You can pass additional domains via the `linkerDomains` config option to extend the linker to other hostnames.

    ### User identification

    When a logged-in customer is on the booking page, Sailia pushes a `user_id` into the `dataLayer` once at GTM initialisation time. Anonymous and zero-value user ids are skipped, so you don't pollute reports with placeholder users.
  </Accordion>

  <Accordion title="PostHog">
    Connect your PostHog project to capture booking events as PostHog events. Sailia automatically identifies logged-in customers, so you can build funnels and cohorts based on booking behaviour.

    PostHog receives the **Sailia** event names (`booking_completed`, `add_to_basket`, etc.) — the GA4 mapping only applies to the GTM provider.
  </Accordion>
</AccordionGroup>

## Use cases

* **GA4 prebuilt reports** — events flow straight into GA4's **Monetisation** and **Funnel exploration** reports with no remapping
* **Conversion funnels** — track drop-off between `begin_checkout`, `add_payment_info`, and `purchase`
* **Revenue attribution** — `value` and `transaction_id` give you accurate ROAS in Google Ads and Meta Ads
* **Retargeting** — build audiences of customers who reached `add_to_cart` but did not `purchase`
* **Multi-tag firing** — use the top-level `basket_value` / `basket_uuid` keys to trigger Meta Pixel, Google Ads, and TikTok tags without parsing the GA4 `ecommerce` object

## Related guides

<Columns cols={2}>
  <Card title="Online bookings" icon="globe" href="/activities/online-bookings">
    How the booking flow works for customers.
  </Card>

  <Card title="Meter usage tracking" icon="chart-line" href="/api-reference/meter-tracking">
    Track server-side usage events with the meter API.
  </Card>
</Columns>
