-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: mixpanel events and add super properties
- Loading branch information
1 parent
44dff14
commit 62174b3
Showing
18 changed files
with
196 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 23 additions & 6 deletions
29
...es/pn-personafisica-webapp/src/utility/MixpanelUtils/Strategies/SendRemoveLegalAddress.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,32 @@ | ||
import { EventPropertyType, EventStrategy, TrackedEvent } from '@pagopa-pn/pn-commons'; | ||
|
||
import { DeleteDigitalAddressParams } from '../../../redux/contact/types'; | ||
|
||
type SendRemoveLegalAddress = { | ||
SEND_HAS_PEC: 'no'; | ||
}; | ||
|
||
type SendRemoveLegalAddressData = { | ||
payload: string; | ||
params: DeleteDigitalAddressParams; | ||
}; | ||
|
||
export class SendRemoveLegalAddressStrategy implements EventStrategy { | ||
performComputations(): TrackedEvent<SendRemoveLegalAddress> { | ||
return { | ||
[EventPropertyType.PROFILE]: { | ||
SEND_HAS_PEC: 'no', | ||
}, | ||
}; | ||
performComputations({ | ||
params, | ||
}: SendRemoveLegalAddressData): TrackedEvent<SendRemoveLegalAddress> { | ||
// If i'm removing a special contact (senderId !== 'default') I don't want to update the profile property | ||
if (params.senderId === 'default') { | ||
return { | ||
[EventPropertyType.PROFILE]: { | ||
SEND_HAS_PEC: 'no', | ||
}, | ||
[EventPropertyType.SUPER_PROPERTY]: { | ||
SEND_HAS_PEC: 'no', | ||
}, | ||
}; | ||
} else { | ||
return {}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.