Add os preference tracking (#20740)
* Set cookie on os switch * Set os based on cookie value * Add os preference schema details * Send os preference on page request * Send os preference on os switch
This commit is contained in:
@@ -107,10 +107,11 @@ const context = {
|
||||
},
|
||||
|
||||
// Preference information
|
||||
/* os_preference: {
|
||||
os_preference: {
|
||||
type: 'string',
|
||||
description: 'The os for examples selected by the user.'
|
||||
}, */
|
||||
enum: ['linux', 'mac', 'windows'],
|
||||
description: 'The os for examples selected by the user.',
|
||||
},
|
||||
application_preference: {
|
||||
type: 'string',
|
||||
enum: ['webui', 'cli', 'desktop', 'curl'],
|
||||
@@ -360,13 +361,26 @@ const preferenceSchema = {
|
||||
},
|
||||
preference_name: {
|
||||
type: 'string',
|
||||
enum: ['application', 'color_mode'], // os
|
||||
enum: ['application', 'color_mode', 'os'],
|
||||
description: 'The preference name, such as os, application, or color_mode',
|
||||
},
|
||||
preference_value: {
|
||||
type: 'string',
|
||||
enum: ['webui', 'cli', 'desktop', 'curl', 'dark', 'light', 'auto', 'auto:dark', 'auto:light'],
|
||||
description: 'The application or color_mode selected by the user.',
|
||||
enum: [
|
||||
'webui',
|
||||
'cli',
|
||||
'desktop',
|
||||
'curl',
|
||||
'dark',
|
||||
'light',
|
||||
'auto',
|
||||
'auto:dark',
|
||||
'auto:light',
|
||||
'linux',
|
||||
'mac',
|
||||
'windows',
|
||||
],
|
||||
description: 'The application, color_mode, or os selected by the user.',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user