logSearch method
Logs the standard search
event.
Apps that support search features can use this event to contextualize search operations by supplying the appropriate, corresponding parameters. This event can help you identify the most popular content in your app.
Implementation
Future<void> logSearch({
@required String searchTerm,
int numberOfNights,
int numberOfRooms,
int numberOfPassengers,
String origin,
String destination,
String startDate,
String endDate,
String travelClass,
}) {
return logEvent(
name: 'search',
parameters: filterOutNulls(<String, dynamic>{
_SEARCH_TERM: searchTerm,
_NUMBER_OF_NIGHTS: numberOfNights,
_NUMBER_OF_ROOMS: numberOfRooms,
_NUMBER_OF_PASSENGERS: numberOfPassengers,
_ORIGIN: origin,
_DESTINATION: destination,
_START_DATE: startDate,
_END_DATE: endDate,
_TRAVEL_CLASS: travelClass,
}),
);
}