Skip to content

Commit 8519326

Browse files
Aniket-Enggyann300
authored andcommitted
matomo for matAImodal
1 parent a6dddce commit 8519326

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

libs/remix-ui/app/src/lib/remix-app/components/modals/managePreferences.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ const ManagePreferencesDialog = (props) => {
118118
settings.updateMatomoAnalyticsChoice(true) // Always true for matomo Anonymous analytics
119119
settings.updateMatomoPerfAnalyticsChoice(switcherState.current.matPerfSwitch) // Enable/Disable Matomo Performance analytics
120120
settings.updateCopilotChoice(switcherState.current.remixAISwitch) // Enable/Disable RemixAI copilot
121+
_paq.push(['trackEvent', 'landingPage', 'MatomoAIModal', `MatomoPerfStatus: ${switcherState.current.matPerfSwitch}`])
122+
_paq.push(['trackEvent', 'landingPage', 'MatomoAIModal', `AICopilotStatus: ${switcherState.current.remixAISwitch}`])
121123
setVisible(false)
122124
props.savePreferencesFn()
123125
}

libs/remix-ui/app/src/lib/remix-app/components/modals/matomo.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,17 @@ const MatomoDialog = (props: MatomoDialogProps) => {
6666
}, [visible])
6767

6868
const handleAcceptAllClick = async () => {
69+
_paq.push(['setConsentGiven']) // default consent to process their anonymous data
6970
settings.updateMatomoAnalyticsChoice(true) // Enable Matomo Anonymous analytics
7071
settings.updateMatomoPerfAnalyticsChoice(true) // Enable Matomo Performance analytics
7172
settings.updateCopilotChoice(true) // Enable RemixAI copilot
73+
_paq.push(['trackEvent', 'landingPage', 'MatomoAIModal', 'AcceptClicked'])
7274
setVisible(false)
7375
props.acceptAllFn()
7476
}
7577

7678
const handleManagePreferencesClick = async () => {
79+
_paq.push(['trackEvent', 'landingPage', 'MatomoAIModal', 'ManagePreferencesClicked'])
7780
setVisible(false)
7881
props.managePreferencesFn()
7982
}

0 commit comments

Comments
 (0)