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
<script>
var addKeyValuePairs=[ ];
var values = {
"KEY": "12345",
"VALUE": “Books",
}
var addKeyValue;
addKeyValue=JSON.stringify(values);
addKeyValueP
Custom event tracking
<script>
function trackCustomEvent(){
mtractiontracker.trackCustomEvent("Book Purchased",addKeyValuePairs);
}
</script>