Recommended healthcare app events

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

5669_Healthcare_icon_3.png Healthcare

Healthcare apps enable users to perform tasks such as purchase health insurance, make appointments, and receive medical advice. The typical events that we suggest recording include purchases and bookings.

Recording events can help you determine:

  • Which medications are the most necessary and in-demand 
  • What packages users are interested in
  • Which medical issues users are most concerned about

 Important!

  • Make sure to read the instructions for marketers about implementing in-app events.
  • To streamline the implementation process, use our In-app event generator. This tool includes all of the typical in-app events described in this article and lets you modify the events according to your business needs. Once complete, share the file with your developer.
  • For each recommended event included in this article, there are code samples for iOS, Android, and Unity developers.
  • Detailed instructions for your developer can be found in the AppsFlyer developer hub.

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

In_appEvents__Healthcare__en-us.png

Recommended structures for predefined events

The following section provides a list of event structures that are typical to the healthcare 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.

Login (af_login)

Purpose

Understand the retention of your registered users

Trigger 

Whenever 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);

Complete registration (af_complete_registration)

Purpose

Learn how many users installed the app and completed the signup process, and what signup methods your users prefer.

Trigger

When the user completes the signup process

Event parameters

Name Description Example value
af_registration_method Type of signup method email, Facebook

Code examples

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

Add to cart (af_add_to_cart)

Purpose

Record when a user adds a product to their cart. This event can help you determine:

  • How many products on average buyers add in one purchase
  • How much time passes between adding two different products
  • How many buyers abandon their cart

Trigger

When the user adds a product to the cart

Event parameters

Name Description Example value
medicine_name Name of the medicine rhinos
af_quantity Amount ordered 1
af_price Price of the medicine 10

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<>();
eventValue.put("medicine name", "rhinos");
eventValue.put("quantity", "1");
eventValue.put("price", "10");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), "add_to_cart", eventValue); 

Purchase (af_purchase)

Purpose

Record in-app purchases made by users. This event can help you:

  • Determine the LTV of your users and the ROI of your campaigns across ad networks and ad agencies
  • Determine what offers are most popular with your users
  • Cross-reference campaigns with purchased items in order to optimize campaign targeting

Trigger

When the user lands on the thank you page after a successful purchase

Event parameters

Name Description Example value
af_revenue Revenue from the purchase 50.55
af_currency Currency code USD
af_content_type Name of the purchase lab
af_order_id Order ID 9277
payment_method_type Payment method used credit card, local

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<>();
eventValue.put(AFInAppEventParameterName.REVENUE, 50.55);
eventValue.put(AFInAppEventParameterName.CURRENCY, "USD");
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "lab");
eventValue.put("AFInAppEventParameterName.ORDER_ID", "9277");
eventValue.put("payment_method_type", "credit card");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(),AFInAppEventType.PURCHASE, 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.

Confirmed appointment (confirmed_appointment) 

Purpose

By recording this event, you can use the data to retarget users and send reminders about regular checkups and future appointments.

Trigger

When the user makes an appointment

Event parameters

Name Description Example value
doctor_name Name of the doctor Robert James
appointment_number Number of the appointment 001

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<>();
eventValue.put("doctor_name", "Robert James");
eventValue.put("appointment_number", "001");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), "confirmed_appointment", eventValue); 

Canceled appointment (canceled_appointment)

Purpose

By recording this event, you can use the data to retarget users and send reminders to reschedule appointments.

Trigger

When the user cancels an appointment

Event parameters

Name Description Example value
doctor_name Name of the doctor Robert James
appointment_number Number of the appointment 001

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<>();
eventValue.put("doctor_name", "Robert James");
eventValue.put("appointment_number", "001");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), "canceled_appointment", eventValue); 

Doctor first booking (doctor_first_booking)

Purpose

By recording this event, you can use the data to send users promotions and retargeting ads.

Trigger

When the user makes their first appointment

Event parameters

Name Description Example value
doctor_name Name of the doctor Robert James
specialty Medical specialty neurology
duration Length of the appointment 30 min chat
price Price of the appointment 50

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<>();
eventValue.put("doctor_name", "Robert James");
eventValue.put("specialty", "neurology");
eventValue.put("duration", "30 min chat");
eventValue.put("price", "50");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), "doctor_first_booking", eventValue); 

Lab first appointment (lab_first_appointment)

Purpose

By recording this event, you can use the data to send users promotions and retargeting ads.

Trigger

When the user makes their first appointment

Event parameters

