@@ -21,6 +21,7 @@ import { cn } from "@/lib/utils/cn"
21
21
import { dataLoader } from "@/lib/utils/data/dataLoader"
22
22
import { existsNamespace } from "@/lib/utils/existsNamespace"
23
23
import { getLastDeployDate } from "@/lib/utils/getLastDeployDate"
24
+ import { trackCustomEvent } from "@/lib/utils/matomo"
24
25
import { getLocaleTimestamp } from "@/lib/utils/time"
25
26
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
26
27
@@ -37,6 +38,8 @@ import loadNamespaces from "@/i18n/loadNamespaces"
37
38
import { fetchGrowThePie } from "@/lib/api/fetchGrowThePie"
38
39
import heroImg from "@/public/images/heroes/guides-hub-hero.jpg"
39
40
41
+ const EVENT_CATEGORY = "dashboard"
42
+
40
43
// In seconds
41
44
const REVALIDATE_TIME = BASE_TIME_UNIT * 1
42
45
@@ -104,6 +107,13 @@ const ResourcesPage = ({ txCostsMedianUsd }) => {
104
107
GITHUB_REPO_URL
105
108
) . toString ( ) }
106
109
className = "visited:text-white"
110
+ onClick = { ( ) => {
111
+ trackCustomEvent ( {
112
+ eventCategory : EVENT_CATEGORY ,
113
+ eventAction : "links" ,
114
+ eventName : "Ethereum.org Github Page Feedback" ,
115
+ } )
116
+ } }
107
117
>
108
118
{ t ( "page-resources-share-feedback" ) }
109
119
</ Link >
@@ -131,6 +141,14 @@ const ResourcesPage = ({ txCostsMedianUsd }) => {
131
141
"relative text-nowrap rounded-xl px-4 py-2 text-sm [&_svg]:shrink-0 [&_svg]:text-sm" ,
132
142
activeSection === key && "!text-primary"
133
143
) }
144
+ onClick = { ( ) =>
145
+ trackCustomEvent ( {
146
+ eventCategory : EVENT_CATEGORY ,
147
+ eventAction : "whats_on_this_page" ,
148
+ eventName :
149
+ "network,using, scaling, resilience, privacy_security" ,
150
+ } )
151
+ }
134
152
>
135
153
{ activeSection === key && (
136
154
< motion . div
@@ -188,7 +206,17 @@ const ResourcesPage = ({ txCostsMedianUsd }) => {
188
206
< div className = "text-center font-bold" >
189
207
< Translation id = "page-resources:page-resources-find-more" />
190
208
</ div >
191
- < ButtonLink href = "https://ethereumdashboards.com" size = "lg" >
209
+ < ButtonLink
210
+ href = "https://ethereumdashboards.com"
211
+ size = "lg"
212
+ onClick = { ( ) => {
213
+ trackCustomEvent ( {
214
+ eventCategory : EVENT_CATEGORY ,
215
+ eventAction : "links" ,
216
+ eventName : "ethereumdashboards.com" ,
217
+ } )
218
+ } }
219
+ >
192
220
ethereumdashboards.com
193
221
</ ButtonLink >
194
222
</ VStack >
@@ -214,6 +242,13 @@ const ResourcesPage = ({ txCostsMedianUsd }) => {
214
242
) . toString ( ) }
215
243
variant = "outline"
216
244
isSecondary
245
+ onClick = { ( ) => {
246
+ trackCustomEvent ( {
247
+ eventCategory : EVENT_CATEGORY ,
248
+ eventAction : "links" ,
249
+ eventName : "Ethereum.org Github Feature Request" ,
250
+ } )
251
+ } }
217
252
>
218
253
{ t ( "page-resources-suggest-resource" ) }
219
254
</ ButtonLink >
@@ -224,6 +259,13 @@ const ResourcesPage = ({ txCostsMedianUsd }) => {
224
259
) . toString ( ) }
225
260
variant = "outline"
226
261
isSecondary
262
+ onClick = { ( ) => {
263
+ trackCustomEvent ( {
264
+ eventCategory : EVENT_CATEGORY ,
265
+ eventAction : "links" ,
266
+ eventName : "Ethereum.org Github Bug Report" ,
267
+ } )
268
+ } }
227
269
>
228
270
< FaGithub /> { t ( "page-resources-found-bug" ) }
229
271
</ ButtonLink >
0 commit comments