Skip to content

Commit 8ddbd40

Browse files
heiskrCopilot
andauthored
Fix event validation rejections (#60142)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 492ec50 commit 8ddbd40

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/events/lib/schema.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,29 +263,29 @@ const exit = {
263263
exit_render_duration: {
264264
type: 'number',
265265
description: 'How long the server took to render the page content, in seconds.',
266-
minimum: 0.001,
266+
minimum: 0,
267267
},
268268
exit_first_paint: {
269269
type: 'number',
270-
minimum: 0.001,
270+
minimum: 0,
271271
description:
272272
'The duration until `first-contentful-paint`, in seconds. Informs CSS performance.',
273273
},
274274
exit_dom_interactive: {
275275
type: 'number',
276-
minimum: 0.001,
276+
minimum: 0,
277277
description:
278278
'The duration until `PerformanceNavigationTiming.domInteractive`, in seconds. Informs JavaScript loading performance.',
279279
},
280280
exit_dom_complete: {
281281
type: 'number',
282-
minimum: 0.001,
282+
minimum: 0,
283283
description:
284284
'The duration until `PerformanceNavigationTiming.domComplete`, in seconds. Informs JavaScript execution performance.',
285285
},
286286
exit_visit_duration: {
287287
type: 'number',
288-
minimum: 0.001,
288+
minimum: 0,
289289
description:
290290
'The duration of exit.timestamp - page.timestamp, in seconds. Informs bounce rate.',
291291
},
@@ -362,6 +362,8 @@ const link = {
362362
'toc',
363363
'footer',
364364
'static',
365+
'view-markdown-button',
366+
'page-source-menu',
365367
],
366368
description: 'The part of the page where the user clicked the link.',
367369
},
@@ -573,7 +575,7 @@ const clipboard = {
573575
clipboard_operation: {
574576
type: 'string',
575577
description: 'Which clipboard operation the user is performing.',
576-
enum: ['copy', 'paste', 'cut'],
578+
enum: ['copy', 'paste', 'cut', 'share'],
577579
},
578580
clipboard_target: {
579581
type: 'string',

src/frame/components/article/ViewMarkdownButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const ViewMarkdownButton = ({ currentPath }: ViewMarkdownButtonProps) =>
1919
const handleClick = () => {
2020
sendEvent({
2121
type: EventType.link,
22-
link_url: markdownUrl,
22+
link_url: `${window.location.origin}${markdownUrl}`,
2323
link_samesite: false,
2424
link_container: 'view-markdown-button',
2525
})

0 commit comments

Comments
 (0)