Skip to main content

Amelia Appointment Booking GTM Event Listener

Track Amelia appointment booking form interactions in GTM. Monitor booking step progression, service/staff selection, and confirmed bookings with ameliaAppointmentAction variable.

ameliawordpressbookingappointmentsschedulinggtmga4services

Event fired

ameliaAppointmentEvent

Key variable

ameliaAppointmentAction

Amelia Appointment Booking Form

Overview

Amelia is a powerful WordPress booking plugin for service businesses (salons, fitness studios, medical clinics, etc.). It supports multi-step booking flows with service selection, staff selection, and date/time picking. This listener tracks the complete booking funnel and confirmed appointments.

Event fired: ameliaAppointmentEvent Variable: ameliaAppointmentAction

Common Use Cases

  • Track confirmed bookings as primary conversions
  • Measure booking funnel step drop-off rates
  • Fire Google Ads conversion tags on appointment confirmation
  • Identify which services and staff members drive the most bookings
  • Build audiences of booked customers for upsell campaigns

Tracked Events

ameliaAppointmentActionDescription
booking step 1Service selection step
booking step 2Staff/provider selection
booking step 3Date/time selection
booking step 4Contact info entered
booking confirmedAppointment booked
booking failedBooking attempt failed

Installation

html
<!-- GTM Custom HTML Tag: Amelia Appointment Listener -->
<script>
(function() {
  function ameliaPush(action, extra) {
    window.dataLayer = window.dataLayer || [];
    window.dataLayer.push(Object.assign({
      'event': 'ameliaAppointmentEvent',
      'ameliaAppointmentAction': action
    }, extra || {}));
  }

  document.addEventListener('ameliaBookingStep', function(e) {
    var d = e && e.detail;
    ameliaPush('booking step ' + (d && d.step), {
      serviceId: d && d.serviceId,
      serviceName: d && d.serviceName,
      staffId: d && d.staffId,
      staffName: d && d.staffName
    });
  });

  document.addEventListener('ameliaBookingSuccess', function(e) {
    var d = e && e.detail;
    ameliaPush('booking confirmed', {
      bookingId: d && d.bookingId,
      serviceId: d && d.serviceId,
      serviceName: d && d.serviceName,
      staffName: d && d.staffName,
      appointmentDate: d && d.appointmentDate,
      appointmentTime: d && d.appointmentTime,
      bookingPrice: d && d.price,
      customerEmail: d && d.customerEmail
    });
  });

  document.addEventListener('ameliaBookingError', function(e) {
    ameliaPush('booking failed', { errorMessage: e && e.detail && e.detail.error });
  });
})();
</script>

Data Layer Output

Booking Confirmed

json
{
  "event": "ameliaAppointmentEvent",
  "ameliaAppointmentAction": "booking confirmed",
  "bookingId": "booking_123",
  "serviceId": "service_001",
  "serviceName": "60-min Massage",
  "staffName": "Sarah Johnson",
  "appointmentDate": "2024-02-20",
  "appointmentTime": "14:00",
  "bookingPrice": "85.00",
  "customerEmail": "client@example.com"
}

Triggers to Create

TriggerEventCondition
CE – Amelia Booking ConfirmedameliaAppointmentEventameliaAppointmentAction = booking confirmed
CE – Amelia Step ChangeameliaAppointmentEventameliaAppointmentAction contains booking step
CE – Amelia Booking FailedameliaAppointmentEventameliaAppointmentAction = booking failed

Variables to Capture

Variable NameDL KeyExample
DLV – Amelia ActionameliaAppointmentAction"booking confirmed"
DLV – Amelia Booking IDbookingId"booking_123"
DLV – Amelia ServiceserviceName"60-min Massage"
DLV – Amelia PricebookingPrice"85.00"
DLV – Amelia StaffstaffName"Sarah Johnson"

GA4 Mapping

GA4 EventTriggerParameters
book_appointmentBooking Confirmedappointment_id, service, staff, price
begin_checkoutStep 4 (contact info)service, price
view_itemStep 1 (service selection)service_name, price

Debugging

ProblemCauseFix
Events not firingAmelia JS events vary by versionCheck your Amelia version and event names
bookingId undefinedOld Amelia versionUse Amelia's built-in Google Analytics integration as fallback

Amelia's Built-in Integration Note

Amelia Pro has a native Google Analytics integration. However, it sends Universal Analytics (UA) events, not GA4. This listener gives you full GA4-compatible control.

Related Listeners