Recommended ride-hailing app events

At a glance: Measure the quality of your users throughout their user journey by recording these suggested in-app events for your ride-hailing app.

InApp_Events_ride.png Ride-hailing

Ride-hailing has become very popular recently, especially in urban areas where most residents don't own a car. The typical events that we suggest recording are ride requests and bookings.

Recording events can help you determine:

  • How passengers and drivers interact
  • Countries where more people use your ride-hailing service
  • Metrics about price, rides, and ride distance

For more information about recording in-app events, see the Rich in-app events guide.

Flowchart_for_recommended_events_ride_hailing_app_user_journey

Recommended structures for predefined events

The following section provides a list of event structures that are typical to the ride-hailing vertical. Each structure includes a predefined event name and the suggested event parameters to use. Note that in-app events can include any event parameters that meet your business needs.

Complete registration (af_complete_registration)

Purpose

This event can help you:

  • Learn what sign-up method your users prefer
  • Understand how many users actually sign up after downloading and installing the app
  • See registration trends across countries to determine the countries whose users are most likely to use your app

Trigger

When the user completes the signup process

Event parameters

Name Description Example value
af_registration_method Platform or method through which the user signs up Facebook
country_code Country code (phone code) 66

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.REGSITRATION_METHOD, "shoes");
eventValue.put("country_code", "66");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), AFInAppEventType.COMPLETE_REGISTRATION, eventValue);

Login (af_login)

Purpose

Understand the retention of your registered users

Trigger

When the user successfully logs in

Event parameters

Can be sent without any additional parameters

Code examples

Android iOS - Objective C iOS - Swift Unity

AppsFlyerLib.getInstance().logEvent(getApplicationContext(), AFInAppEventType.LOGIN, null);

Add payment info (af_add_payment_info)

Purpose

Helps you categorize users. You can: 

  • Learn how long it takes a user to add their payment info
  • What payment methods are most popular, for example, credit card or e-Wallets 
  • Set up campaigns and collaborate with popular payment method providers

Trigger

When the user successfully adds payment info to their account

Event parameters

Name Description Example value
af_success Whether the payment method is successful true
credit_card_type Credit card type (optional) Visa, Mastercard
payment_method_type Type of payment method credit card, e-wallet

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.SUCCESS, true);
eventValue.put("credit_card_type", "Visa");
eventValue.put("payment_method_type", true);
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), AFInAppEventType.ADD_PAYMENT_INFO, eventValue);

Spent credits (af_spent_credits)

Purpose

The Ride booking completed event includes a parameter named credits_earned. This parameter logs the credits that a passenger earns for each ride. Passengers can trade credits for vouchers and discounts.

This event can help you:

  • See how many passenger trade credits for vouchers
  • See what sort of vouchers and discounts passengers prefer

Trigger 

When a passenger spends credits

Event parameters

Name Description Example value
af_content Type of voucher or discount Single movie ticket
credits_used How many credits used 1000
credits_remaining How many credits left in the account 2090
invoice_id Invoice ID of the invoice that is created for spending credits KO215123SD

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.CONTENT, "Single movie ticket");
eventValue.put("credits_used", 1000);
eventValue.put("invoice_id", "");
eventValue.put("credits_remaining", "KO215123SD");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), AFInAppEventType.SPENT_CREDITS , eventValue);

Recommended structures for custom events

The following section provides a list of event structures that include custom event names and the suggested event parameters to use. Note that in-app events can include any event parameters that meet your business needs.

Ride booking requested (ride_booking_requested)

Purpose

This event can help you:

  • Learn about popular destinations
  • Learn about trends, where people ride to and from where
  • See the average distance of a ride
  • See what cities, regions, and countries most users come from

In addition, recording this event along with the other booking-related events can help you record successful transactions. Then, you can compare successful transactions with unsuccessful transactions. For example, you can see how many ride bookings are requested and how many ride bookings are completed or canceled.

Trigger 

When the passenger created a ride-booking request

Event parameters

Name Description Example value
af_price Quoted price for the ride 22.4
af_currency Currency SGD
af_destination_a Point of departure Plaza Singapura
af_destination_b Point of arrival Marina Bay Sands
distance Distance between the two destinations 5.2
af_content_type Type of transportation Taxi
payment_method_type Type of payment method credit card, e-wallet
af_city City where the ride is booked Singapore
af_region Region where the ride is booked SFA
af_country Country where the ride is booked Singapore
order_id Order ID 135790

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.PRICE, 22.4);
eventValue.put(AFInAppEventParameterName.CURRENCY, "SGD");
eventValue.put(AFInAppEventParameterName.DESTINATION_A, "Plaza Singapura");
eventValue.put(AFInAppEventParameterName.DESTINATION_B, "Marina Bay Sands");
eventValue.put("distance", 5.2);
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "Taxi");
eventValue.put("payment_method_type", "credit card");
eventValue.put("notes", "Taxi stand");
eventValue.put(AFInAppEventParameterName.CITY, "Singapore");
eventValue.put(AFInAppEventParameterName.REGION, "SFA");
eventValue.put(AFInAppEventParameterName.COUNTRY, "Singapore");
eventValue.put("af_order_id", "135790");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), "ride_booking_requested", eventValue);

Ride booking confirmed (ride_booking_confirmed)

Purpose

This event can help you:

  • Learn who the most active drivers are
  • See what destinations are common among drivers
  • See the average and overall ride prices for each driver

