We have provided a list of Events with their example usage that can be integrated for Content based Applications. Please find them below:

1. Purchase Event

This is used to track the successful Purchase 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.

trackPurchase: function(userID,revenue,transactionId,pageName,loyalty,serviceCharge,
overallDiscount,paymentMode,frequency,latitude,longitude
,languageCode,countryCode,productItemList);

  • Mandatory parameters (Product):                                          
    • User Id  - Unique User Identifier
    • Revenue  -Total Revenue generated from this Purchase event
    • Payment Mode  - CREDIT_CARD or DEBIT_CARD or NET_BANKING or GIFT_CARD or EMI or COD or PAYMENT_WALLET
    • Transaction Id -  Unique Purchase Transaction Identifier
    • Purchase Frequency - ONCE or RECURRING representing One Time Payment or Subscription based Payment respectively
    • Product List (productItemList) - Array of the list of products purchased.
    • Language Code - Unique Language Code.
    • Country Code - Unique country code Note: For passing custom language Code currency code. Please Click here to view list of country codes.
      (ISO-3166) & Language codes (ISO-639).   Follow the sample below.  
      Example : Locale *languageCode = ”JP” Locale *currencyCode = ”JP” 
  • Optional parameters (Product):                                         
    • Loyalty  - Loyalty points applied on the Purchase
    • Overall Discount - Discount applied for the Purchase
    • Service Charge - Service Charge applied for the Purchase
    • Location  - Geolocation of the Event
    • ProductItemList  - Item list of product.       

Product List’s Pre-defined parameters for tracking product data on our system

  • Mandatory parameters (Product):                                          
    • Product Identifier  - Unique Product Identifier
    • Product Name  - Name of the Product
    • Price  - Price of the Product
    • Price  - Price of the Product
    • Quantity  -Quantity of the Product being Purchased
  • Optional parameters (Purchase):                                         
    • Brand  - Brand Name of the Product
    • Product Discount  - Discount applied for the Product
    • Category  - Product Category

// Sample - Adding the product to the Product List

<script>
var productList=[ ];
var values = {
         "IDENTIFIER": "12345",
         "PRODUCT_NAME": "Cook Books",
         "PRICE": 14.99,
         "QUANTITY": 1,
         "BRAND": "Gordon Ramsay",
         "CATEGORY": "Books",
         "PRODUCT_DISCOUNT": 5.00 
}
var addProduct;
addProduct=JSON.stringify(values);
productList.push(addProduct)

Sample Code - Purchase Event Tracking

<script>
// Calling trackPurchase Method...
mtractiontracker.trackPurchase(
        "123",
        24.65,
        "1000123",
        "Book Purchase",
       350.00,
        4.99,
        5.00,
        DEBIT_CARD, 
        RECURRING,
       35.01,
        70.01,
      “JP”,
      “JP”,
        productItemList
        );
        }
</script>

2. Content Viewed Event

This is used to track the event triggered when the user has viewed any content on the Application.
You will need to call the below method to track the Content viewed event in your Application Class to track the Content viewed event in your Application.

trackContentViewed: function(userID,revenue,identifier,productName,
category,pageName,latitude,longitude,mediaType,
languageCode,countryCode)

  • Mandatory parameters (Content Viewed):                                           
    • User Id - Unique User Identifier
    • Revenue - Total Revenue generated from this Content Viewed event
    • Identifier - Unique Content Identifier
    • Media Type  -Type of content viewed, AUDIO or VIDEO or TEXT or IMAGE
    • 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”           
  • Optional parameters (Content Viewed):                                           
    • Product Name - Title of the Content
    • Category - Content Category
    • Page Name - Page that triggered the Event
    • Location - Geolocation of the Event

Sample Code

<script>
function trackContentViewed(){
mtractiontracker.trackContentViewed(”123”,123.00,”12345”,”Article on Electronic gadgets”,”Technology”,”Article”,35.01,70.01,”VIDEO”,”JP”,”JP”);
}</script>

3.Create Playlist Event

This is used to track the event triggered when a user has to create playlist in your Application.
You will need to call the below method to track the Create playlist event in your Application.

trackCreatePlaylist: function(playList,description,identifier,pageName,latitude,longitude)


  • Mandatory parameters (Create playlist):                                                                    
    • Playlist Name - User Playlist Name
    • Identifier  - Unique Event Identifier
  • Optional parameters (Create playlist):                                                                   
    • Description - Additional information about the shared item
    • Page Name - Page that triggered the Event
    • Location - Geolocation of the Event

Sample Code

<script>
       function trackCreatePlaylist(){
mtractiontracker.trackCreatePlaylist("MyFavList","Songs List","12345","Playlist",35.01,70.01);
       }
   </script>