forked from deriv-com/deriv-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WALL] george / WALL-4522 / Add ce_cashier_deposit_onboarding_form an…
…alytics event (deriv-com#16089) * feat(cashier): ⚡ add ce_cashier_deposit_onboarding_form analytics event * feat(p2p): setup analytics in p2p * fix(cashier): 🚑 fix remounting of vertical tab routes/pages * chore: align package-lock with master * chore(cashier): ♻️ minor improvement, fix test * chore: deriv analytics version update * fix(cashier): 🐛 content remounting, p2p remounting
- Loading branch information
1 parent
65ee6ec
commit a10f85c
Showing
24 changed files
with
268 additions
and
122 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
24 changes: 24 additions & 0 deletions
24
...rc/components/deposit-sub-page-event-tracker/deposit-sub-page-analytics-event-tracker.tsx
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React, { useEffect } from 'react'; | ||
import { Analytics } from '@deriv-com/analytics'; | ||
import { useStore } from '@deriv/stores'; | ||
|
||
type TProps = { deposit_category: 'crypto' | 'fiat' | 'fiat_onramp' | 'payment_agent' | 'p2p' }; | ||
|
||
const DepositSubPageAnalyticsEventTracker: React.FC<TProps> = ({ deposit_category }) => { | ||
const { client } = useStore(); | ||
const { currency, loginid } = client; | ||
|
||
useEffect(() => { | ||
Analytics.trackEvent('ce_cashier_deposit_onboarding_form', { | ||
action: 'open_deposit_subpage', | ||
form_name: 'ce_cashier_deposit_onboarding_form', | ||
currency, | ||
deposit_category, | ||
login_id: loginid, | ||
}); | ||
}, [currency, deposit_category, loginid]); | ||
|
||
return null; | ||
}; | ||
|
||
export default DepositSubPageAnalyticsEventTracker; |
1 change: 1 addition & 0 deletions
1
packages/cashier/src/components/deposit-sub-page-event-tracker/index.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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as DepositSubPageAnalyticsEventTracker } from './deposit-sub-page-analytics-event-tracker'; |
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
Oops, something went wrong.