In addition, recording this event along with the other three booking-related events can help you better understand driver activity. You can see, for example, which drivers confirm the most ride-booking requests, and which drivers choose short rides as opposed to long rides.

Trigger 

When the booking is accepted by a driver

Event parameters

Name Description Example value
af_price Quoted price for the ride 22.4
af_currency Currency SGD
af_destination_a Point of departure Plaza Singapura
af_destination_b Point of arrival Marina Bay Sands
distance Distance between the two destinations 5.2
af_content_type Type of transportation Taxi
driver_id ID of the driver who confirmed doing the ride 1706
payment_method_type Type of payment method credit card, e-wallet
af_city City where the ride is booked Singapore
af_region Region where the ride is booked SFA
af_country Country where the ride is booked Singapore
af_order_id Order ID 135790

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.PRICE, 22.4);
eventValue.put(AFInAppEventParameterName.CURRENCY, "SGD");
eventValue.put(AFInAppEventParameterName.DESTINATION_A, "Plaza Singapura");
eventValue.put(AFInAppEventParameterName.DESTINATION_B, "Marina Bay Sands");
eventValue.put("distance", 5.2);
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "Taxi");
eventValue.put("driver_id", "1706");
eventValue.put("payment_method_type", "credit card");
eventValue.put("notes", "Taxi stand");
eventValue.put(AFInAppEventParameterName.CITY, "Singapore");
eventValue.put(AFInAppEventParameterName.REGION, "SFA");
eventValue.put(AFInAppEventParameterName.COUNTRY, "Singapore");
eventValue.put("af_order_id", "135790");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), "ride_booking_confirmed", eventValue);

Ride booking canceled (ride_booking_canceled)

Purpose

This event can help you:

  • Log drivers or passengers that constantly cancel
  • Learn how many rides are canceled
  • Correlate cancellation rate with attributes such as price, destination, distance, and cities
  • Learn the reasons why a ride is canceled

Trigger 

When the booking is canceled

Event parameters

Name Description Example value
af_price Quoted price for the ride 22.4
af_currency Currency SGD
af_destination_a Point of departure Plaza Singapura
af_destination_b Point of arrival Marina Bay Sands
distance Distance between the two destinations 5.2
af_content_type Type of transportation Taxi
driver_id ID of the driver who confirmed doing the ride 1706
cancelation_reason Reason the ride is canceled price is too high, driver didn't show up, passenger didn't show up
payment_method_type Type of payment method credit card, e-wallet
af_city City where the ride is booked Singapore
af_region Region where the ride is booked SFA
af_country Country where the ride is booked Singapore
order_id Order ID 135790
canceled_by Whether the ride is canceled by the passenger or driver Passenger

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.PRICE, 22.4);
eventValue.put(AFInAppEventParameterName.CURRENCY, "SGD");
eventValue.put(AFInAppEventParameterName.DESTINATION_A, "Plaza Singapura");
eventValue.put(AFInAppEventParameterName.DESTINATION_B, "Marina Bay Sands");
eventValue.put("distance", 5.2);
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "Taxi");
eventValue.put("driver_id", "1706");
eventValue.put("cancellation_reason", "driver didn't show up");
eventValue.put("payment_method_type", "credit card");
eventValue.put("notes", "Taxi stand");
eventValue.put(AFInAppEventParameterName.CITY, "Singapore");
eventValue.put(AFInAppEventParameterName.REGION, "SFA");
eventValue.put(AFInAppEventParameterName.COUNTRY, "Singapore");
eventValue.put("af_order_id", "135790");
eventValue.put("canceled_by", "passenger");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), "ride_booking_canceled", eventValue);

Ride booking completed (ride_booking_completed)

Purpose

This event can help you:

  • Learn about passenger spending and driver earnings
  • Correlate completed rides with attributes such as destination, distance, payment type, and driver ID
  • See the average and overall distance for drivers and passengers
  • Compare completed rides with canceled ones
  • Log and record the score of drivers

Trigger 

When the journey is complete

Event parameters

Name Description Example value
af_price Quoted price for the ride 22.4
af_currency Currency SGD
af_destination_a Point of departure Plaza Singapura
af_destination_b Point of arrival Marina Bay Sands
distance Distance between the two destinations 5.2
af_content_type Type of transportation Taxi
driver_id ID of the driver who confirmed doing the ride 1706
payment_method_type Type of payment method credit card, e-wallet
af_city City where the ride is booked Singapore
af_region Region where the ride is booked SFA
af_country Country where the ride is booked Singapore
order_id Order ID 135790
credits_earned Credits that the passenger earned for completing a ride 248

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.PRICE, 22.4);
eventValue.put(AFInAppEventParameterName.CURRENCY, "SGD");
eventValue.put(AFInAppEventParameterName.DESTINATION_A, "Plaza Singapura");
eventValue.put(AFInAppEventParameterName.DESTINATION_B,"Marina Bay Sands");
eventValue.put("distance", 5.2);
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "Taxi");
eventValue.put("driver_id", "1706");
eventValue.put("payment_method_type", "credit card");
eventValue.put("notes", "Taxi stand");
eventValue.put(AFInAppEventParameterName.CITY, "Singapore");
eventValue.put(AFInAppEventParameterName.REGION, "SFA");
eventValue.put(AFInAppEventParameterName.COUNTRY, "Singapore");
eventValue.put("af_order_id", "135790");
eventValue.put("credits_earned", 248);
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), "ride_booking_completed" , eventValue);
Was this article helpful?