tango-app-api-analysis-zone 3.0.0-alpha.16 → 3.0.0-alpha.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -22,26 +22,26 @@ export const zonecards = async ( req, res ) => {
|
|
|
22
22
|
let result = {
|
|
23
23
|
'card': {
|
|
24
24
|
'footfall': {
|
|
25
|
-
'count':
|
|
25
|
+
'count': 2067, // Store Footfall Count
|
|
26
26
|
'zoneName': 'Entry', // highest Zone Footfall
|
|
27
|
-
'zoneFootfallCount':
|
|
27
|
+
'zoneFootfallCount': 1234,
|
|
28
28
|
},
|
|
29
29
|
'impression': {
|
|
30
|
-
'rate':
|
|
31
|
-
'zoneName': '
|
|
32
|
-
'zoneImpressionRate':
|
|
30
|
+
'rate': 65, // Store impression rate
|
|
31
|
+
'zoneName': 'Vincent Chase', // highest Impression(Concentration)
|
|
32
|
+
'zoneImpressionRate': 32,
|
|
33
33
|
},
|
|
34
34
|
'bounced': {
|
|
35
|
-
'rate':
|
|
36
|
-
'zoneName': '
|
|
35
|
+
'rate': 56, // Store bounced rate
|
|
36
|
+
'zoneName': 'John Jacobs', // highest Bounced
|
|
37
37
|
},
|
|
38
38
|
'engagers': {
|
|
39
|
-
'rate': 89
|
|
40
|
-
'zoneName': '
|
|
39
|
+
'rate': 89, // Store engagers rate
|
|
40
|
+
'zoneName': 'Air', // highest Engagers
|
|
41
41
|
},
|
|
42
42
|
'avgDwellTime': {
|
|
43
|
-
'rate':
|
|
44
|
-
'zoneName': '
|
|
43
|
+
'rate': 57, // Store avgDwellTime rate
|
|
44
|
+
'zoneName': 'Exit', // highest Average Dwell Time
|
|
45
45
|
},
|
|
46
46
|
},
|
|
47
47
|
};
|
|
@@ -51,6 +51,7 @@ export const zonecards = async ( req, res ) => {
|
|
|
51
51
|
return res.sendError( { error: error }, 500 );
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
|
+
|
|
54
55
|
export const topPerformingZones = async ( req, res ) => {
|
|
55
56
|
try {
|
|
56
57
|
let reqestData = req.body;
|
|
@@ -71,11 +72,11 @@ export const topPerformingZones = async ( req, res ) => {
|
|
|
71
72
|
|
|
72
73
|
let result = {
|
|
73
74
|
'topPerformingZones': [
|
|
74
|
-
{ 'zoneName': '
|
|
75
|
-
{ 'zoneName': '
|
|
76
|
-
{ 'zoneName': '
|
|
77
|
-
{ 'zoneName': '
|
|
78
|
-
{ 'zoneName': '
|
|
75
|
+
{ 'zoneName': 'Entry', 'footfallCount': 100, 'bouncedCount': 40, 'engagersCount': 30, 'impressionRate': 50 },
|
|
76
|
+
{ 'zoneName': 'John Jacobs', 'footfallCount': 98, 'bouncedCount': 38, 'engagersCount': 28, 'impressionRate': 48 },
|
|
77
|
+
{ 'zoneName': 'Vincent Chase', 'footfallCount': 96, 'bouncedCount': 36, 'engagersCount': 26, 'impressionRate': 46 },
|
|
78
|
+
{ 'zoneName': 'Air', 'footfallCount': 94, 'bouncedCount': 34, 'engagersCount': 24, 'impressionRate': 44 },
|
|
79
|
+
{ 'zoneName': 'Exit', 'footfallCount': 92, 'bouncedCount': 32, 'engagersCount': 22, 'impressionRate': 42 },
|
|
79
80
|
],
|
|
80
81
|
};
|
|
81
82
|
return res.sendSuccess( result );
|
|
@@ -84,6 +85,7 @@ export const topPerformingZones = async ( req, res ) => {
|
|
|
84
85
|
return res.sendError( { error: error }, 500 );
|
|
85
86
|
}
|
|
86
87
|
};
|
|
88
|
+
|
|
87
89
|
export const topPerformingStores = async ( req, res ) => {
|
|
88
90
|
try {
|
|
89
91
|
let reqestData = req.body;
|
|
@@ -104,11 +106,11 @@ export const topPerformingStores = async ( req, res ) => {
|
|
|
104
106
|
|
|
105
107
|
let result = {
|
|
106
108
|
'topPerformingStores': [
|
|
107
|
-
{ 'storeName': 'LKST11-300', 'storeId': '11-300', 'zoneName': '
|
|
108
|
-
{ 'storeName': 'LKST11-301', 'storeId': '11-301', 'zoneName': '
|
|
109
|
-
{ 'storeName': 'LKST11-302', 'storeId': '11-302', 'zoneName': '
|
|
110
|
-
{ 'storeName': 'LKST11-303', 'storeId': '11-303', 'zoneName': '
|
|
111
|
-
{ 'storeName': 'LKST11-304', 'storeId': '11-304', 'zoneName': '
|
|
109
|
+
{ 'storeName': 'LKST11-300', 'storeId': '11-300', 'zoneName': 'Entry', 'zoneFootfallCount': 90, 'impressionRate': 40, 'avgDwellTime': 39 },
|
|
110
|
+
{ 'storeName': 'LKST11-301', 'storeId': '11-301', 'zoneName': 'John Jacobs', 'zoneFootfallCount': 30, 'impressionRate': 30, 'avgDwellTime': 128 },
|
|
111
|
+
{ 'storeName': 'LKST11-302', 'storeId': '11-302', 'zoneName': 'Vincent Chase', 'zoneFootfallCount': 50, 'impressionRate': 60, 'avgDwellTime': 35 },
|
|
112
|
+
{ 'storeName': 'LKST11-303', 'storeId': '11-303', 'zoneName': 'Air', 'zoneFootfallCount': 70, 'impressionRate': 44, 'avgDwellTime': 33 },
|
|
113
|
+
{ 'storeName': 'LKST11-304', 'storeId': '11-304', 'zoneName': 'Exit', 'zoneFootfallCount': 40, 'impressionRate': 48, 'avgDwellTime': 24 },
|
|
112
114
|
],
|
|
113
115
|
};
|
|
114
116
|
return res.sendSuccess( result );
|
|
@@ -117,6 +119,7 @@ export const topPerformingStores = async ( req, res ) => {
|
|
|
117
119
|
return res.sendError( { error: error }, 500 );
|
|
118
120
|
}
|
|
119
121
|
};
|
|
122
|
+
|
|
120
123
|
export const zoneSummaryTable = async ( req, res ) => {
|
|
121
124
|
try {
|
|
122
125
|
let reqestData = req.body;
|
|
@@ -142,7 +145,178 @@ export const zoneSummaryTable = async ( req, res ) => {
|
|
|
142
145
|
'storeName': 'LKST400',
|
|
143
146
|
'date': '2024-01-01',
|
|
144
147
|
'storeId': '11-10',
|
|
145
|
-
'zoneName': '
|
|
148
|
+
'zoneName': 'John Jacobs',
|
|
149
|
+
'footfallCount': 400,
|
|
150
|
+
'bouncedCount': 40,
|
|
151
|
+
'engagersCount': 60,
|
|
152
|
+
'impressionRate': 70.5,
|
|
153
|
+
'avgDwellTime': 50,
|
|
154
|
+
'bellow12': 30,
|
|
155
|
+
'13-19': 50,
|
|
156
|
+
'20-30': 40,
|
|
157
|
+
'31-45': 20,
|
|
158
|
+
'46-59': 30,
|
|
159
|
+
'60 above': 60,
|
|
160
|
+
'maleCount': 40,
|
|
161
|
+
'femaleCount': 50,
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
'storeName': 'LKST400',
|
|
165
|
+
'date': '2024-01-01',
|
|
166
|
+
'storeId': '11-10',
|
|
167
|
+
'zoneName': 'Vincent Chase',
|
|
168
|
+
'footfallCount': 400,
|
|
169
|
+
'bouncedCount': 40,
|
|
170
|
+
'engagersCount': 60,
|
|
171
|
+
'impressionRate': 70.5,
|
|
172
|
+
'avgDwellTime': 50,
|
|
173
|
+
'bellow12': 30,
|
|
174
|
+
'13-19': 50,
|
|
175
|
+
'20-30': 40,
|
|
176
|
+
'31-45': 20,
|
|
177
|
+
'46-59': 30,
|
|
178
|
+
'60 above': 60,
|
|
179
|
+
'maleCount': 40,
|
|
180
|
+
'femaleCount': 50,
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
'storeName': 'LKST400',
|
|
184
|
+
'date': '2024-01-01',
|
|
185
|
+
'storeId': '11-10',
|
|
186
|
+
'zoneName': 'Vincent Chase',
|
|
187
|
+
'footfallCount': 400,
|
|
188
|
+
'bouncedCount': 40,
|
|
189
|
+
'engagersCount': 60,
|
|
190
|
+
'impressionRate': 70.5,
|
|
191
|
+
'avgDwellTime': 50,
|
|
192
|
+
'bellow12': 30,
|
|
193
|
+
'13-19': 50,
|
|
194
|
+
'20-30': 40,
|
|
195
|
+
'31-45': 20,
|
|
196
|
+
'46-59': 30,
|
|
197
|
+
'60 above': 60,
|
|
198
|
+
'maleCount': 40,
|
|
199
|
+
'femaleCount': 50,
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
'storeName': 'LKST400',
|
|
203
|
+
'date': '2024-01-01',
|
|
204
|
+
'storeId': '11-10',
|
|
205
|
+
'zoneName': 'Entry',
|
|
206
|
+
'footfallCount': 400,
|
|
207
|
+
'bouncedCount': 40,
|
|
208
|
+
'engagersCount': 60,
|
|
209
|
+
'impressionRate': 70.5,
|
|
210
|
+
'avgDwellTime': 50,
|
|
211
|
+
'bellow12': 30,
|
|
212
|
+
'13-19': 50,
|
|
213
|
+
'20-30': 40,
|
|
214
|
+
'31-45': 20,
|
|
215
|
+
'46-59': 30,
|
|
216
|
+
'60 above': 60,
|
|
217
|
+
'maleCount': 40,
|
|
218
|
+
'femaleCount': 50,
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
'storeName': 'LKST400',
|
|
222
|
+
'date': '2024-01-01',
|
|
223
|
+
'storeId': '11-10',
|
|
224
|
+
'zoneName': 'Exit',
|
|
225
|
+
'footfallCount': 400,
|
|
226
|
+
'bouncedCount': 40,
|
|
227
|
+
'engagersCount': 60,
|
|
228
|
+
'impressionRate': 70.5,
|
|
229
|
+
'avgDwellTime': 50,
|
|
230
|
+
'bellow12': 30,
|
|
231
|
+
'13-19': 50,
|
|
232
|
+
'20-30': 40,
|
|
233
|
+
'31-45': 20,
|
|
234
|
+
'46-59': 30,
|
|
235
|
+
'60 above': 60,
|
|
236
|
+
'maleCount': 40,
|
|
237
|
+
'femaleCount': 50,
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
'storeName': 'LKST400',
|
|
241
|
+
'date': '2024-01-01',
|
|
242
|
+
'storeId': '11-10',
|
|
243
|
+
'zoneName': 'Exit',
|
|
244
|
+
'footfallCount': 400,
|
|
245
|
+
'bouncedCount': 40,
|
|
246
|
+
'engagersCount': 60,
|
|
247
|
+
'impressionRate': 70.5,
|
|
248
|
+
'avgDwellTime': 50,
|
|
249
|
+
'bellow12': 30,
|
|
250
|
+
'13-19': 50,
|
|
251
|
+
'20-30': 40,
|
|
252
|
+
'31-45': 20,
|
|
253
|
+
'46-59': 30,
|
|
254
|
+
'60 above': 60,
|
|
255
|
+
'maleCount': 40,
|
|
256
|
+
'femaleCount': 50,
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
'storeName': 'LKST400',
|
|
260
|
+
'date': '2024-01-01',
|
|
261
|
+
'storeId': '11-10',
|
|
262
|
+
'zoneName': 'John Jacobs',
|
|
263
|
+
'footfallCount': 400,
|
|
264
|
+
'bouncedCount': 40,
|
|
265
|
+
'engagersCount': 60,
|
|
266
|
+
'impressionRate': 70.5,
|
|
267
|
+
'avgDwellTime': 50,
|
|
268
|
+
'bellow12': 30,
|
|
269
|
+
'13-19': 50,
|
|
270
|
+
'20-30': 40,
|
|
271
|
+
'31-45': 20,
|
|
272
|
+
'46-59': 30,
|
|
273
|
+
'60 above': 60,
|
|
274
|
+
'maleCount': 40,
|
|
275
|
+
'femaleCount': 50,
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
'storeName': 'LKST400',
|
|
279
|
+
'date': '2024-01-01',
|
|
280
|
+
'storeId': '11-10',
|
|
281
|
+
'zoneName': 'John Jacobs',
|
|
282
|
+
'footfallCount': 400,
|
|
283
|
+
'bouncedCount': 40,
|
|
284
|
+
'engagersCount': 60,
|
|
285
|
+
'impressionRate': 70.5,
|
|
286
|
+
'avgDwellTime': 50,
|
|
287
|
+
'bellow12': 30,
|
|
288
|
+
'13-19': 50,
|
|
289
|
+
'20-30': 40,
|
|
290
|
+
'31-45': 20,
|
|
291
|
+
'46-59': 30,
|
|
292
|
+
'60 above': 60,
|
|
293
|
+
'maleCount': 40,
|
|
294
|
+
'femaleCount': 50,
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
'storeName': 'LKST400',
|
|
298
|
+
'date': '2024-01-01',
|
|
299
|
+
'storeId': '11-10',
|
|
300
|
+
'zoneName': 'Air',
|
|
301
|
+
'footfallCount': 400,
|
|
302
|
+
'bouncedCount': 40,
|
|
303
|
+
'engagersCount': 60,
|
|
304
|
+
'impressionRate': 70.5,
|
|
305
|
+
'avgDwellTime': 50,
|
|
306
|
+
'bellow12': 30,
|
|
307
|
+
'13-19': 50,
|
|
308
|
+
'20-30': 40,
|
|
309
|
+
'31-45': 20,
|
|
310
|
+
'46-59': 30,
|
|
311
|
+
'60 above': 60,
|
|
312
|
+
'maleCount': 40,
|
|
313
|
+
'femaleCount': 50,
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
'storeName': 'LKST400',
|
|
317
|
+
'date': '2024-01-01',
|
|
318
|
+
'storeId': '11-10',
|
|
319
|
+
'zoneName': 'Air',
|
|
146
320
|
'footfallCount': 400,
|
|
147
321
|
'bouncedCount': 40,
|
|
148
322
|
'engagersCount': 60,
|
|
@@ -165,6 +339,7 @@ export const zoneSummaryTable = async ( req, res ) => {
|
|
|
165
339
|
return res.sendError( { error: error }, 500 );
|
|
166
340
|
}
|
|
167
341
|
};
|
|
342
|
+
|
|
168
343
|
export const availableZoneNames = async ( req, res ) => {
|
|
169
344
|
try {
|
|
170
345
|
let reqestData = req.body;
|
|
@@ -185,9 +360,13 @@ export const availableZoneNames = async ( req, res ) => {
|
|
|
185
360
|
|
|
186
361
|
let result = {
|
|
187
362
|
'availableZoneData': [
|
|
188
|
-
{ 'zoneName': '
|
|
189
|
-
{ 'zoneName': '
|
|
190
|
-
{ 'zoneName': '
|
|
363
|
+
{ 'zoneName': 'Overall Zones' },
|
|
364
|
+
{ 'zoneName': 'Entrance' },
|
|
365
|
+
{ 'zoneName': 'Vincent Chase' },
|
|
366
|
+
{ 'zoneName': 'John Jacobs' },
|
|
367
|
+
{ 'zoneName': 'Premium Section' },
|
|
368
|
+
{ 'zoneName': 'Billing' },
|
|
369
|
+
{ 'zoneName': 'Entrance/Exit' },
|
|
191
370
|
],
|
|
192
371
|
};
|
|
193
372
|
return res.sendSuccess( result );
|
|
@@ -196,6 +375,7 @@ export const availableZoneNames = async ( req, res ) => {
|
|
|
196
375
|
return res.sendError( { error: error }, 500 );
|
|
197
376
|
}
|
|
198
377
|
};
|
|
378
|
+
|
|
199
379
|
export const zoneConcentrationSummary = async ( req, res ) => {
|
|
200
380
|
try {
|
|
201
381
|
let reqestData = req.body;
|
|
@@ -217,7 +397,7 @@ export const zoneConcentrationSummary = async ( req, res ) => {
|
|
|
217
397
|
let result = {
|
|
218
398
|
'zoneConcentrationData': [
|
|
219
399
|
{
|
|
220
|
-
'zoneName': '
|
|
400
|
+
'zoneName': 'Overall Zones',
|
|
221
401
|
'footfall': {
|
|
222
402
|
'zoneCount': 10,
|
|
223
403
|
'storeRate': 65.0,
|
|
@@ -283,6 +463,7 @@ export const zoneConcentrationSummary = async ( req, res ) => {
|
|
|
283
463
|
return res.sendError( { error: error }, 500 );
|
|
284
464
|
}
|
|
285
465
|
};
|
|
466
|
+
|
|
286
467
|
export const overallStoreConcentrationDates = async ( req, res ) => {
|
|
287
468
|
try {
|
|
288
469
|
let reqestData = req.body;
|
|
@@ -314,6 +495,7 @@ export const overallStoreConcentrationDates = async ( req, res ) => {
|
|
|
314
495
|
return res.sendError( { error: error }, 500 );
|
|
315
496
|
}
|
|
316
497
|
};
|
|
498
|
+
|
|
317
499
|
export const overallStoreConcentrationHeatmap = async ( req, res ) => {
|
|
318
500
|
try {
|
|
319
501
|
let reqestData = req.body;
|
|
@@ -360,6 +542,7 @@ export const overallStoreConcentrationHeatmap = async ( req, res ) => {
|
|
|
360
542
|
return res.sendError( { error: error }, 500 );
|
|
361
543
|
}
|
|
362
544
|
};
|
|
545
|
+
|
|
363
546
|
export const trajectoryAnalysis = async ( req, res ) => {
|
|
364
547
|
try {
|
|
365
548
|
let reqestData = req.body;
|
|
@@ -380,16 +563,24 @@ export const trajectoryAnalysis = async ( req, res ) => {
|
|
|
380
563
|
|
|
381
564
|
let result = {
|
|
382
565
|
'trajectoryAnalysisData': {
|
|
383
|
-
'zoneList': [
|
|
566
|
+
'zoneList': [
|
|
567
|
+
{ 'from': 'Entrance', 'to': 'Vincent Chase', 'value': 10 },
|
|
568
|
+
{ 'from': 'Entrance', 'to': 'John Jacobs', 'value': 20 },
|
|
569
|
+
{ 'from': 'Entrance', 'to': 'Premium Section', 'value': 10 },
|
|
570
|
+
{ 'from': 'Entrance', 'to': 'Billing', 'value': 30 },
|
|
571
|
+
{ 'from': 'Entrance', 'to': 'Exit', 'value': 10 },
|
|
572
|
+
],
|
|
384
573
|
'otherZone': {
|
|
385
574
|
'impressionRate': 40.0,
|
|
386
575
|
'gender': 'Male', // ["Male","Female"]
|
|
387
576
|
'ageGroup': '20-30',
|
|
577
|
+
'ageGenderRate': 40,
|
|
388
578
|
},
|
|
389
579
|
'currentZone': {
|
|
390
580
|
'impressionRate': 40.0,
|
|
391
581
|
'gender': 'Female', // ["Male","Female"]
|
|
392
582
|
'ageGroup': '20-30',
|
|
583
|
+
'ageGenderRate': 30,
|
|
393
584
|
},
|
|
394
585
|
},
|
|
395
586
|
};
|
|
@@ -399,6 +590,7 @@ export const trajectoryAnalysis = async ( req, res ) => {
|
|
|
399
590
|
return res.sendError( { error: error }, 500 );
|
|
400
591
|
}
|
|
401
592
|
};
|
|
593
|
+
|
|
402
594
|
export const customerJourney = async ( req, res ) => {
|
|
403
595
|
try {
|
|
404
596
|
let reqestData = req.body;
|
|
@@ -418,7 +610,18 @@ export const customerJourney = async ( req, res ) => {
|
|
|
418
610
|
}
|
|
419
611
|
|
|
420
612
|
let result = {
|
|
421
|
-
'customerJourneyData': {
|
|
613
|
+
'customerJourneyData': {
|
|
614
|
+
'zoneList': [
|
|
615
|
+
{ from: 'Entry (1343)', to: 'Vincent Chase (1343)', value: 20 },
|
|
616
|
+
{ from: 'Vincent Chase (1343)', to: 'John Jacobs (1343)', value: 20 },
|
|
617
|
+
{ from: 'Entry (1343)', to: 'John Jacobs (1343)', value: 40 },
|
|
618
|
+
{ from: 'Entry (1343)', to: 'Premium Section (1343)', value: 20 },
|
|
619
|
+
{ from: 'John Jacobs (1343)', to: 'Billing (1343)', value: 20 },
|
|
620
|
+
{ from: 'Billing (1343)', to: 'Exit', value: 20 },
|
|
621
|
+
{ from: 'Premium Section (1343)', to: 'Exit', value: 20 },
|
|
622
|
+
{ from: 'Premium Section (1343)', to: 'Billing (1343)', value: 20 },
|
|
623
|
+
],
|
|
624
|
+
},
|
|
422
625
|
};
|
|
423
626
|
return res.sendSuccess( result );
|
|
424
627
|
} catch ( error ) {
|
|
@@ -426,6 +629,77 @@ export const customerJourney = async ( req, res ) => {
|
|
|
426
629
|
return res.sendError( { error: error }, 500 );
|
|
427
630
|
}
|
|
428
631
|
};
|
|
632
|
+
|
|
633
|
+
export const customerJourneyTable = async ( req, res ) => {
|
|
634
|
+
try {
|
|
635
|
+
let reqestData = req.body;
|
|
636
|
+
let checkNoData = await returnNoData( reqestData.storeId );
|
|
637
|
+
if ( checkNoData ) {
|
|
638
|
+
return res.sendError( { error: 'No Data Found' }, 204 );
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
let checkInvalidRequest = await returnInvalidRequest( reqestData.storeId );
|
|
642
|
+
if ( checkInvalidRequest ) {
|
|
643
|
+
return res.sendError( { error: 'Invalid Date' }, 400 );
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
let checkServerError = await returnServerError( reqestData.storeId );
|
|
647
|
+
if ( checkServerError ) {
|
|
648
|
+
return res.sendError( { error: 'Server Error' }, 500 );
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
let result = {
|
|
652
|
+
'totalCount': 300,
|
|
653
|
+
'customerJourneyTableData': [
|
|
654
|
+
{
|
|
655
|
+
'zoneName ': 'Entry',
|
|
656
|
+
'noOfStores': 23,
|
|
657
|
+
'zoneFF': 234,
|
|
658
|
+
'impressions': 34,
|
|
659
|
+
'AvgDwellTime': 24,
|
|
660
|
+
'concRate': 24,
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
'zoneName ': 'Vincent Chase',
|
|
664
|
+
'noOfStores': 23,
|
|
665
|
+
'zoneFF': 234,
|
|
666
|
+
'impressions': 34,
|
|
667
|
+
'AvgDwellTime': 24,
|
|
668
|
+
'concRate': 24,
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
'zoneName ': 'John Jacobs',
|
|
672
|
+
'noOfStores': 23,
|
|
673
|
+
'zoneFF': 234,
|
|
674
|
+
'impressions': 34,
|
|
675
|
+
'AvgDwellTime': 24,
|
|
676
|
+
'concRate': 24,
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
'zoneName ': 'Air',
|
|
680
|
+
'noOfStores': 23,
|
|
681
|
+
'zoneFF': 234,
|
|
682
|
+
'impressions': 34,
|
|
683
|
+
'AvgDwellTime': 24,
|
|
684
|
+
'concRate': 24,
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
'zoneName ': 'Exit',
|
|
688
|
+
'noOfStores': 23,
|
|
689
|
+
'zoneFF': 234,
|
|
690
|
+
'impressions': 34,
|
|
691
|
+
'AvgDwellTime': 24,
|
|
692
|
+
'concRate': 24,
|
|
693
|
+
},
|
|
694
|
+
],
|
|
695
|
+
};
|
|
696
|
+
return res.sendSuccess( result );
|
|
697
|
+
} catch ( error ) {
|
|
698
|
+
logger.error( { error: error, message: req.query, function: 'customerJourneyData' } );
|
|
699
|
+
return res.sendError( { error: error }, 500 );
|
|
700
|
+
}
|
|
701
|
+
};
|
|
702
|
+
|
|
429
703
|
async function returnNoData( requestData ) {
|
|
430
704
|
try {
|
|
431
705
|
if ( requestData && requestData.includes( '204' ) ) {
|
|
@@ -79,7 +79,7 @@ export const topPerformingStoresV1 = async ( req, res ) => {
|
|
|
79
79
|
'Store Name': element.storeName,
|
|
80
80
|
'Zone Name': element.zoneName,
|
|
81
81
|
'Concentration': element.concentrationRate,
|
|
82
|
-
'
|
|
82
|
+
'Avg Dwell Time': element.avgDwellTime,
|
|
83
83
|
'Zone Footfall': element.zoneFootfall,
|
|
84
84
|
} );
|
|
85
85
|
} );
|
|
@@ -122,7 +122,7 @@ export const zoneSummaryTableV1 = async ( req, res ) => {
|
|
|
122
122
|
'Store Name': element.storeName,
|
|
123
123
|
'StoreId': element.storeId,
|
|
124
124
|
'Zone Conc.Rate': element.concentrationRate,
|
|
125
|
-
'
|
|
125
|
+
'Avg Dwell Time': element.avgDwellTime,
|
|
126
126
|
'Zone FF': element.footfallCount,
|
|
127
127
|
'Zone Bounced': element.bouncedCount,
|
|
128
128
|
'Zone Engagers': element.engagersCount,
|
|
@@ -22,26 +22,26 @@ export const zonecards = async ( req, res ) => {
|
|
|
22
22
|
let result = {
|
|
23
23
|
'card': {
|
|
24
24
|
'footfall': {
|
|
25
|
-
'count':
|
|
25
|
+
'count': 2067, // Store Footfall Count
|
|
26
26
|
'zoneName': 'Entry', // highest Zone Footfall
|
|
27
|
-
'zoneFootfallCount':
|
|
27
|
+
'zoneFootfallCount': 1234,
|
|
28
28
|
},
|
|
29
29
|
'impression': {
|
|
30
|
-
'rate':
|
|
31
|
-
'zoneName': '
|
|
32
|
-
'zoneImpressionRate':
|
|
30
|
+
'rate': 65, // Store impression rate
|
|
31
|
+
'zoneName': 'Vincent Chase', // highest Impression(Concentration)
|
|
32
|
+
'zoneImpressionRate': 32,
|
|
33
33
|
},
|
|
34
34
|
'bounced': {
|
|
35
|
-
'rate':
|
|
36
|
-
'zoneName': '
|
|
35
|
+
'rate': 56, // Store bounced rate
|
|
36
|
+
'zoneName': 'John Jacobs', // highest Bounced
|
|
37
37
|
},
|
|
38
38
|
'engagers': {
|
|
39
|
-
'rate': 89
|
|
40
|
-
'zoneName': '
|
|
39
|
+
'rate': 89, // Store engagers rate
|
|
40
|
+
'zoneName': 'Air', // highest Engagers
|
|
41
41
|
},
|
|
42
42
|
'avgDwellTime': {
|
|
43
|
-
'rate':
|
|
44
|
-
'zoneName': '
|
|
43
|
+
'rate': 57, // Store avgDwellTime rate
|
|
44
|
+
'zoneName': 'Exit', // highest Average Dwell Time
|
|
45
45
|
},
|
|
46
46
|
},
|
|
47
47
|
};
|
|
@@ -71,11 +71,11 @@ export const topPerformingZones = async ( req, res ) => {
|
|
|
71
71
|
|
|
72
72
|
let result = {
|
|
73
73
|
'topPerformingZones': [
|
|
74
|
-
{ 'zoneName': '
|
|
75
|
-
{ 'zoneName': '
|
|
76
|
-
{ 'zoneName': '
|
|
77
|
-
{ 'zoneName': '
|
|
78
|
-
{ 'zoneName': '
|
|
74
|
+
{ 'zoneName': 'Entry', 'footfallCount': 100, 'bouncedCount': 40, 'engagersCount': 30, 'impressionRate': 50 },
|
|
75
|
+
{ 'zoneName': 'John Jacobs', 'footfallCount': 98, 'bouncedCount': 38, 'engagersCount': 28, 'impressionRate': 48 },
|
|
76
|
+
{ 'zoneName': 'Vincent Chase', 'footfallCount': 96, 'bouncedCount': 36, 'engagersCount': 26, 'impressionRate': 46 },
|
|
77
|
+
{ 'zoneName': 'Air', 'footfallCount': 94, 'bouncedCount': 34, 'engagersCount': 24, 'impressionRate': 44 },
|
|
78
|
+
{ 'zoneName': 'Exit', 'footfallCount': 92, 'bouncedCount': 32, 'engagersCount': 22, 'impressionRate': 42 },
|
|
79
79
|
],
|
|
80
80
|
};
|
|
81
81
|
return res.sendSuccess( result );
|
|
@@ -104,11 +104,11 @@ export const topPerformingStores = async ( req, res ) => {
|
|
|
104
104
|
|
|
105
105
|
let result = {
|
|
106
106
|
'topPerformingStores': [
|
|
107
|
-
{ 'storeName': 'LKST11-300', 'storeId': '11-300', 'zoneName': '
|
|
108
|
-
{ 'storeName': 'LKST11-301', 'storeId': '11-301', 'zoneName': '
|
|
109
|
-
{ 'storeName': 'LKST11-302', 'storeId': '11-302', 'zoneName': '
|
|
110
|
-
{ 'storeName': 'LKST11-303', 'storeId': '11-303', 'zoneName': '
|
|
111
|
-
{ 'storeName': 'LKST11-304', 'storeId': '11-304', 'zoneName': '
|
|
107
|
+
{ 'storeName': 'LKST11-300', 'storeId': '11-300', 'zoneName': 'Entry', 'zoneFootfallCount': 90, 'impressionRate': 40, 'avgDwellTime': 39 },
|
|
108
|
+
{ 'storeName': 'LKST11-301', 'storeId': '11-301', 'zoneName': 'John Jacobs', 'zoneFootfallCount': 30, 'impressionRate': 30, 'avgDwellTime': 128 },
|
|
109
|
+
{ 'storeName': 'LKST11-302', 'storeId': '11-302', 'zoneName': 'Vincent Chase', 'zoneFootfallCount': 50, 'impressionRate': 60, 'avgDwellTime': 35 },
|
|
110
|
+
{ 'storeName': 'LKST11-303', 'storeId': '11-303', 'zoneName': 'Air', 'zoneFootfallCount': 70, 'impressionRate': 44, 'avgDwellTime': 33 },
|
|
111
|
+
{ 'storeName': 'LKST11-304', 'storeId': '11-304', 'zoneName': 'Exit', 'zoneFootfallCount': 40, 'impressionRate': 48, 'avgDwellTime': 24 },
|
|
112
112
|
],
|
|
113
113
|
};
|
|
114
114
|
return res.sendSuccess( result );
|
|
@@ -117,7 +117,6 @@ export const topPerformingStores = async ( req, res ) => {
|
|
|
117
117
|
return res.sendError( { error: error }, 500 );
|
|
118
118
|
}
|
|
119
119
|
};
|
|
120
|
-
|
|
121
120
|
export const zoneConcentrationSummary = async ( req, res ) => {
|
|
122
121
|
try {
|
|
123
122
|
let reqestData = req.body;
|
|
@@ -139,7 +138,7 @@ export const zoneConcentrationSummary = async ( req, res ) => {
|
|
|
139
138
|
let result = {
|
|
140
139
|
'zoneConcentrationData': [
|
|
141
140
|
{
|
|
142
|
-
'zoneName': '
|
|
141
|
+
'zoneName': 'Overall Zones',
|
|
143
142
|
'footfall': {
|
|
144
143
|
'zoneCount': 10,
|
|
145
144
|
'storeRate': 65.0,
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
overallStoreConcentrationHeatmap,
|
|
15
15
|
trajectoryAnalysis,
|
|
16
16
|
customerJourney,
|
|
17
|
+
customerJourneyTable,
|
|
17
18
|
} from '../controllers/analysisZoneSampleDataV2.controllers.js';
|
|
18
19
|
|
|
19
20
|
analysisZoneV2Router
|
|
@@ -26,5 +27,6 @@ analysisZoneV2Router
|
|
|
26
27
|
.post( '/overallStoreConcentrationDates', overallStoreConcentrationDates )
|
|
27
28
|
.post( '/overallStoreConcentrationHeatmap', overallStoreConcentrationHeatmap )
|
|
28
29
|
.post( '/trajectoryAnalysis', trajectoryAnalysis )
|
|
29
|
-
.post( '/customerJourney', customerJourney )
|
|
30
|
+
.post( '/customerJourney', customerJourney )
|
|
31
|
+
.post( '/customerJourneyTable', customerJourneyTable );
|
|
30
32
|
export default analysisZoneV2Router;
|