File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/components/TableOfContents Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { ButtonLink } from "../ui/buttons/Button"
12
12
13
13
import { useActiveHash } from "@/hooks/useActiveHash"
14
14
import { useTranslation } from "@/hooks/useTranslation"
15
+ import { usePathname } from "@/i18n/routing"
15
16
16
17
export type TableOfContentsProps = {
17
18
items : Array < ToCItem >
@@ -31,6 +32,7 @@ const TableOfContents = ({
31
32
className,
32
33
...rest
33
34
} : TableOfContentsProps ) => {
35
+ const pathname = usePathname ( )
34
36
const { t } = useTranslation ( "common" )
35
37
36
38
const titleIds : Array < string > = [ ]
@@ -66,7 +68,15 @@ const TableOfContents = ({
66
68
{ ...rest }
67
69
>
68
70
{ ! hideEditButton && editPath && (
69
- < ButtonLink href = { editPath } variant = "outline" >
71
+ < ButtonLink
72
+ href = { editPath }
73
+ variant = "outline"
74
+ customEventOptions = { {
75
+ eventCategory : "edit_page" ,
76
+ eventAction : "gh_edit_click" ,
77
+ eventName : `${ pathname } ` ,
78
+ } }
79
+ >
70
80
< Github />
71
81
{ t ( "edit-page" ) }
72
82
</ ButtonLink >
You can’t perform that action at this time.
0 commit comments