- Track user time spent data
- Submit the time using the
insertTimeSpentRecordmutation
insertTimeSpentRecord mutation as shown below:
insertTimeSpentRecord mutation indicates whether the data was successfully stored (true or false).
⚠️ Prerequisites and Notes
Please consider the following before submitting time spent data:- Current User Restriction
Time spent data can only be submitted for the current API user. - Access Control
Access to theinsertTimeSpentRecordmutation is subject to access policies. See the schema description for full details. - **Accumulation by **
edgeRid
Time is accumulated within the specifiededgeRid.- Calling
insertTimeSpentRecordmultiple times with the same arguments will sum the durations for that activity. - This is important when choosing your implementation strategy:
- Periodic submission: Submit only the time tracked during the current period (e.g., last 30 seconds). Avoid sending cumulative totals to prevent overcounting.
- Event-based submission: Submit the full duration tracked up to the moment of the event.
The mutation can technically be called multiple times, but it’s important that the **same time segment is submitted only once **— when the event is triggered — to avoid overcounting.
- Calling