diff --git a/package.json b/package.json
index 31388500..8cefcde5 100644
--- a/package.json
+++ b/package.json
@@ -44,6 +44,7 @@
"dotenv-extended": "^2.9.0",
"firebase": "^8.2.2",
"firebase-admin": "^9.4.2",
+ "ga-gtag": "^1.1.7",
"lodash": "^4.17.21",
"mdi-material-ui": "^5.11.0",
"moment": "^2.29.4",
diff --git a/src/components/groupImpactComponents/GroupGoalNotification.js b/src/components/groupImpactComponents/GroupGoalNotification.js
index e76c27bf..4365bbb0 100644
--- a/src/components/groupImpactComponents/GroupGoalNotification.js
+++ b/src/components/groupImpactComponents/GroupGoalNotification.js
@@ -1,10 +1,11 @@
-import React from 'react'
+import React, { useCallback } from 'react'
import { makeStyles } from '@material-ui/core/styles'
import Button from '@material-ui/core/Button'
import PropTypes from 'prop-types'
import { Typography } from '@material-ui/core'
import { ArrowForwardIos } from '@material-ui/icons'
import { GROUP_IMPACT_SIDEBAR_STATE } from 'src/utils/constants'
+import gtag from 'ga-gtag'
import Notification from '../Notification'
const useStyles = makeStyles((theme) => ({
@@ -63,12 +64,27 @@ const GroupGoalNotification = ({
impactTitle,
}) => {
const classes = useStyles()
- const onDetailsHandler = () => {
+ const onDetailsHandler = useCallback(() => {
+ gtag('event', 'group_impact_notification', {
+ interaction: 'details',
+ mode,
+ })
onDetails()
- }
- const onNextGoalHandler = () => {
+ }, [mode, onDetails])
+ const onNextGoalHandler = useCallback(() => {
+ gtag('event', 'group_impact_notification', {
+ interaction: 'next_goal',
+ mode,
+ })
onNextGoal()
- }
+ }, [mode, onNextGoal])
+ const onGoalStartedHandler = useCallback(() => {
+ gtag('event', 'group_impact_notification', {
+ interaction: 'goal_started',
+ mode,
+ })
+ onGoalStarted()
+ }, [mode, onGoalStarted])
return (
@@ -104,7 +120,10 @@ const GroupGoalNotification = ({
) : (
-