Skip to content

Commit

Permalink
feat: add dead clicks taxonomy
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Oct 25, 2024
1 parent 1c51c9e commit 8c34816
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions bin/copy-posthog-js
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ cp node_modules/posthog-js/dist/recorder-v2.js* frontend/dist/
cp node_modules/posthog-js/dist/surveys.js* frontend/dist/
cp node_modules/posthog-js/dist/exception-autocapture.js* frontend/dist/
cp node_modules/posthog-js/dist/web-vitals.js* frontend/dist/
cp node_modules/posthog-js/dist/dead-clicks-autocapture.js* frontend/dist/
45 changes: 45 additions & 0 deletions frontend/src/lib/taxonomy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ export const CORE_FILTER_DEFINITIONS_BY_GROUP = {
label: 'Rageclick',
description: 'A user has rapidly and repeatedly clicked in a single place',
},
$dead_click: {
label: 'Dead click',
description: 'A user has clicked on something that is probably not clickable',
},
$exception: {
label: 'Exception',
description: 'Automatically captured exceptions from the client Sentry integration',
Expand Down Expand Up @@ -1216,6 +1220,47 @@ export const CORE_FILTER_DEFINITIONS_BY_GROUP = {
label: 'Surveys Activated',
description: 'The surveys that were activated for this event.',
},
$dead_click_scroll_delay_ms: {
label: 'Dead click scroll delay in milliseconds',
description: 'The delay between a click and the next scroll event',
},
$dead_click_mutation_delay_ms: {
label: 'Dead click mutation delay in milliseconds',
description: 'The delay between a click and the next mutation event',
},
$dead_click_absolute_delay_ms: {
label: 'Dead click absolute delay in milliseconds',
description: 'The delay between a click and having seen no activity at all',
},
$dead_click_selection_changed_delay_ms: {
label: 'Dead click selection changed delay in milliseconds',
description: 'The delay between a click and the next text selection change event',
},
$dead_click_last_mutation_timestamp: {
label: 'Dead click last mutation timestamp',
description: 'debug signal time of the last mutation seen by dead click autocapture',
},
$dead_click_event_timestamp: {
label: 'Dead click event timestamp',
description: 'debug signal time of the event that triggered dead click autocapture',
},
$dead_click_scroll_timeout: {
label: 'Dead click scroll timeout',
description: 'whether the dead click autocapture passed the threshold for waiting for a scroll event',
},
$dead_click_mutation_timeout: {
label: 'Dead click mutation timeout',
description: 'whether the dead click autocapture passed the threshold for waiting for a mutation event',
},
$dead_click_absolute_timeout: {
label: 'Dead click absolute timeout',
description: 'whether the dead click autocapture passed the threshold for waiting for any activity',
},
$dead_click_selection_changed_timeout: {
label: 'Dead click selection changed timeout',
description:
'whether the dead click autocapture passed the threshold for waiting for a text selection change event',
},
},
numerical_event_properties: {}, // Same as event properties, see assignment below
person_properties: {}, // Currently person properties are the same as event properties, see assignment below
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/loadPostHogJS.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export function loadPostHogJS(): void {
_onCapture: (window as any)._cypress_posthog_captures
? (_, event) => (window as any)._cypress_posthog_captures.push(event)
: undefined,

capture_dead_clicks: true,

Check failure on line 54 in frontend/src/loadPostHogJS.tsx

View workflow job for this annotation

GitHub Actions / Code quality checks

Argument of type '{ opt_out_useragent_filter: boolean; api_host: string | undefined; ui_host: string | undefined; rageclick: true; persistence: "localStorage+cookie"; bootstrap: { distinctID: string; isIdentifiedID: boolean; featureFlags: Record<...>; } | {}; ... 7 more ...; capture_dead_clicks: boolean; }' is not assignable to parameter of type 'Partial<PostHogConfig>'.
})
)

Expand Down

0 comments on commit 8c34816

Please sign in to comment.