addHotelSearch

The addHotelSearch method passes information from your site to Monetate when a customer searches for a hotel. This method consists of 13 optional attributes.

  • adults — An integer that includes the total number of adults staying in a hotel room
  • airport — A string that includes the three-character airport code to search for adjacent airports
  • airportCodeCity — A string that includes the adjacent city for the airport included in airport
  • checkIn — A string that includes the check-in date for the hotel stay in YYYYMMDD format
  • checkOut — A string that includes the check-out date for the hotel stay in YYYYMMDD format
  • children — An integer that includes the total number of children staying in a hotel room
  • city — A string that includes the city where a hotel was searched for
  • country — A string that includes the country where a hotel was searched for
  • guests — An integer that includes the total number of adults and children staying in a hotel room
  • postalCode — A string that includes the postal code where a hotel was searched for
  • rooms — An integer that includes the total number of hotel rooms searched for
  • region — A string that includes the state, province, or region where a hotel was searched for
  • type — A string that includes the type of hotel room searched for

Although none of these attributes are required, you should include as many as possible to use hotel search targets.

Code Sample

// addHotelSearch Method
window.monetateQ = window.monetateQ || [];
window.monetateQ.push(['addHotelSearch', {
  // Optional
  'adults': [2],
  'airport': ['LHR'],
  'checkIn': ['20160212'], // February 12, 2016
  'checkOut': ['20160224'], // February 24, 2016
  'children': [1],
  'city': ['London'],
  'country': ['United Kingdom'],
  'guests': [3],
  'postalCode': ['WW1'],
  'rooms': [1],
  'region': ['London'],
  'type': ['Single', 'Double']
}]);
window.monetateQ.push(['trackData']);