1. Home
  2. Integrations
  3. Android Unity Events Setup Guide
  4. Healthcare Applications – Android Unity

Healthcare Applications – Android Unity

1. Purchase Service  Event

This is used to track the Purchase Service transaction of the users after they have successfully completed their payment of their Purchase within your Application.

You will need to call the below method to track the In-App Purchase Service event in your Application.

 

Java

public static void TrackPurchaseService
(string userID, string serviceType, PaymentMode paymentMode,
float revenue, string transactionID,
string languageCode, string countryCode,
Dictionary<string, object> extraParamsDic);

 

  • Mandatory parameters (Purchase Service):                                           
    • User Id  – Unique User Identifier
    • PurchaseService.PaymentMode.XXXCREDIT_CARD or DEBIT_CARD or NET_BANKING or GIFT_CARD or EMI or COD or PAYMENT_WALLET
    • Revenue  -Total Revenue generated from this Purchase event
    • Transaction Id –  Unique Purchase Transaction Identifier
    • Language Code – Unique Language Code.
    • Country Code –  Unique Country Code.
    • Note: For passing custom language Code currency code . Click here to view the list of Country codes
    • (ISO-3166) & Language codes (ISO-639).   
    • Follow the sample below.   
    • Example : Locale *languageCode = ”JP” Locale *currencyCode = ”JP”
    • Service type – Service Type applied for the Purchase Service
  • Optional parameters (Purchase Service):                                          
    • Provider Id  – Unique Provider Identifier
    • Provider Name – Name of the Provider
    • Page Name – Page that triggered the Event
    • Location  – Geolocation of the Event
    • Date  – Purchase Booking date.
    • Note: Date is string type and should be in the format of – “yyyy-MM-dd HH:mm:ss”

Sample Code

String bookDate = DateTime.ParseExact (“2017-06-07 11:45:35”, “yyyy-MM-dd HH:mm:ss”, null).ToString (“yyyy-MM-dd HH:mm:ss”);

       Dictionary<string, object> extrasParams = new Dictionary<string, object> ();
       extrasParams.Add (EventConstant.PROVIDER_NAME, “DoctorInsta”);
       extrasParams.Add (EventConstant.PROVIDER_ID, “21”);
       extrasParams.Add (EventConstant.BOOK_DATE, _bookDate);
       extrasParams.Add (EventConstant.PAGE_NAME, “Purchase Service”);
       extrasParams.Add (EventConstant.LATITUDE, 34.147785);
       extrasParams.Add (EventConstant.LONGITUDE, -118.144516);

       MTractionTracker.TrackPurchaseService (“101”, “RoutineCheckup”, PaymentMode.DEBIT_CARD, 2.9f, “21”, “JP”, “JP”, extrasParams);

 

 

Was this article helpful to you? Yes No

How can we help?