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
| Event | When it fires |
|---|---|
app_load | Booking form loaded |
pageview | A specific booking-form page was viewed (passes page_title) |
company - company info pages
| Event | When 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
| Event | When it fires |
|---|---|
branch_select | Branch selected |
resource_select | Resource (employee / room / equipment) selected |
service_select | Service selected |
event_select | Group-booking event selected |
date_select | Booking date and time selected |
record_create | Booking successfully created |
payment_success | Booking payment completed successfully |
payment_expire | Payment window for the booking expired |
client - sign-in and personal account
| Event | When it fires |
|---|---|
client_signin | Client signed in |
client_update | Client profile updated |
client_password_change | Client password changed |
client_sms_resend | Client requested another SMS confirmation |
rating_create | Booking review created |
record_cancel | Booking cancelled |
memberships - subscriptions
| Event | When it fires |
|---|---|
membership_created | Membership successfully purchased |
membership_payment_success | Membership 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:
| Event | When it fires |
|---|---|
ViewContent | A key page was viewed (about, profile, registration, payment, etc.) |
FindLocation | Branch list viewed / branch selected |
AddToCart | Service or resource added to a booking |
Schedule | Date and time selected |
InitiateCheckout | Group-event checkout started |
Purchase | Booking 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
srchost matches theWLAUNCH_ORIGINvalue in the listener above. If you serve the widget from a custom domain, updateWLAUNCH_ORIGINaccordingly. - 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.dataLayerlists all GTM events; in Network, filtercollectfor GA traffic andtr/?for Facebook Pixel.