|
72 | 72 | return { |
73 | 73 | groups: { |
74 | 74 | global: { |
75 | | - label: "SDK control", |
| 75 | + label: "Global Controls", |
76 | 76 | list: ["tracking", "networking"] |
77 | 77 | }, |
78 | | - /*features: { |
79 | | - label: "SDK features", |
80 | | - list: ["crashes", "views"] |
| 78 | + features: { |
| 79 | + label: "SDK Features", |
| 80 | + list: ["crt", "vt", "st", "cet", "ecz", "cr"] |
81 | 81 | }, |
82 | 82 | settings: { |
83 | | - label: "SDK settings", |
84 | | - list: ["heartbeat", "event_queue","request_queue"] |
85 | | - }*/ |
| 83 | + label: "SDK Settings", |
| 84 | + list: ["sui", "eqs", "rqs", "czi", "dort", "scui"] |
| 85 | + }, |
| 86 | + limits: { |
| 87 | + label: "SDK Limits", |
| 88 | + list: ["lkl", "lvs", "lsv", "lbc", "ltlpt", "ltl"] |
| 89 | + }, |
86 | 90 | }, |
87 | 91 | configs: { |
88 | 92 | tracking: { |
89 | 93 | type: "switch", |
90 | | - name: "SDK Tracking", |
91 | | - description: "Enable or disable tracking any data in the SDK. If disabled, tracking new data will stop, but already collected data will be sent as long as networking is enabled", |
| 94 | + name: "Allow Tracking", |
| 95 | + description: "Enable or disable any tracking (gathering) of data in the SDK (default: enabled)", |
92 | 96 | default: true, |
93 | 97 | value: null |
94 | 98 | }, |
95 | 99 | networking: { |
96 | 100 | type: "switch", |
97 | | - name: "SDK Networking", |
98 | | - description: "Enable or disable networking calls within SDK. If disabled no network requests will come from SDK (except SDK config call), but data would still be recorded and preserved on device up to the SDK limits", |
| 101 | + name: "Allow Networking", |
| 102 | + description: "Enable or disable all networking calls from SDK except SDK config call. Does not effect tracking of data (default: enabled)", |
| 103 | + default: true, |
| 104 | + value: null |
| 105 | + }, |
| 106 | + crt: { |
| 107 | + type: "switch", |
| 108 | + name: "Allow Crash Tracking", |
| 109 | + description: "Enable or disable tracking of crashes (default: enabled)", |
99 | 110 | default: true, |
100 | 111 | value: null |
101 | 112 | }, |
102 | | - /*crashes: { |
| 113 | + vt: { |
103 | 114 | type: "switch", |
104 | | - name: "Crashes", |
105 | | - description: "Enable or disable automatic tracking of unhandled crashes", |
| 115 | + name: "Allow View Tracking", |
| 116 | + description: "Enable or disable tracking of views (default: enabled)", |
106 | 117 | default: true, |
107 | 118 | value: null |
108 | 119 | }, |
109 | | - views: { |
| 120 | + st: { |
110 | 121 | type: "switch", |
111 | | - name: "Views", |
112 | | - description: "Enable or disable automatic tracking of views", |
| 122 | + name: "Allow Session Tracking", |
| 123 | + description: "Enable or disable tracking of sessions (default: enabled)", |
113 | 124 | default: true, |
114 | 125 | value: null |
115 | 126 | }, |
116 | | - heartbeat: { |
| 127 | + sui: { |
117 | 128 | type: "number", |
118 | | - name: "Heartbeat", |
119 | | - description: "How often to send heartbeat to server in seconds", |
| 129 | + name: "Session Update Interval", |
| 130 | + description: "How often to send session update information to server in seconds (default: 60)", |
120 | 131 | default: 60, |
121 | 132 | value: null |
122 | 133 | }, |
123 | | - request_queue: { |
| 134 | + cet: { |
| 135 | + type: "switch", |
| 136 | + name: "Allow Custom Event Tracking", |
| 137 | + description: "Enable or disable tracking of custom events (default: enabled)", |
| 138 | + default: true, |
| 139 | + value: null |
| 140 | + }, |
| 141 | + ecz: { |
| 142 | + type: "switch", |
| 143 | + name: "Enable Content Zone", |
| 144 | + description: "Enable or disable listening to Journey related contents (default: false)", |
| 145 | + default: false, |
| 146 | + value: null |
| 147 | + }, |
| 148 | + cr: { |
| 149 | + type: "switch", |
| 150 | + name: "Require Consent", |
| 151 | + description: "Enable or disable requiring consent for tracking (default: false)", |
| 152 | + default: false, |
| 153 | + value: null |
| 154 | + }, |
| 155 | + rqs: { |
124 | 156 | type: "number", |
125 | 157 | name: "Request Queue Size", |
126 | | - description: "How many requests to store in queue, if SDK cannot connect to server", |
| 158 | + description: "How many requests to store in queue, if SDK cannot connect to server (default: 1000)", |
127 | 159 | default: 1000, |
128 | 160 | value: null |
129 | 161 | }, |
130 | | - event_queue: { |
| 162 | + eqs: { |
131 | 163 | type: "number", |
132 | 164 | name: "Event Queue Size", |
133 | | - description: "How many events to store in queue before they would be batched and sent to server", |
134 | | - default: 10, |
| 165 | + description: "How many events to store in queue before they would be batched and sent to server (default: 100)", |
| 166 | + default: 100, |
| 167 | + value: null |
| 168 | + }, |
| 169 | + czi: { |
| 170 | + type: "number", |
| 171 | + name: "Content Zone Interval", |
| 172 | + description: "How often to check for new Journey content in seconds (default: 30, min: 15)", |
| 173 | + default: 30, |
| 174 | + value: null |
| 175 | + }, |
| 176 | + dort: { |
| 177 | + type: "number", |
| 178 | + name: "Request Drop Age", |
| 179 | + description: "Provide time in hours after which an old request should be dropped if they are not sent to server (default: 0 = not enabled)", |
| 180 | + default: 0, |
| 181 | + value: null |
| 182 | + }, |
| 183 | + lkl: { |
| 184 | + type: "number", |
| 185 | + name: "Max Key Length", |
| 186 | + description: "Maximum length of an Event's key (including name) (default: 128)", |
| 187 | + default: 128, |
| 188 | + value: null |
| 189 | + }, |
| 190 | + lvs: { |
| 191 | + type: "number", |
| 192 | + name: "Max Value Size", |
| 193 | + description: "Maximum length of an Event's segment value (default: 256)", |
| 194 | + default: 256, |
| 195 | + value: null |
| 196 | + }, |
| 197 | + lsv: { |
| 198 | + type: "number", |
| 199 | + name: "Max Number of Segments", |
| 200 | + description: "Maximum amount of segmentation key/value pairs per Event (default: 100)", |
| 201 | + default: 100, |
| 202 | + value: null |
| 203 | + }, |
| 204 | + lbc: { |
| 205 | + type: "number", |
| 206 | + name: "Max Breadcrumb Count", |
| 207 | + description: "Maximum breadcrumb count that can be provided by the developer (default: 100)", |
| 208 | + default: 100, |
135 | 209 | value: null |
136 | | - }*/ |
| 210 | + }, |
| 211 | + ltlpt: { |
| 212 | + type: "number", |
| 213 | + name: "Max Trace Line Per Thread", |
| 214 | + description: "Maximum stack trace lines that would be recorded per thread (default: 30)", |
| 215 | + default: 30, |
| 216 | + value: null |
| 217 | + }, |
| 218 | + ltl: { |
| 219 | + type: "number", |
| 220 | + name: "Max Trace Length Per Line", |
| 221 | + description: "Maximum length of a stack trace line to be recorded (default: 200)", |
| 222 | + default: 200, |
| 223 | + value: null |
| 224 | + }, |
| 225 | + scui: { |
| 226 | + type: "number", |
| 227 | + name: "Server Config Update Interval", |
| 228 | + description: "How often to check for new server config in hours (default: 4)", |
| 229 | + default: 4, |
| 230 | + value: null |
| 231 | + } |
137 | 232 | }, |
138 | 233 | diff: [], |
139 | | - description: "This is experimental feature and not all SDKs and SDK versions yet support it. Refer to the SDK documentation for more information" |
| 234 | + description: "This is experimental feature and not all SDKs and SDK versions yet support it. Refer to the SDK documentation for more information", |
| 235 | + downloadDescription: "Download the current SDK configuration as a JSON file to provide to the SDK", |
140 | 236 | }; |
141 | 237 | }, |
142 | 238 | methods: { |
|
158 | 254 | } |
159 | 255 | } |
160 | 256 | }, |
| 257 | + downloadConfig: function() { |
| 258 | + var params = this.$store.getters["countlySDK/sdk/all"]; |
| 259 | + var data = {}; |
| 260 | + data.v = 1; // check sdk/api/api.js for version |
| 261 | + data.t = Date.now(); |
| 262 | + data.c = params || {}; |
| 263 | + var configData = JSON.stringify(data, null, 2); |
| 264 | + var blob = new Blob([configData], { type: 'application/json' }); |
| 265 | + var url = URL.createObjectURL(blob); |
| 266 | + var a = document.createElement('a'); |
| 267 | + a.href = url; |
| 268 | + a.download = 'sdk-config.json'; |
| 269 | + document.body.appendChild(a); |
| 270 | + a.click(); |
| 271 | + document.body.removeChild(a); |
| 272 | + URL.revokeObjectURL(url); |
| 273 | + }, |
161 | 274 | save: function() { |
162 | 275 | var params = this.$store.getters["countlySDK/sdk/all"]; |
163 | 276 | var data = params || {}; |
|
0 commit comments