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.
feat: add traking events for new dtrader (deriv-com#17370)
* feat: add traking events for new dtrader * fix: resolve commits * refactor: refactor the rudderstack function in trader * fix: stop event from getting fired in contracts page
- Loading branch information
1 parent
c7cd1df
commit 6fcf709
Showing
23 changed files
with
444 additions
and
300 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { Analytics } from '@deriv-com/analytics'; | ||
|
||
export const sendDtraderV2OpenToAnalytics = () => { | ||
Analytics.trackEvent('ce_dtrader_trade_form', { | ||
action: 'open', | ||
}); | ||
}; | ||
|
||
export const sendSelectedTradeTypeToAnalytics = ( | ||
trade_name: string, | ||
subform_name: string, | ||
market_name: string, | ||
trade_type_count: number | ||
) => { | ||
Analytics.trackEvent('ce_dtrader_trade_form', { | ||
action: 'select_trade_type', | ||
trade_name, | ||
subform_name, | ||
market_name, | ||
trade_type_count, | ||
}); | ||
}; | ||
|
||
export const sendOpenGuideToAnalytics = (trade_name: string, subform_name: string) => { | ||
Analytics.trackEvent('ce_dtrader_trade_form', { | ||
action: 'open_guide', | ||
trade_name, | ||
subform_name, | ||
}); | ||
}; | ||
|
||
export const sendMarketTypeToAnalytics = (market_name: string, trade_name: string) => { | ||
Analytics.trackEvent('ce_dtrader_trade_form', { | ||
action: 'select_market_type', | ||
market_name, | ||
trade_name, | ||
}); | ||
}; | ||
|
||
export const sendDtraderV2PurchaseToAnalytics = (trade_name: string, market_name: string, contract_id: number) => { | ||
Analytics.trackEvent('ce_dtrader_trade_form', { | ||
action: 'run_contract', | ||
trade_name, | ||
market_name, | ||
contract_id, | ||
}); | ||
}; | ||
|
||
export const sendDtraderPurchaseToAnalytics = (trade_name: string, market_name: string, contract_id: number) => { | ||
Analytics.trackEvent('ce_contracts_set_up_form', { | ||
action: 'run_contract', | ||
trade_name, | ||
market_name, | ||
contract_id, | ||
}); | ||
}; |
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.