Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions e2e/fixtures/pages/overview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export class OverviewPage extends ExtensionPage {
- img
- link "Rewards":
- img
- link "Search":
- img
- link "Settings":
- img
- button "Open Sidepanel":
Expand Down Expand Up @@ -45,10 +47,11 @@ export class OverviewPage extends ExtensionPage {
- link "NFTs"
- link "History"
- link "Perks"
- img "Empty Wallet Cover"
- text: Fund your wallet Buy or transfer crypto to get started
- link "Buy Crypto with Card"
- link "Receive from Another Wallet"
- button "All Networks":
- img
- text: Get Started By adding crypto to your wallet
- button "Fund":
- img
`);
}
}
2 changes: 2 additions & 0 deletions src/modules/statsig/statsig.client.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { useQuery } from '@tanstack/react-query';
import { getStatsigExperiment, getStatsigFeatureGate } from './shared';

export const ONRAMP_EXPERIMENT_NAME = 'web-onramp_flow';

export function useStatsigExperiment(
name: string,
{
Expand Down
5 changes: 4 additions & 1 deletion src/shared/analytics/analytics.background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,15 @@ function trackAppEvents({ account }: { account: Account }) {
if (!preferences.analyticsEnabled) {
return;
}
const { bannerName, pathname, walletAddress } = data;
const { bannerName, pathname, walletAddress, bannerSource, bannerType } =
data;
const params = createParams({
request_name: 'banner_clicked',
screen_name: pathname,
banner_name: bannerName,
wallet_address: walletAddress,
...(bannerSource ? { source: bannerSource } : null),
...(bannerType ? { banner_type: bannerType } : null),
});
const event_name = 'General: Banner Clicked';
const mixpanelParams = omit(params, ['request_name', 'wallet_address']);
Expand Down
11 changes: 9 additions & 2 deletions src/shared/types/button-events.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
// Shared event types for analytics

export type ButtonScope = 'General' | 'Loaylty' | 'General';
export type ButtonScope = 'General' | 'Loaylty';
export type ButtonName =
| 'Claim XP'
| 'Rewards'
| 'Invite Friends'
| 'Rate Tooltip'
| 'Quote List Bottom Description'
| 'Premium Features'
| 'Buy Crypto'
| 'Receive Crypto'
| 'Fund'
| 'Buy Premium';

export interface ButtonClickedParams {
Expand All @@ -17,10 +20,14 @@ export interface ButtonClickedParams {
walletAddress?: string;
}

export type BannerName = 'Buy Premium';
export type BannerName = 'Buy Premium' | 'Get started';
type BannerType = 'Fund_wallet';
type BannerSource = 'Internal';

export interface BannerClickedParams {
pathname: string;
bannerName: BannerName;
bannerType?: BannerType;
bannerSource?: BannerSource;
walletAddress?: string;
}
4 changes: 4 additions & 0 deletions src/ui/assets/actions/fund.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/ui/assets/arrow-circle-outlined.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/ui/assets/identity.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading