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
ameliaAppointmentEventKey variable
ameliaAppointmentActionAmelia 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
| ameliaAppointmentAction | Description |
|---|---|
booking step 1 | Service selection step |
booking step 2 | Staff/provider selection |
booking step 3 | Date/time selection |
booking step 4 | Contact info entered |
booking confirmed | Appointment booked |
booking failed | Booking 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
| Trigger | Event | Condition |
|---|---|---|
| CE – Amelia Booking Confirmed | ameliaAppointmentEvent | ameliaAppointmentAction = booking confirmed |
| CE – Amelia Step Change | ameliaAppointmentEvent | ameliaAppointmentAction contains booking step |
| CE – Amelia Booking Failed | ameliaAppointmentEvent | ameliaAppointmentAction = booking failed |
Variables to Capture
| Variable Name | DL Key | Example |
|---|---|---|
| DLV – Amelia Action | ameliaAppointmentAction | "booking confirmed" |
| DLV – Amelia Booking ID | bookingId | "booking_123" |
| DLV – Amelia Service | serviceName | "60-min Massage" |
| DLV – Amelia Price | bookingPrice | "85.00" |
| DLV – Amelia Staff | staffName | "Sarah Johnson" |
GA4 Mapping
| GA4 Event | Trigger | Parameters |
|---|---|---|
book_appointment | Booking Confirmed | appointment_id, service, staff, price |
begin_checkout | Step 4 (contact info) | service, price |
view_item | Step 1 (service selection) | service_name, price |
Debugging
| Problem | Cause | Fix |
|---|---|---|
| Events not firing | Amelia JS events vary by version | Check your Amelia version and event names |
bookingId undefined | Old Amelia version | Use 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.