File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ export const useHome = () => {
53
53
) ,
54
54
codeLanguage : "language-solidity" ,
55
55
code : SimpleWalletContent ,
56
+ eventName : "bank" ,
56
57
} ,
57
58
{
58
59
title : t ( "page-index:page-index-developers-code-example-title-1" ) ,
@@ -61,6 +62,7 @@ export const useHome = () => {
61
62
) ,
62
63
codeLanguage : "language-solidity" ,
63
64
code : SimpleTokenContent ,
65
+ eventName : "token" ,
64
66
} ,
65
67
{
66
68
title : t ( "page-index:page-index-developers-code-example-title-2" ) ,
@@ -69,6 +71,7 @@ export const useHome = () => {
69
71
) ,
70
72
codeLanguage : "language-javascript" ,
71
73
code : CreateWalletContent ,
74
+ eventName : "wallet" ,
72
75
} ,
73
76
{
74
77
title : t ( "page-index:page-index-developers-code-example-title-3" ) ,
@@ -77,6 +80,7 @@ export const useHome = () => {
77
80
) ,
78
81
codeLanguage : "language-solidity" ,
79
82
code : SimpleDomainRegistryContent ,
83
+ eventName : "dns" ,
80
84
} ,
81
85
]
82
86
Original file line number Diff line number Diff line change @@ -181,4 +181,5 @@ export interface ITitleCardItem {
181
181
export interface CodeExample extends ITitleCardItem {
182
182
codeLanguage : string
183
183
code : string
184
+ eventName : string
184
185
}
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ import { cn } from "@/lib/utils/cn"
53
53
import { isValidDate } from "@/lib/utils/date"
54
54
import { existsNamespace } from "@/lib/utils/existsNamespace"
55
55
import { getLastDeployDate } from "@/lib/utils/getLastDeployDate"
56
+ import { trackCustomEvent } from "@/lib/utils/matomo"
56
57
import { polishRSSList } from "@/lib/utils/rss"
57
58
import { runOnlyOnce } from "@/lib/utils/runOnlyOnce"
58
59
import { breakpointAsNumber } from "@/lib/utils/screen"
@@ -408,7 +409,7 @@ const HomePage = ({
408
409
Svg = { AngleBrackets }
409
410
>
410
411
{ /* Desktop */ }
411
- { codeExamples . map ( ( { title, description } , idx ) => (
412
+ { codeExamples . map ( ( { title, description, eventName } , idx ) => (
412
413
< button
413
414
key = { title }
414
415
className = { cn (
@@ -417,7 +418,14 @@ const HomePage = ({
417
418
idx === activeCode &&
418
419
"bg-background-highlight"
419
420
) }
420
- onClick = { ( ) => toggleCodeExample ( idx ) }
421
+ onClick = { ( ) => {
422
+ toggleCodeExample ( idx )
423
+ trackCustomEvent ( {
424
+ eventCategory : "Homepage" ,
425
+ eventAction : "Code Examples" ,
426
+ eventName,
427
+ } )
428
+ } }
421
429
>
422
430
< p className = "font-bold" > { title } </ p >
423
431
< p className = "text-start text-sm text-body-medium" >
You can’t perform that action at this time.
0 commit comments