overleaf/services/web/frontend/js/features/event-tracking/document-first-change-event.js
Jakob Ackermann 6470afaec3 Merge pull request #15844 from overleaf/jpa-download-events
[web] change isMobileDevice segmentation to isSmallDevice

GitOrigin-RevId: 1fcaf6ececc1fa75fd681ef2497bfa5e5567143d
2023-11-27 09:04:08 +00:00

12 lines
362 B
JavaScript

import { isSmallDevice, sendMB } from '@/infrastructure/event-tracking'
import getMeta from '@/utils/meta'
// record once per page load
let recorded = false
export function recordDocumentFirstChangeEvent() {
if (recorded) return
recorded = true
const projectId = getMeta('ol-project_id')
sendMB('document-first-change', { projectId, isSmallDevice })
}