mixpanel / mixpanel-react-native

Official React Native Tracking Library for Mixpanel Analytics
https://mixpanel.com
Apache License 2.0
105 stars 44 forks source link

TimeEvent and Track not capturing `Duration` Property #261

Open ranuja-apps opened 1 month ago

ranuja-apps commented 1 month ago

I am using mixpanel v3.0.5 and i have notice either timeEvent or track not working as per the intended.

  static startTimeTrack(eventName: TimeTrackTypes) {
    this.Instance.timeEvent(eventName);
  }
  static endTimeTrack(eventName: TimeTrackTypes) {
    this.Instance.track(eventName);
  }

This is my code for tracking and i am calling startTimeTrack first and then endTimeTrack but i am not seeing duration field set in the mixpanel portal.

{
  "event": "TimeToInteract",
  "properties": {
    "time": 1723575091.91,
    "distinct_id": "$device:XX9df8XX-X3XX-X2XX-b7af-5fXX36XXbXX",
    "$android_brand": "OnePlus",
    "$android_manufacturer": "OnePlus",
    "$android_model": "CPH2569",
    "$city": "XX",
    "$device_id": "XX9df8XX-X3XX-X2XX-b7af-5fXX36XXbXX",
    "$insert_id": "0b71942e18f1a217",
    "$lib_version": "3.0.5",
    "$mp_api_endpoint": "api.mixpanel.com",
    "$mp_api_timestamp_ms": 1723575100668,
    "$os": "android",
    "$os_version": 34,
    "$region": "XXXX",
    "mp_country_code": "XX",
    "mp_lib": "react-native",
    "mp_processing_time_ms": 1723575100762
  }
}