mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Add event tracking for log entry source link click (#16600)
GitOrigin-RevId: a4b4a3f5cf4cbf6ac93ef9a8637028726f6cf161
This commit is contained in:
parent
5e3deba9fe
commit
aa1e29aa19
1 changed files with 6 additions and 1 deletions
|
@ -4,6 +4,7 @@ import { memo, useCallback } from 'react'
|
|||
import PreviewLogEntryHeader from '../../preview/components/preview-log-entry-header'
|
||||
import PdfLogEntryContent from './pdf-log-entry-content'
|
||||
import HumanReadableLogsHints from '../../../ide/human-readable-logs/HumanReadableLogsHints'
|
||||
import { sendMB } from '@/infrastructure/event-tracking'
|
||||
|
||||
function PdfLogEntry({
|
||||
ruleId,
|
||||
|
@ -33,8 +34,12 @@ function PdfLogEntry({
|
|||
event => {
|
||||
event.preventDefault()
|
||||
onSourceLocationClick(sourceLocation)
|
||||
|
||||
const parts = sourceLocation?.file?.split('.')
|
||||
const extension = parts?.length > 1 ? parts.pop() : ''
|
||||
sendMB('log-entry-link-click', { level, ruleId, extension })
|
||||
},
|
||||
[onSourceLocationClick, sourceLocation]
|
||||
[level, onSourceLocationClick, ruleId, sourceLocation]
|
||||
)
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in a new issue