-
Notifications
You must be signed in to change notification settings - Fork 496
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial implementation * remove unnecessary properties
- Loading branch information
Showing
5 changed files
with
49 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import mixpanel from 'mixpanel-browser'; | ||
|
||
import type { PickByType } from 'types/utils'; | ||
|
||
interface UserProfileProperties { | ||
'With Account': boolean; | ||
'With Connected Wallet': boolean; | ||
'Device Type': string; | ||
'First Time Join': string; | ||
} | ||
|
||
type UserProfilePropertiesNumerable = PickByType<UserProfileProperties, number>; | ||
|
||
export function set(props: Partial<UserProfileProperties>) { | ||
mixpanel.people.set(props); | ||
} | ||
|
||
export function setOnce(props: Partial<UserProfileProperties>) { | ||
mixpanel.people.set_once(props); | ||
} | ||
|
||
export function increment(props: UserProfilePropertiesNumerable) { | ||
mixpanel.people.increment(props); | ||
} |
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