Tracking online booking events

Events you can track in Google Analytics, Google Tag Manager and Facebook Pixel, and how to wire up the integration.

Configuration is done under Online Booking - Settings

Provide one or more keys. Event and pageview tracking happens automatically.

Available options:

  • Google Analytics (Example: G-1234567890 / UA-1234567890)
  • Google Tag Manager (Example: GTM-1234567890)
  • Facebook Pixel (Example: 1234567890)

Google Tag Manager - custom events

All events are pushed to window.dataLayer in the following shape:

{
  event: '<event_name>',
  event_category: '<category>',
  // additional fields depending on the event
}

The event field is what you use as a GTM trigger; event_category is convenient for grouping in reports.

general - general-purpose events

EventWhen it fires
app_loadBooking form loaded
pageviewA specific booking-form page was viewed (passes page_title)

company - company info pages

EventWhen it fires
about_view"About the company" page viewed
license_view"Public offer agreement" page viewed
privacy_view"Privacy policy" page viewed
cancellation_policy_view"Cancellation policy" page viewed

booking - booking creation flow

EventWhen it fires
branch_selectBranch selected
resource_selectResource (employee / room / equipment) selected
service_selectService selected
event_selectGroup-booking event selected
date_selectBooking date and time selected
record_createBooking successfully created
payment_successBooking payment completed successfully
payment_expirePayment window for the booking expired

client - sign-in and personal account

EventWhen it fires
client_signinClient signed in
client_updateClient profile updated
client_password_changeClient password changed
client_sms_resendClient requested another SMS confirmation
rating_createBooking review created
record_cancelBooking cancelled

memberships - subscriptions

EventWhen it fires
membership_createdMembership successfully purchased
membership_payment_successMembership payment completed successfully

Facebook Pixel - standard events

Facebook Pixel emits standard Meta events with context-aware payloads. This is a separate stream from the GTM custom events above, so in Meta Events Manager you'll see exactly these names:

EventWhen it fires
ViewContentA key page was viewed (about, profile, registration, payment, etc.)
FindLocationBranch list viewed / branch selected
AddToCartService or resource added to a booking
ScheduleDate and time selected
InitiateCheckoutGroup-event checkout started
PurchaseBooking or membership created and paid (if payment is required - fires on successful payment; if no payment - fires at creation)

Note: Facebook Pixel does not support UAH, so the widget automatically substitutes EUR in event parameters when the currency is UAH. Other currencies pass through unchanged.

Embedding the widget on your site

The booking widget runs inside an <iframe>, so events do not reach the host page's dataLayer directly. The widget instead forwards each event to the parent window via postMessage:

{
  event: 'pushGTMEvent',
  data: '<json-string with the event payload>'
}

To make those events show up in your site's GTM / GA, add a listener. Important: validate event.origin so only messages from the widget iframe are accepted - otherwise any other iframe, embedded widget, or browser extension on your page can inject arbitrary events (including spoofed Purchase) into your dataLayer.

<script>
  // Origin where the Wlaunch widget is hosted. Replace with your custom widget domain if you use one.
  var WLAUNCH_ORIGIN = 'https://w.wlaunch.net';
  window.addEventListener('message', function (event) {
    if (event.origin !== WLAUNCH_ORIGIN) return;
    if (!event.data || event.data.event !== 'pushGTMEvent') return;
    window.dataLayer = window.dataLayer || [];
    try {
      window.dataLayer.push(JSON.parse(event.data.data));
    } catch (e) {
      console.warn('Wlaunch: failed to parse pushGTMEvent payload', e);
    }
  });
</script>

After this, every event from the tables above will be available in your host-page GTM container.

How to verify events are arriving

  • Origin check: in DevTools, confirm the iframe src host matches the WLAUNCH_ORIGIN value in the listener above. If you serve the widget from a custom domain, update WLAUNCH_ORIGIN accordingly.
  • Google Tag Manager: open GTM Preview mode and walk through the widget - events should appear in the Data Layer tab.
  • Google Analytics 4: the Realtime report should show an active user and events within 1-2 minutes.
  • Facebook Pixel: install the Meta Pixel Helper Chrome extension - it lists every event sent from the current page.
  • DevTools: in the browser console, window.dataLayer lists all GTM events; in Network, filter collect for GA traffic and tr/? for Facebook Pixel.