SEARCH event
The event data object for a SEARCH event must include all the required attributes for event data objects plus the following attributes:
Attribute |
Type |
Description |
Example |
---|---|---|---|
|
string |
The product name the guest searched for. |
|
|
string (uppercase) |
The product type the guest searched for. |
|
After you create this event data object, you can optionally extend this event using the extension data object. Then, you can send the event using the Engage.event()
function.
Example 27. SEARCH event object
RequestResponse
const eventData = {
channel: "WEB",
currency: "EUR",
pointOfSale: "myretailsite/ireland",
language: "EN",
page: "search result page",
"product_name": "airSupport",
"product_type": "RUNNERS"
}
Example 28. SEARCH event object for flight search
RequestResponse
const eventData = {
channel: "WEB",
currency: "EUR",
pointOfSale: "myretailsite/ireland",
language: "EN",
page: "search result page",
product_name: "DUB-LHR",
product_type: "FLIGHT",
flight_type: "RT",
origin: "DUB",
destination: "LHR",
start: "2025-01-30T00:00",
end: "2025-02-01T00:00",
adults: 2,
children: 1,
infants: 0,
fare_class: "Economy",
fare_family: "Economy Plus"
};
const extensionData = {
onSale: false
};
engage.event("SEARCH", eventData, extensionData);