Skip to content

Commit 80672c0

Browse files
subirjollySubir Jolly
andauthored
feat: add rudderstack reporting on dialog dismiss (#3213)
Co-authored-by: Subir Jolly <subirjolly@Subirs-MacBook-Pro.local>
1 parent dbe90ed commit 80672c0

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

src/billing/components/PayAsYouGo/CancelServiceReasonsForm.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,16 @@ function CancelServiceReasonsForm() {
123123
checked={canContactForFeedback}
124124
onChange={toggleCanContactForFeedback}
125125
size={ComponentSize.Small}
126-
titleText="I understand and agree to these conditions"
126+
titleText="I am open to talking further with the Influx product &amp; design"
127127
type={InputType.Checkbox}
128128
testID="agree-terms--checkbox"
129129
/>
130130
<InputLabel
131131
active={canContactForFeedback}
132132
size={ComponentSize.Small}
133133
>
134-
I understand and agree to these conditions
134+
I am open to talking further with the Influx product &amp; design
135+
team about my experience
135136
</InputLabel>
136137
</FlexBox>
137138
</span>

src/billing/components/PayAsYouGo/CancellationOverlay.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,19 @@ const CancellationOverlay: FC<Props> = ({onHideOverlay}) => {
7777
}
7878

7979
const handleDismiss = () => {
80+
if (
81+
isFlagEnabled('rudderstackReporting') &&
82+
isFlagEnabled('trackCancellations')
83+
) {
84+
const payload = {
85+
org: org.id,
86+
tier: quartzMe?.accountType,
87+
email: quartzMe?.email,
88+
}
89+
// Send to Rudderstack
90+
track('CancelServiceDismissed', payload)
91+
}
92+
8093
setHasClickedCancel(false)
8194
onHideOverlay()
8295
}
@@ -94,7 +107,7 @@ const CancellationOverlay: FC<Props> = ({onHideOverlay}) => {
94107

95108
return (
96109
<Overlay visible={true} className="cancellation-overlay">
97-
<Overlay.Container maxWidth={600}>
110+
<Overlay.Container maxWidth={700}>
98111
<Overlay.Header title="Cancel Service" onDismiss={handleDismiss} />
99112
<Overlay.Body>
100113
<Alert

src/organizations/components/DeleteOrgOverlay.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,19 @@ const DeleteOrgOverlay: FC = () => {
5050
const org = useSelector(getOrg)
5151

5252
const handleClose = () => {
53+
if (
54+
isFlagEnabled('rudderstackReporting') &&
55+
isFlagEnabled('trackCancellations')
56+
) {
57+
const payload = {
58+
org: org.id,
59+
tier: quartzMe?.accountType,
60+
email: quartzMe?.email,
61+
}
62+
// Send to Rudderstack
63+
track('DeleteOrgDismissed', payload)
64+
}
65+
5366
history.goBack()
5467
}
5568

0 commit comments

Comments
 (0)