-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added pooled staking tooltips analytics events
- Loading branch information
Showing
10 changed files
with
117 additions
and
51 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
23 changes: 23 additions & 0 deletions
23
app/components/UI/Stake/utils/metaMetrics/tooltipMetaMetricsUtils.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,23 @@ | ||
import { MetricsEventBuilder } from '../../../../../core/Analytics/MetricsEventBuilder'; | ||
import { MetaMetricsEvents } from '../../../../hooks/useMetrics'; | ||
|
||
export const getTooltipMetricProperties = ( | ||
location: string, | ||
tooltipName: string, | ||
) => ({ | ||
selected_provider: 'consensys', | ||
text: 'Tooltip Opened', | ||
location, | ||
tooltip_name: tooltipName, | ||
}); | ||
|
||
export const createTooltipOpenedEvent = ( | ||
location: string, | ||
tooltipName: string, | ||
) => { | ||
const createEventBuilder = MetricsEventBuilder.createEventBuilder; | ||
|
||
return createEventBuilder(MetaMetricsEvents.TOOLTIP_OPENED) | ||
.addProperties(getTooltipMetricProperties(location, tooltipName)) | ||
.build(); | ||
}; |
6 changes: 3 additions & 3 deletions
6
...ponents/UI/Stake/utils/withMetaMetrics.ts → ...take/utils/metaMetrics/withMetaMetrics.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
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