Settings & configuration

Track TableGo bookings in Google Analytics, Google Ads and Meta

Use the embedded booking widget event to track confirmed reservations as conversions.

Works onBasicProUpdated 6 Nov 20265 min read

When the TableGo booking widget is embedded on your website, normal page-view tracking cannot always see when a guest completes a reservation because the booking flow runs inside TableGo.

To help with this, TableGo can send a browser message to your website when a booking is fully confirmed. Your developer or agency can use this message to trigger GA4, Google Ads or Meta conversion tags.

When the event fires#

TableGo sends a browser message only when all of the following are true:

  • The guest started the booking from your embedded widget on your website
  • The reservation status is confirmed
  • Any required deposit is paid, or any required card guarantee is saved
  • The same booking has not already been counted in this browser session

Important

The confirmed-booking event does not fire on page loads, abandoned forms or bookings still waiting for email confirmation. If guests must confirm by email before the booking becomes final, the confirmed conversion is not sent to your website in v1.

Pending bookings (lead event)#

If your reservation policy requires email confirmation, the booking starts as pending. In that case TableGo also sends a separate "booking started" lead event from the widget so you can still track interest. Treat this as a Lead, not a confirmed booking — some pending bookings are never confirmed.

  • tablego:booking_started is the browser message sent for a pending booking.
  • tablego_booking_started is the dataLayer event you can use in GTM or GA4 for a Lead.
  • Tip: if you'd rather only count confirmed bookings, require a deposit or card guarantee for all bookings instead of email confirmation — saving the card confirms the booking inside the flow, so the confirmed conversion fires.

Where to start#

  1. 1

    Add the booking widget to your website

    In TableGo Business, go to Settings → Website & Integrations and copy your Website Embed (Iframe) code. Add the whole code, the iframe and its script, to the page where guests make bookings.

  2. 2

    Add the conversion listener

    Ask your web developer to add the example listener below to the same page that contains the TableGo iframe. The listener receives the confirmed-booking event from the widget and pushes it into your website's dataLayer.

  3. 3

    Connect your conversion tags

    In Google Tag Manager, GA4, Google Ads or Meta, use the dataLayer event tablego_booking_confirmed to trigger your conversion tags.

Example listener#

There are two event names used here:

  • tablego:booking_confirmed is the browser message sent by TableGo.
  • tablego_booking_confirmed is the dataLayer event your website can use in GTM or GA4.
JavaScript
window.addEventListener('message', (event) => {
  if (event.origin !== 'https://tablego.uk') return;
  if (event.data?.type !== 'tablego:booking_confirmed') return;

  // GTM / GA4 event name: tablego_booking_confirmed
  window.dataLayer = window.dataLayer || [];
  window.dataLayer.push({ event: 'tablego_booking_confirmed', ...event.data });

  // Meta Pixel example — choose the event name used in your campaign
  // fbq('track', 'Lead', { content_name: event.data.restaurant });
});

Event payload#

The message type is tablego:booking_confirmed. It includes the restaurant identifier (slug and short ID, e.g. restaurant-name--abc123), the TableGo reservation ID, party size, date, time and whether a deposit or card guarantee was used. This payload is intentionally limited to non-personal booking data.

Guest names, emails, phone numbers, payment details, Stripe IDs and booking tokens are never included.

Payload
{
  type: 'tablego:booking_confirmed',
  version: 1,
  restaurant: 'restaurant-name--abc123',
  reservationId: '550e8400-e29b-41d4-a716-446655440000',
  partySize: 4,
  date: '2026-06-20',
  time: '19:30',
  source: 'widget_embed',
  protection: 'deposit'
}

Deposits and card guarantees#

When the widget is embedded, a booking that needs a deposit or card guarantee continues in a new TableGo browser tab, because Stripe can't run inside your website. The guest finishes the booking and pays or saves their card there.

TableGo will try to deliver the conversion event back to the original website tab automatically, so your developer usually does not need extra code for this flow.

The original website tab must remain open. If the guest closes the original website tab before completing the payment or card step, the conversion event may not be delivered back to your website.

If you feature events in your booking widget, a click on an event card sends tablego:event_promo_click (dataLayer event: tablego_event_promo_click) with restaurant, eventId, position (1 is the first card), salesState (on_sale, not_on_sale_yet or sold_out) and source: "widget_embed".

Note

Treat it as an engagement event, not a purchase. The event page opens in a new tab, and ticket sales aren't sent to your website.

Gift vouchers#

A click on "Gift vouchers" in your booking widget sends tablego:voucher_promo_click (dataLayer event: tablego_voucher_promo_click) with restaurant, layout (compact under What's on, or card), voucherCount and source: "widget_embed".

Note

Treat it as an engagement event, not a purchase. Vouchers are bought in a new tab, and voucher sales aren't sent to your website.

Testing#

  1. 1

    Add the listener

    Copy the example listener from this guide and add it to the page where the widget is embedded.

  2. 2

    Complete a test booking

    Make a reservation through the widget on your site.

  3. 3

    Verify one event

    Your developer should see exactly one tablego:booking_confirmed message. Refreshing the confirmation page should not send a duplicate.

  4. 4

    Cancel the test booking

    Remove the test reservation from your dashboard when finished.

Note

Conversion tracking only works for the embedded widget on your website. Direct TableGo links and TableGo Page bookings do not send events to your website.
About this featureBooking widget & websiteTake bookings on your website, your booking link and your TableGo page, with live times, your experiences and What's on.

Still need help?

Can't find what you need? Email us and we'll reply within 24 hours.