Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(comments): add telemetry #6541

Merged
merged 1 commit into from
May 2, 2024
Merged

feat(comments): add telemetry #6541

merged 1 commit into from
May 2, 2024

Conversation

hermanwikner
Copy link
Member

@hermanwikner hermanwikner commented May 2, 2024

Description

This pull request adds telemetry tracking for the following events in the comments feature:

  • Comment URL copied
  • Comment viewed from URL
  • Comments inspector view changed (“open” or “resolved”)

What to review

  • Are there any additional events we should consider tracking?

Notes for release

N/A

Copy link

vercel bot commented May 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview May 2, 2024 9:20am
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 2, 2024 9:20am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 2, 2024 9:20am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview May 2, 2024 9:20am

Copy link
Contributor

github-actions bot commented May 2, 2024

No changes to documentation

Copy link
Contributor

github-actions bot commented May 2, 2024

Component Testing Report Updated May 2, 2024 9:20 AM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 35s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 7s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 27s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 20s 6 3 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 14s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 35s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 6s 15 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 5s 18 0 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 20s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 15s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ❌ Failed (Inspect) 26s 8 0 1

Comment on lines -108 to -126
useEffect(() => {
if (mode === 'upsell') {
if (selectedPath?.origin === 'form') {
telemetryLogs.panelViewed('field_action')
} else if (commentIdParamRef.current) {
telemetryLogs.panelViewed('link')
} else {
telemetryLogs.panelViewed('document_action')
}
}
return () => {
if (mode === 'upsell') {
telemetryLogs.panelDismissed()
}
}
// We want to run this effect only on mount and unmount
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved this effect further down

@hermanwikner hermanwikner marked this pull request as ready for review May 2, 2024 09:44
@hermanwikner hermanwikner requested review from a team, ninaandal and joneidejohnsen and removed request for a team May 2, 2024 09:44
@hermanwikner hermanwikner added this pull request to the merge queue May 2, 2024
Merged via the queue into next with commit 2d35256 May 2, 2024
39 checks passed
@hermanwikner hermanwikner deleted the edx-1242 branch May 2, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants