Overview

This reference provides a comprehensive list of all data layer variables available in the Linkage Direct booking engine GTM integration.

Event Types Reference

Event NameBooking StepDescription
initAll stepsInitial page load event
mirai.availabilityStep 1Rooms available for search
mirai.noAvailabilityStep 1No rooms available
mirai.cancellationStep 3Booking cancellation
Events prefixed with mirai. are technical implementation names and should not be modified in your GTM configuration.

Common Variables

These variables are present across multiple events:
VariableTypeEventsDescription
stepStringAllCurrent booking step identifier
homeStringAllHost domain name
hotelIdNumberAllUnique hotel identifier
chainIdNumberAllChain identifier (if applicable)
hotelNameStringMostDisplay name of the hotel
deviceStringAllDESKTOP_TABLET or MOBILE
languageStringMostISO 639-1 language code

Booking Information Variables

VariableTypeAvailable InDescription
checkinStringAvailability onwardsFormat: dd/mm/yyyy
checkoutStringAvailability onwardsFormat: dd/mm/yyyy
nightsNumberAvailability onwardsNumber of nights
countryStringMost eventsISO 3166 alpha-2 code
couponStringMost eventsPromotional code used
currencyStringStep 1 onwardsHotel’s base currency (ISO 4217)
userCurrencyStringStep 2-3Transaction currency

Pricing Variables

Total Pricing

VariableTypeDescription
totalPriceWithTaxesWithExtrasNumberComplete total including everything
totalPriceWithTaxesWithoutExtrasNumberRoom total with taxes, no extras
totalPriceWithoutTaxesWithExtrasNumberTotal with extras, excluding taxes
totalPriceWithoutTaxesWithoutExtrasNumberBase room price only

Component Pricing

VariableTypeDescription
totalExtrasWithTaxesNumberAll extras including taxes
totalExtrasWithoutTaxesNumberExtras excluding taxes
totalExtrasTaxesNumberTax amount on extras only
totalTaxesNumberAll taxes (rooms + extras)

Occupancy Variables

VariableTypeDescription
numRoomsNumberTotal rooms in booking
numAdultsNumberTotal adult guests
numChildrenNumberTotal children
numBabiesNumberTotal babies

Rate Information (Step 1)

Available in mirai.availability event:
{
  "lowestRate": {
    "roomName": String,
    "rateName": String,
    "boardName": String,
    "unitaryPriceWithOutTaxes": Number,  // Per night
    "priceWithTaxes": Number,            // Total
    "occupation": {
      "numAdults": Number,
      "numChildren": Number,
      "numBabies": Number
    }
  },
  "highestRate": {
    // Same structure as lowestRate
  }
}

Products Object (Steps 2-3)

Rooms Array Structure

{
  "rooms": [{
    "roomName": String,        // Room type name
    "rateName": String,         // Rate plan name
    "rateId": String,          // Unique rate identifier
    "boardName": String,       // Meal plan
    "priceWithoutTaxes": Number,
    "priceWithTaxes": Number,
    "unitaryPriceWithoutTaxes": Number,  // Average per night
    "numRooms": Number,
    "occupation": {
      "numAdults": Number,
      "numChildren": Number,
      "numBabies": Number
    }
  }]
}

Extras Array Structure

{
  "extras": [{
    "extraId": Number,         // Unique extra identifier
    "extraName": String,       // Display name
    "amount": Number,          // Quantity
    "nightsToApply": Number,   // Applicable nights
    "totalPriceWithTaxes": Number,
    "totalPriceWithoutTaxes": Number,
    "unitaryPriceWithTaxes": Number,
    "unitaryPriceWithoutTaxes": Number
  }]
}

Customer Information (Step 3 Only)

VariableTypeDescription
nameStringGuest first name
surnameStringGuest last name
emailStringGuest email
emailSHA256StringSHA-256 hashed email
state_provinceStringGuest state/province
cityStringGuest city

Reservation Details (Step 3)

VariableTypeDescription
reservationCodeStringUnique booking reference
reservationDateStringBooking creation date (dd/mm/yyyy)

Cancellation Variables

Available in mirai.cancellation event:
VariableTypeDescription
cancelDateStringDate of cancellation (dd/mm/yyyy)
cancelReasonStringNumeric code (1-5)
cancelCommentsStringFree text explanation

Cancel Reason Codes

{
  "1": "Not traveling",
  "2": "Booking another hotel",
  "3": "Found lower price",
  "4": "Needs reservation change",
  "5": "Other reasons"
}

Data Layer Access in GTM

Creating Variables

  1. Simple Variable:
    Variable Type: Data Layer Variable
    Data Layer Variable Name: hotelId
    
  2. Nested Variable:
    Variable Type: Data Layer Variable
    Data Layer Variable Name: mirai.data.lowestRate.priceWithTaxes
    
  3. Array Access:
    Variable Type: Data Layer Variable
    Data Layer Variable Name: products.rooms.0.roomName
    

Custom JavaScript Variables

For complex calculations:
function() {
  var rooms = {{products.rooms}};
  if (!rooms || !rooms.length) return 0;
  
  var totalRooms = 0;
  for (var i = 0; i < rooms.length; i++) {
    totalRooms += rooms[i].numRooms;
  }
  return totalRooms;
}

Debugging Tips

Support

For technical assistance with GTM integration: