Overview
The confirmation page (Booking Step 3) is the most critical tracking point, capturing successful reservations and cancellations. This data is essential for conversion tracking, revenue reporting, and customer insights.Event: init (Confirmation)
Fires when a booking is successfully completed.Trigger Condition
- User completes a reservation and reaches the confirmation page
Data Layer Structure
The confirmation event includes all booking details plus customer information:- Reservation Info
- Booking Details
Parameter | Type | Description |
---|---|---|
step | String | Always "CONFIRMATION" |
reservationCode | String | Unique booking reference |
reservationDate | String | Booking creation date (dd/mm/yyyy) |
name | String | Guest first name |
surname | String | Guest last name |
email | String | Guest email address |
emailSHA256 | String | SHA-256 hashed email for privacy |
state_province | String | Guest state/province |
city | String | Guest city |
Privacy Note: The confirmation event includes personal information. Ensure your GTM implementation complies with GDPR and other privacy regulations.
Complete Example
Event: mirai.cancellation
Triggered when a guest cancels their reservation.The event name
mirai.cancellation
is part of the technical implementation and must be used exactly as shown in your GTM triggers.Trigger Condition
- Guest accesses booking management and cancels their reservation
Data Layer Parameters
Parameter | Type | Description |
---|---|---|
step | String | Always "CANCELLATION" |
home | String | Host domain |
hotelId | Number | Hotel identifier |
chainId | Number | Chain identifier |
hotelName | String | Hotel name |
device | String | Device type used for cancellation |
language | String | Interface language |
checkin | String | Original check-in date |
checkout | String | Original check-out date |
nights | Number | Number of nights |
reservationCode | String | Booking reference |
reservationDate | String | Original booking date |
cancelDate | String | Cancellation date |
cancelReason | String | Reason code (see below) |
cancelComments | String | Additional comments |
Cancellation Reason Codes
Code | Description |
---|---|
1 | Not traveling |
2 | Booking another hotel |
3 | Found lower price |
4 | Reservation change needed |
5 | Other reasons |
Example Data Layer
Conversion Tracking Setup
Google Ads Conversion
Google Ads Conversion
GA4 E-commerce Purchase
GA4 E-commerce Purchase
Facebook Pixel
Facebook Pixel
Advanced Analytics
Booking Window Analysis
Calculate days between
reservationDate
and checkin
to understand booking patternsCancellation Rate
Track
mirai.cancellation
events against confirmations for cancellation insightsRevenue Per Guest
Divide
totalPriceWithTaxesWithExtras
by total occupancy (adults + children)Lead Time Tracking
Monitor how far in advance guests book for demand forecasting
Best Practices
1
Deduplication
Use
reservationCode
as a unique transaction ID to prevent duplicate conversion tracking2
Enhanced Conversions
Utilize
emailSHA256
for Google Ads enhanced conversions while maintaining privacy3
Revenue Attribution
Track both
totalPriceWithTaxesWithExtras
(for revenue) and totalPriceWithoutTaxesWithoutExtras
(for net revenue)4
Cancellation Insights
Analyze
cancelReason
codes to identify improvement opportunitiesImportant: The
totalPrice
field is deprecated. Always use totalPriceWithTaxesWithExtras
for accurate revenue tracking.