1. Purchase Service  Event

This is used to track the successful Purchase Service events or paid subscription to the Application. You will need to call the below method to track the In-App Purchase event in your Application.

trackPurchaseService :function(userId,serviceType,revenue,transactionId,providerName,
providerId,pageName,latitude,longitude,
paymentMode,bookDate,languageCode,countryCode)


  • Mandatory parameters (Product):                                        
    • User Id  - Unique User Identifier
    • PurchaseService.PaymentMode.XXX - CREDIT_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 (Product):                                       
    •  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.

// Sample 

<script>
function convertDateFormat (){
    var e1 = “2017-01-20 10:10:10”;
    if(e1!=""){
        var d1 = new Date(e1),
        d1format = [d1.getFullYear(),d1.getMonth()+1,
                    d1.getDate()
                    ].join('-')+' '+
                    [d1.getHours(),
                     d1.getMinutes(),
                     d1.getSeconds()].join(':');
                     bookDate = d1format;
    }}
</script>

Sample Code - Purchase Event Tracking

<script>

function trackPurchaseService(){

mtractiontracker.trackPurchaseService(“123”,”RoutineCheckup”,20.0,”12345”,”Unlimited  eConsults”,”1234”,”Policy Payment”,35.01,70.01,”GIFT_CARD”,”bookDate”,”JP”,”JP”);

}</script>