logBeginCheckout method

Future<void> logBeginCheckout({
  1. double value,
  2. String currency,
  3. String transactionId,
  4. int numberOfNights,
  5. int numberOfRooms,
  6. int numberOfPassengers,
  7. String origin,
  8. String destination,
  9. String startDate,
  10. String endDate,
  11. String travelClass,
})

Logs the standard begin_checkout event.

This event signifies that a user has begun the process of checking out. Add this event to a funnel with your logEcommercePurchase event to gauge the effectiveness of your checkout process. Note: If you supply the value parameter, you must also supply the currency parameter so that revenue metrics can be computed accurately.

See: https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event.html#BEGIN_CHECKOUT

Implementation

Future<void> logBeginCheckout({
  double value,
  String currency,
  String transactionId,
  int numberOfNights,
  int numberOfRooms,
  int numberOfPassengers,
  String origin,
  String destination,
  String startDate,
  String endDate,
  String travelClass,
}) {
  _requireValueAndCurrencyTogether(value, currency);

  return logEvent(
    name: 'begin_checkout',
    parameters: filterOutNulls(<String, dynamic>{
      _VALUE: value,
      _CURRENCY: currency,
      _TRANSACTION_ID: transactionId,
      _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,
    }),
  );
}