(teamId: number | null, payload: TimeToSeeDataPayload)
| 27 | } |
| 28 | |
| 29 | export async function captureTimeToSeeData(teamId: number | null, payload: TimeToSeeDataPayload): Promise<void> { |
| 30 | if (window.JS_CAPTURE_TIME_TO_SEE_DATA && teamId) { |
| 31 | await api.create(`api/projects/${teamId}/insights/timing`, { |
| 32 | session_id: currentSessionId(), |
| 33 | current_url: window.location.href, |
| 34 | ...payload, |
| 35 | }) |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | /** api.get() wrapped in captureTimeToSeeData() tracking for simple cases of fetching insights or dashboards. |
| 40 | * This is not in api.ts to avoid circular dependencies, but the principle is the same. |
no test coverage detected
searching dependent graphs…