Name Description Example value
lab_selection Name of the lab test full body checkup
quantity Amount ordered 2
price Price of the lab 500

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<>();
eventValue.put("lab_selection", "full body checkup");
eventValue.put("quantity", "2");
eventValue.put("price", "500");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), "lab_first_appointment", eventValue); 

Pharmacy first purchase (pharmacy_first_purchase)

Purpose

By recording this event, you can use the data to send users promotions and retargeting ads.

Trigger

When the user makes their first purchase

Event parameters

Name Description Example value
medicine_name Name of the medicine rhinos
quantity Amount ordered 1
price Price of the medicine 10

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<>();
eventValue.put("medicine_name", "rhinos");
eventValue.put("quantity", "1");
eventValue.put("price", "10");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), "pharmacy_first_purchase", eventValue); 

Doctor booking (doctor_booking)

Purpose

Learn additional information about your user's needs and interests.

Trigger

When the user schedules an in-person appointment

Event parameters

Name Description Example value
doctor_name Name of the doctor Robert James
specialty Medical specialty neurology
duration Amount of time of the appointment 30 min chat
price Price of the appointment 50

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<>();
eventValue.put("doctor_name", "Robert James");
eventValue.put("specialty", "neurology");
eventValue.put("duration", "30 min chat");
eventValue.put("price", "50");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), "doctor_booking", eventValue); 

Chat doctor (chat_doctor)

Purpose

Learn additional information about your user's needs and interests.

Trigger

When the user makes a booking

Event parameters

Name Description Example value
doctor_name Name of the doctor Robert James
specialty Medical specialty neurology
duration Amount of time of the appointment 30 min chat
price Price of the appointment 50

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<>();
eventValue.put("doctor_name", "Robert James");
eventValue.put("specialty", "neurology");
eventValue.put("duration", "30 min chat");
eventValue.put("price", "50");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), "chat_doctor", eventValue); 

Lab appointment (lab_appointment)

Purpose

By recording this event, you can use the data to send users promotions and retargeting ads.

Trigger

When the user makes a lab appointment

Event parameters

Name Description Example value
lab_selection Name of the lab type full body checkup
quantity Amount ordered 2
price Price of the lab 500

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<>();
eventValue.put("lab selection", "full body checkup");
eventValue.put("quantity", "2");
eventValue.put("price", "500");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), "lab_appointment", eventValue); 

Pharmacy purchase (pharmacy_purchase)

Purpose

By recording this event, you can use the data to send users promotions and retargeting ads.

Trigger

When the user makes a pharmaceutical purchase

Event parameters

Name Description Example value
medicine_name Name of the medicine rhinos
quantity Amount ordered 1
price Price of the medicine 10

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<>();
eventValue.put("medicine_name", "rhinos");
eventValue.put("quantity", "1");
eventValue.put("price", "10");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), "pharmacy_purchase", eventValue); 

Insurance membership (insurance_membership)

Purpose

Learn more about your users and then retarget them accordingly.

Trigger

When the user gets an insurance membership

Event parameters

Name Description Example value
insurance_name Name of the insurance company DavidShield
insurance_type Type of insurance plan premium

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<>();
eventValue.put("insurance_name", "DavidShield");
eventValue.put("insurance_type", "premium");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), "insurance_membership", eventValue); 

Receipt issuance (receipt_issuance)

Purpose

Users with a receipt can potentially claim the cost of the doctor's appointment, lab, or medicine from an insurer. By recording this event, you can use the data for retargeting campaigns about personal insurance coverage.

Trigger

When the user gets a receipt

Event parameters

Name Description Example value
app_name Name of your app Healthcare App
doctor_name Name of the doctor Robert James
consultation_description Description of the health condition fever

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<>();
eventValue.put("app_name", "Healthcare App");
eventValue.put("doctor_name", "Robert James");
eventValue.put("consultation_description", "fever");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), "receipt_issuance", eventValue); 

Top-up success (top_up_success)

Purpose

Top-up funds can be used to buy any package or service offered inside the app. You can record this event and compare it with other data to learn more about your users. For example, you can learn what amounts people are willing to deposit into their accounts and use the top-up amounts to target users with customized campaigns within their top-up budgets.

Trigger

When the user completes the top-up

Event parameters

Name Description Example value
af_revenue Amount of the top-up  2000.55
top_up_id ID of the top-up 397
payment_method_type Payment method used credit card, local payment

Code examples

Android iOS - Objective C iOS - Swift Unity
Map<String, Object> eventValue = new HashMap<>();
eventValue.put(AFInAppEventParameterName.REVENUE, 2000.55); eventValue.put("top_up_id", "397"); eventValue.put("payment_method_type", "creditcard");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), "top_up_success", eventValue);
Was this article helpful?