overleaf/services/web/frontend/js/features/event-tracking/document-first-change-event.js
Jakob Ackermann 6b2daed903 Merge pull request #15843 from overleaf/jpa-download-events
[web] add additional event tracking

GitOrigin-RevId: 877f92db41efff017db370ec75b8d1f861eed4f2
2023-11-21 09:04:28 +00:00

12 lines
364 B
JavaScript

import { isMobileDevice, 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, isMobileDevice })
}