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:
ParameterTypeDescription
stepStringAlways "CONFIRMATION"
reservationCodeStringUnique booking reference
reservationDateStringBooking creation date (dd/mm/yyyy)
nameStringGuest first name
surnameStringGuest last name
emailStringGuest email address
emailSHA256StringSHA-256 hashed email for privacy
state_provinceStringGuest state/province
cityStringGuest city
Privacy Note: The confirmation event includes personal information. Ensure your GTM implementation complies with GDPR and other privacy regulations.

Complete Example

{
  "step": "CONFIRMATION",
  "home": "www.hotelname.com",
  "hotelId": 10030559,
  "chainId": null,
  "hotelName": "Hotel Name",
  "device": "DESKTOP_TABLET",
  "language": "en",
  "checkin": "16/03/2024",
  "checkout": "19/03/2024",
  "nights": 3,
  "country": "US",
  "coupon": "",
  "currency": "EUR",
  "totalPrice": 318.4,  // Deprecated - use totalPriceWithTaxesWithExtras
  "totalPriceWithTaxesWithExtras": 318.4,
  "totalPriceWithTaxesWithoutExtras": 297,
  "totalPriceWithoutTaxesWithExtras": 289.45,
  "totalPriceWithoutTaxesWithoutExtras": 270,
  "totalExtrasWithTaxes": 21.4,
  "totalExtrasWithoutTaxes": 19.45,
  "totalExtrasTaxes": 1.95,
  "totalTaxes": 28.95,
  "numRooms": 1,
  "numAdults": 2,
  "numChildren": 0,
  "numBabies": 0,
  "name": "John",
  "surname": "Smith",
  "state_province": "California",
  "cityZone": "",
  "city": "Los Angeles",
  "email": "john.smith@example.com",
  "emailSHA256": "2308b48d90cd75da721cc12ae0eb06ca6a050ece28e9f06820c6586e7c097976",
  "reservationCode": "200312-99907",
  "reservationDate": "12/03/2024",
  "products": {
    "rooms": [{
      "roomName": "Double Room",
      "rateName": "Standard Rate",
      "rateId": "6359|28970b0|0",
      "boardName": "Room Only",
      "priceWithoutTaxes": 270,
      "priceWithTaxes": 297,
      "unitaryPriceWithoutTaxes": 90,
      "numRooms": 1,
      "occupation": {
        "numAdults": 2,
        "numChildren": 0,
        "numBabies": 0
      }
    }],
    "extras": [{
      "extraId": 840,
      "extraName": "Champagne Bottle",
      "amount": 1,
      "nightsToApply": 1,
      "totalPriceWithTaxes": 21.40,
      "totalPriceWithoutTaxes": 19.45,
      "unitaryPriceWithTaxes": 21.40,
      "unitaryPriceWithoutTaxes": 19.45
    }]
  }
}

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

ParameterTypeDescription
stepStringAlways "CANCELLATION"
homeStringHost domain
hotelIdNumberHotel identifier
chainIdNumberChain identifier
hotelNameStringHotel name
deviceStringDevice type used for cancellation
languageStringInterface language
checkinStringOriginal check-in date
checkoutStringOriginal check-out date
nightsNumberNumber of nights
reservationCodeStringBooking reference
reservationDateStringOriginal booking date
cancelDateStringCancellation date
cancelReasonStringReason code (see below)
cancelCommentsStringAdditional comments

Cancellation Reason Codes

CodeDescription
1Not traveling
2Booking another hotel
3Found lower price
4Reservation change needed
5Other reasons

Example Data Layer

{
  "step": "CANCELLATION",
  "home": "www.hotelname.com",
  "hotelId": 10030559,
  "chainId": null,
  "hotelName": "Hotel Name",
  "device": "DESKTOP_TABLET",
  "language": "en",
  "checkin": "16/03/2024",
  "checkout": "19/03/2024",
  "nights": 3,
  "reservationCode": "200305-63571",
  "reservationDate": "15/06/2024",
  "cancelDate": "11/07/2024",
  "cancelReason": "3",  // Found lower price
  "cancelComments": "Found better rate on another website"
}

Conversion Tracking Setup

Advanced Analytics

Booking Window Analysis

Calculate days between reservationDate and checkin to understand booking patterns

Cancellation Rate

Track mirai.cancellation events against confirmations for cancellation insights

Revenue 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 tracking
2

Enhanced Conversions

Utilize emailSHA256 for Google Ads enhanced conversions while maintaining privacy
3

Revenue Attribution

Track both totalPriceWithTaxesWithExtras (for revenue) and totalPriceWithoutTaxesWithoutExtras (for net revenue)
4

Cancellation Insights

Analyze cancelReason codes to identify improvement opportunities
Important: The totalPrice field is deprecated. Always use totalPriceWithTaxesWithExtras for accurate revenue tracking.