File tree Expand file tree Collapse file tree 1 file changed +23
-4
lines changed Expand file tree Collapse file tree 1 file changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export const BaseLink = forwardRef(function Link(
86
86
href,
87
87
}
88
88
89
- if ( isInternalPdf || isExternal ) {
89
+ if ( isExternal ) {
90
90
return (
91
91
< ChakraLink
92
92
isExternal
@@ -95,9 +95,7 @@ export const BaseLink = forwardRef(function Link(
95
95
customEventOptions ?? {
96
96
eventCategory : `Link` ,
97
97
eventAction : `Clicked` ,
98
- eventName : `Clicked on ${
99
- isInternalPdf ? "internal PDF" : "external link"
100
- } `,
98
+ eventName : "Clicked on external link" ,
101
99
eventValue : href ,
102
100
}
103
101
)
@@ -120,6 +118,27 @@ export const BaseLink = forwardRef(function Link(
120
118
)
121
119
}
122
120
121
+ if ( isInternalPdf ) {
122
+ return (
123
+ < NextLink
124
+ isExternal
125
+ onClick = { ( ) =>
126
+ trackCustomEvent (
127
+ customEventOptions ?? {
128
+ eventCategory : `Link` ,
129
+ eventAction : `Clicked` ,
130
+ eventName : "Clicked on internal PDF" ,
131
+ eventValue : href ,
132
+ }
133
+ )
134
+ }
135
+ { ...commonProps }
136
+ >
137
+ { children }
138
+ </ NextLink >
139
+ )
140
+ }
141
+
123
142
if ( isHash ) {
124
143
return (
125
144
< ChakraLink
You can’t perform that action at this time.
0 commit comments