-
Notifications
You must be signed in to change notification settings - Fork 52
/
analytics.ts
269 lines (266 loc) · 7.57 KB
/
analytics.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
export const json = {
completedHtml: "<p style='font-size:24px;'>Thank you for completing the survey! (please wait for analytics to load ...)<p>",
pages: [{
name: "page_info",
elements: [{
type: "radiogroup",
name: "organization_type",
title: "Which of the following best describes you or your organization?",
hasOther: true,
choices: [{
value: "ISV",
text: "ISV (building commercial/shrink-wrapped software)"
}, {
value: "Consulting",
text: "Software consulting firm (providing development services to other organizations)"
}, {
value: "Custom",
text: "Custom software development (as a freelancer/contractor)"
}, {
value: "In-house",
text: "In-house software development"
}, {
value: "Hobbyist",
text: "Hobbyist (developing apps for personal use)"
}],
colCount: 2
}, {
type: "radiogroup",
name: "developer_count",
visibleIf: "{organization_type} != 'Hobbyist'",
title: "How many software developers are in your organization?",
choices: ["1", "2", "3-5", "6-10", "> 10"]
}, {
type: "radiogroup",
name: "vertical_market",
visibleIf: "{organization_type} != 'Hobbyist'",
title: "Which vertical market does your product serve?",
hasOther: true,
choices: [
"Automotive",
"Banking",
"Consumer",
"Education",
"Engineering",
"Energy",
"Fast-moving consumer goods",
"Financial",
"FinTech",
"Food and beverage",
"Government (federal, state, local)",
"Healthcare",
"Insurance",
"Legal",
"Manufacturing",
"Media",
"Online",
"Raw materials",
"Real estate",
"Religion",
"Retail",
"Jewelry",
"Technology",
"Telecommunications",
"Transportation (Travel)",
"Electronics",
"Not-for-profit"
],
colCount: 4
}, {
type: "radiogroup",
name: "product_discovering",
title: "How did you discover our product?",
hasOther: true,
choices: [
"Search engine",
"GitHub",
"Friend or colleague",
"Reddit",
"Medium",
"Twitter",
"Facebook"
],
otherText: "Other",
colCount: 3
}]
}, {
name: "page_libraries_usage",
elements: [{
type: "checkbox",
name: "javascript_frameworks",
title: "Which JavaScript frameworks do you use?",
hasOther: true,
choices: [
"React",
"Angular",
"jQuery",
"Vue",
"Meteor",
"Ember",
"Backbone",
"Knockout",
"Aurelia",
"Polymer",
"Mithril",
],
choicesOrder: "asc",
otherText: "Other",
colCount: 3
}, {
type: "checkbox",
name: "backend_language",
title: "Which web backend programming languages do you use?",
hasOther: true,
choices: [
"Java",
"Python",
"Node.js",
"Go",
"Django",
"C#",
"Ruby",
],
choicesOrder: "asc",
otherText: "Other",
colCount: 3
}],
}, {
name: "page_product_usage",
elements: [{
type: "radiogroup",
name: "useproduct",
title: "Do you currently use our components?",
isRequired: true,
choices: ["Yes", "No"],
}, {
type: "checkbox",
name: "usecomponents",
visibleIf: '{useproduct} = "Yes"',
title: "Which of our components do you use?",
isRequired: true,
choices: ["Survey Library (Runner)", "Survey Creator", "Export to PDF", "SurveyJS Analytics"]
}, {
type: "checkbox",
name: "supported_devices",
title: "Which device types do you need to support?",
isRequired: true,
choices: [ "Desktop", "Tablet", "Mobile" ],
}, {
type: "radiogroup",
name: "native_mobile_support",
visibleIf: '{supported_devices} contains "Mobile"',
title: "How important for you is native mobile support?",
isRequired: true,
choices: [{
value: 1,
text: "I am happy with adaptive HTML rendering"
}, {
value: 2,
text: "Somewhat important, but adaptive HTML rendering is fine"
}, {
value: 3,
text: "Very important"
}, {
value: 4,
text: "Cannot use your components without it"
}]
}, {
type: "radiogroup",
name: "native_framework",
visibleIf: "{native_mobile_support} >= 3",
title: "Which framework are you using or going to use for native mobile developlment?",
hasOther: true,
choices: [
"React Native",
"NativeScript",
"Ionic",
"Xamarin",
"Native iOS and Android apps",
],
otherText: "Other",
colCount: 2
}],
}, {
name: "page_alternative",
elements: [{
type: "radiogroup",
name: "product_alternative",
title: "What would you use as an alternative if our product didn't exist?",
isRequired: true,
hasOther: true,
choices: ["Popular cloud-based platforms", "Self-developed solution"],
otherText: "Other"
}, {
type: "text",
name: "survey_cloud_platform",
visibleIf: '{product_alternative} = "Popular cloud-based platforms"',
title: "What cloud-based platform would you choose?"
}, {
type: "radiogroup",
name: "product_recommend",
title: "Have you recommended our product to anyone?",
choices: ["Yes", "No"]
}]
}, {
name: "page_recommend",
elements: [{
type: "rating",
name: "nps_score",
title: "How likely are you to recommend our product to a friend or colleague?",
isRequired: true,
rateMin: 0,
rateMax: 10,
minRateDescription: "Most unlikely",
maxRateDescription: "Most likely"
}, {
type: "comment",
name: "favorite_functionality",
title: "What feature do you find most useful in our product?"
}, {
type: "comment",
name: "product_improvement",
title: "How could our components be improved to meet your needs better?"
}]
}
]
};
// Survey results
const firstResult = {
organization_type: "In-house",
developer_count: "1",
vertical_market: "Education",
product_discovering: "GitHub",
javascript_frameworks: ["jQuery"],
backend_language: ["Ruby"],
useproduct: "Yes",
usecomponents: ["Survey Library (Runner)"],
supported_devices: ["Desktop", "Tablet", "Mobile"],
native_mobile_support: 2,
product_alternative: "Self-developed solution",
product_recommend: "Yes",
nps_score: 6,
product_improvement: "The lack of accessibility is a huge disadvantage. That's one reason why I cannot use it in all my projects.",
native_framework: "",
survey_cloud_platform: "",
favorite_functionality: "",
};
const secondResult = {
organization_type: "Consulting",
developer_count: "3-5",
vertical_market: "Government (federal, state, local)",
product_discovering: "Search engine",
javascript_frameworks: ["Vue", "jQuery", "other"],
backend_language: ["Python", "Node.js"],
useproduct: "Yes",
usecomponents: ["Survey Library (Runner)"],
supported_devices: ["Desktop"],
product_alternative: "Develop ourselves",
product_recommend: "Yes",
nps_score: 8,
native_mobile_support: "",
native_framework: "",
survey_cloud_platform: "",
favorite_functionality: "",
product_improvement: "",
};
export const data = [firstResult, secondResult];