mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
Create shared TRAITS
constant (#14069)
* Create shared `TRAITS` constant Create a new constant in shared/constants/metametrics.js called TRAITS. Using the other issues in this epic as guidance, populate the constant with traits. Add Documentation to this constant about what each trait is. Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com> * use field names as the constants only interested in 4 traits now for the MVP Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com> * cut down comments length for readability. Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com> * Lint fixes. Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com> * 80 chars comments length Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
This commit is contained in:
parent
2419162562
commit
edb5ecc38c
@ -154,6 +154,30 @@
|
||||
* the page view
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} Traits
|
||||
* @property {string} [LEDGER_CONNECTION_TYPE] - when ledger live connnection
|
||||
* type is changed we identify the ledger_connection_type trait
|
||||
* @property {string} [NETWORKS_ADDED] - when user modifies networks we
|
||||
* identify the networks_added trait
|
||||
* @property {string} [NUMBER_OF_ACCOUNTS] - when identities change, we
|
||||
* identify the new number_of_accounts trait
|
||||
* @property {string} [THREE_BOX_ENABLED] - when 3box feature is toggled we
|
||||
* identify the 3box_enabled trait
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @type {Traits}
|
||||
*/
|
||||
|
||||
export const TRAITS = {
|
||||
LEDGER_CONNECTION_TYPE: 'ledger_connection_type',
|
||||
THREE_BOX_ENABLED: 'three_box_enabled',
|
||||
NUMBER_OF_ACCOUNTS: 'number_of_accounts',
|
||||
NETWORKS_ADDED: 'networks_added',
|
||||
};
|
||||
|
||||
// Mixpanel converts the zero address value to a truly anonymous event, which
|
||||
// speeds up reporting
|
||||
export const METAMETRICS_ANONYMOUS_ID = '0x0000000000000000';
|
||||
|
Loading…
Reference in New Issue
Block a user