-
Notifications
You must be signed in to change notification settings - Fork 89
/
Copy pathconstants.js
61 lines (58 loc) · 1.16 KB
/
constants.js
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
const DIR_NAME = 'XPixel';
const NAME = 'XPIXEL';
const DISPLAY_NAME = 'XPixel';
const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME };
const CNameMapping = {
[NAME]: NAME,
XPIXEL: NAME,
XPixel: NAME,
Xpixel: NAME,
xpixel: NAME,
xPixel: NAME,
};
const trackPropertyMapping = [
{
destKey: 'event_id',
sourceKeys: ['properties.eventId', 'properties.event_id', 'messageId'],
},
{
destKey: 'status',
sourceKeys: 'properties.status',
},
{
destKey: 'currency',
sourceKeys: 'properties.currency',
},
{
destKey: 'value',
sourceKeys: 'properties.value',
},
{
destKey: 'search_string',
sourceKeys: ['properties.search_string', 'properties.searchString'],
},
{
destKey: 'description',
sourceKeys: 'properties.description',
},
{
destKey: 'conversion_id',
sourceKeys: ['properties.conversion_id', 'properties.conversionId'],
},
{
destKey: 'twclid',
sourceKeys: 'properties.twclid',
},
{
destKey: 'contents',
sourceKeys: 'properties.contents',
},
];
export {
NAME,
CNameMapping,
DISPLAY_NAME_TO_DIR_NAME_MAP,
DISPLAY_NAME,
DIR_NAME,
trackPropertyMapping,
};