Analytics & tags

GA4 conversion tracking for Microsoft Bookings

GA4 cannot see bookings made on the standard Microsoft Bookings page, so booked appointments show up nowhere in your reports. With the BookingsXP widget on your page, a confirmed booking becomes a generate_lead event in your own GA4 property, credited to the session and campaign that brought the visitor.

Plan
Plan: FreeWorks on every plan, including Free ($0, no card).
In short
generate_lead on every confirmed booking, plus view, slot and form-start events, sent through your gtag.
Microsoft Bookings
Stays your system of record. Bookings land in Outlook and Teams and Microsoft sends the invites and reminders.

How it works

What happens with Google Analytics 4

  • Add your GA4 measurement ID (G-XXXXXXXXXX) in the widget's Tracking tab. It travels with each widget event, so there is nothing to configure on the page itself.
  • When window.gtag exists on the page, the loader calls gtag('event', name, { send_to, service_name, staff_name, value, currency }) for four steps.
  • widget_viewed becomes bookingsxp_view, slot_selected becomes bookingsxp_slot, form_started becomes bookingsxp_form_start, and booking_completed becomes both generate_lead and bookingsxp_booked.
  • value and currency come from the service's price in Microsoft Bookings; parameters with no value are left out rather than sent empty.
  • The other six steps are not sent to GA4 directly. Use Google Tag Manager on the dataLayer if you want them.

Setup

Set up Google Analytics 4

5 steps. Names of menus and buttons are as they appear today; vendors rename things, so look for the closest match.
  1. Step 1: Check that gtag.js is on the page

    The direct route uses the global gtag function from the Google tag. If GA4 is installed only through Google Tag Manager, window.gtag usually does not exist; use the GTM route instead (see the Google Tag Manager integration).

    Google tag (already on most sites)
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
      gtag('config', 'G-XXXXXXXXXX');
    </script>
  2. Step 2: Add the measurement ID to the widget

    Dashboard → your widget → Tracking → Google Tag Manager & GA4 → GA4 measurement ID. Paste the G- ID from GA4 Admin → Data streams and save.

  3. Step 3: Mark generate_lead as a key event

    In GA4 Admin → Events (or Key events), mark generate_lead as a key event once it has arrived. If you already use generate_lead for other forms, mark bookingsxp_booked instead so bookings stay separate.

  4. Step 4: Register the parameters

    Admin → Custom definitions → Create custom dimension, scope Event, for service_name and staff_name. Without this, GA4 collects the values but will not show them in standard reports.

  5. Step 5: Verify in DebugView

    Connect Tag Assistant (tagassistant.google.com) to your booking page and watch Admin → DebugView as you step through the widget. Cancel the test appointment in Bookings afterwards.

Outcomes and caveats

What you get

The result

  • Booked appointments in GA4 as generate_lead, attributed to the real source, medium and campaign of the visit.
  • A four-step funnel (view, slot chosen, form started, booked) you can build as a funnel exploration.
  • Revenue on the event when your Bookings services have prices.
  • Service and staff names on each event for breakdowns by appointment type.

Good to know

Limits and caveats

  • Needs window.gtag on the page. A GTM-only install should use the GTM route instead.
  • Only four steps are sent directly; the rest are on the dataLayer for GTM.
  • Events are only sent from the script embed, framework components and WordPress plugin. A plain iframe cannot call your gtag.
  • If you both set the measurement ID and send the same events from GTM, GA4 counts them twice.

FAQ

Google Analytics 4 questions

Something not covered? Email hello@bookingsxp.com.

Start free, no card

One widget, three templates, GTM and GA4 events and attribution in every booking. No card, no time limit.