1. Home
  2. Integrations
  3. iOS PhoneGap Event Setup Guide
  4. Custom Event – iOS Phonegap

Custom Event – iOS Phonegap

We recommend using our pre-defined events but in case you wish to define a custom event to track a specific behavior.

You will need to call the below method to track custom events in your Application.

trackCustomEvent: function(eventName,customEventKeyValuePairList)

  • Mandatory parameters (Custom Event):    
    • Event Name – Event name going to be tracked
  • Optional parameters (Custom Event):   
    • Key – Key name for tracked custom event
    • Value – Value of key for tracked custom event

Sample Code

var addKeyValuePairs=[ ];
var values = {
         "KEY": "12345",
         "VALUE": “Books",
var addKeyValue;

Sample Code – Custom event tracking

function trackCustomEvent(){
mtractiontracker.trackCustomEvent("Book Purchased",addKeyValuePairs);

Was this article helpful to you? Yes No

How can we help?