The addCruiseReview
method passes information from your site to Monetate when a user adds a cruise to the cart. This method consists of seven required attributes and seven optional attributes.
Required Attributes
These attributes are required with the addCruiseReview
method:
adults
— An integer that includes the total number of adult passengers for the cruisedtBegin
— A string that includes the cruise's start date in YYYYMMDD formatdtEnd
— A string that includes the cruise's end date in YYYYMMDD formatguests
— An integer that includes the total number of adults and children for the cruisepid
— A string without spaces that includes an internal ID used to identify a cruisequantity
— An integer that includes the number of cruises booked, which is typically 1unitPrice
— A string that includes the cruise's price in the format XX.XX
Optional Attributes
These attributes are optional with the addCruiseReview
method:
dest
— A string that includes the cruise's port of destinationchildren
— An integer that includes the total number of child passengers for the cruiseport
— A string that includes the cruise's port of departurermClass
— A string that includes the type of room selected for the cruisermNumber
— A string or integer that includes the room number selected for the cruiseship
— A string that includes the name of the cruise shipcurrency
— A string in the ISO 4217 standard (three capital letters and no spaces) that includes the currency used to book the cruise
Code Sample
// addCruiseReview Method
window.monetateQ = window.monetateQ || [];
var reviewObject = {
// Required
'adults': [2],
'dtBegin': ['20161120'], // November 20, 2016
'dtEnd': ['20161215'], // December 15, 2016
'guests': [3],
// Optional
'children': [1],
'port': ['Port Royal'],
'dest': ['Tortuga'],
'ship': ['The Black Pearl'],
'rmClass': ['Captains Quarters'],
'rmNumber': [5]
};
window.monetateQ.push(['addCruiseReview',
reviewObject,
'ROYAL1',
1,
'300.00',
// Optional
'EUR'
]);
window.monetateQ.push(['trackData']);