Skip to content

Commit 88ff6f2

Browse files
subirjollySubir Jolly
andauthored
feat: add notebook access event (#3282)
* feat: add notebook access event * chore: add notebook id as tag to event Co-authored-by: Subir Jolly <subirjolly@Subirs-MacBook-Pro.local>
1 parent fd93a26 commit 88ff6f2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/flows/components/FlowPage.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ import {PROJECT_NAME_PLURAL} from 'src/flows'
2424

2525
import 'src/flows/style.scss'
2626

27+
// Utils
2728
import {pageTitleSuffixer} from 'src/shared/utils/pageTitles'
29+
import {event} from 'src/cloud/utils/reporting'
2830

2931
const FlowFromRoute = () => {
3032
const {id} = useParams<{id: string}>()
@@ -34,6 +36,12 @@ const FlowFromRoute = () => {
3436
change(id)
3537
}, [id, change])
3638

39+
useEffect(() => {
40+
if (currentID !== null) {
41+
event('Notebook Accessed', {notebookID: currentID})
42+
}
43+
}, [currentID])
44+
3745
document.title = pageTitleSuffixer([
3846
flows[currentID]?.name,
3947
PROJECT_NAME_PLURAL,

0 commit comments

Comments
 (0)