@metarouter/ajs-starter-kit 1.0.79 → 1.0.80
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/.dist/commission-junction/connection.etag.json +1 -0
- package/.dist/commission-junction/connection.json +23 -0
- package/.dist/commission-junction/kit.etag.json +1 -0
- package/.dist/commission-junction/metadata.json +20 -0
- package/.dist/commission-junction/playbook.etag.json +1 -0
- package/.dist/commission-junction/playbook.json +163 -0
- package/.dist/movable-ink-customer-data/connection.etag.json +1 -0
- package/.dist/movable-ink-customer-data/connection.json +30 -0
- package/.dist/movable-ink-customer-data/kit.etag.json +1 -0
- package/.dist/movable-ink-customer-data/metadata.json +20 -0
- package/.dist/movable-ink-customer-data/playbook.etag.json +1 -0
- package/.dist/movable-ink-customer-data/playbook.json +418 -0
- package/index.js +23 -1
- package/package.json +2 -2
- package/.dist/amazon-redshift-v2/connection.etag.json +0 -1
- package/.dist/amazon-redshift-v2/connection.json +0 -17
- package/.dist/amazon-redshift-v2/kit.etag.json +0 -1
- package/.dist/amazon-redshift-v2/metadata.json +0 -24
- package/.dist/amazon-redshift-v2/playbook.etag.json +0 -1
- package/.dist/amazon-redshift-v2/playbook.json +0 -88
- package/.dist/google-double-click/connection.etag.json +0 -1
- package/.dist/google-double-click/connection.json +0 -6
- package/.dist/google-double-click/kit.etag.json +0 -1
- package/.dist/google-double-click/metadata.json +0 -24
- package/.dist/google-double-click/playbook.etag.json +0 -1
- package/.dist/google-double-click/playbook.json +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"6e570485ab6dd8a0ecb221ee1e09d4d4"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"params": [
|
|
3
|
+
{
|
|
4
|
+
"name": "ACCESS_TOKEN",
|
|
5
|
+
"exampleValue": "my-access-token"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"default": {
|
|
9
|
+
"endpoint": "https://tracking.api.cj.com/graphql",
|
|
10
|
+
"batchSize": 1,
|
|
11
|
+
"method": "POST",
|
|
12
|
+
"headers": [
|
|
13
|
+
{
|
|
14
|
+
"key": "Authorization",
|
|
15
|
+
"value": "Bearer $$ACCESS_TOKEN$$"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"transform": {
|
|
19
|
+
"body": "function tableToString(tbl)\n local result, isJsonArray = {}, true\n\n for k, v in pairs(tbl) do\n isJsonArray = isJsonArray and type(k) == \"number\" and math.floor(k) == k and k > 0\n\n local valueStr = (\n type(v) == \"table\" and tableToString(v) or\n type(v) == \"boolean\" and tostring(v) or\n type(v) == \"number\" and v or\n '\"' .. tostring(v) .. '\"'\n )\n\n if isJsonArray then\n result[#result + 1] = valueStr\n else\n result[#result + 1] = k .. \":\" .. valueStr\n end\n end\n\n return (isJsonArray and \"[\" or \"{\") .. table.concat(result, \",\") .. (isJsonArray and \"]\" or \"}\")\nend\n\n\nlocal graphQLString = string.format([[\n mutation {\n createOrders(\n newOrders: [%s]\n ) {\n orders {\n submissionId\n orderReceivedTime\n advertiser {\n enterpriseId\n }\n actionTracker {\n id\n }\n eventTime\n orderId\n cjEvent\n amount\n discount\n verticalParameters {\n originState\n taxAmount\n confirmationNumber\n originCity\n itemId\n noCancellation\n orderSubtotal\n destinationCity\n destinationState\n }\n items {\n unitPrice\n quantity\n sku\n discount\n }\n coupon\n currency\n }\n errors {\n message\n fields\n }\n }\n }\n]], tableToString(batch[1]))\n\nrequest.body = { query = graphQLString }\nreturn request",
|
|
20
|
+
"lang": "lua"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"05fec366f431cf60b2daa57e8e323840"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"isDraft": false,
|
|
3
|
+
"isBeta": true,
|
|
4
|
+
"friendlyName": "Commission Junction",
|
|
5
|
+
"description": "Commission Junction provides a platform that connects advertisers with a network of publishers, making it easier for both parties to find suitable partnerships.",
|
|
6
|
+
"logo": "https://cdn.metarouter.io/commission-junction.png",
|
|
7
|
+
"color": "#025450",
|
|
8
|
+
"eventSource": {
|
|
9
|
+
"isAndroidApp": false,
|
|
10
|
+
"isIosApp": false,
|
|
11
|
+
"isWebApp": true
|
|
12
|
+
},
|
|
13
|
+
"inputSchema": "analytics_js",
|
|
14
|
+
"releaseNotes": [
|
|
15
|
+
{
|
|
16
|
+
"date": "2024-01-17T05:00:00.000Z",
|
|
17
|
+
"note": "commission-junction initial release."
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"4d2541ca3b25339c02063fe4e2cc5e86"
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v0.1.0",
|
|
3
|
+
"params": [
|
|
4
|
+
{
|
|
5
|
+
"name": "ACTION_TRACKER_ID",
|
|
6
|
+
"exampleValue": "my-action-tracker-id"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"name": "ENTERPRISE_ID",
|
|
10
|
+
"exampleValue": "my-enterprise-id"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"global": {
|
|
14
|
+
"filters": [
|
|
15
|
+
{
|
|
16
|
+
"byEventNames": {
|
|
17
|
+
"action": "allow",
|
|
18
|
+
"events": [
|
|
19
|
+
"order_completed"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"enrichments": [
|
|
25
|
+
{
|
|
26
|
+
"staticString": "$$ENTERPRISE_ID$$",
|
|
27
|
+
"outputKey": "enterpriseId"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"mappings": [
|
|
31
|
+
{
|
|
32
|
+
"inputKey": "input",
|
|
33
|
+
"outputKey": "actionTrackerId",
|
|
34
|
+
"transforms": [
|
|
35
|
+
{
|
|
36
|
+
"expression": {
|
|
37
|
+
"lang": "lua",
|
|
38
|
+
"body": "local actionTrackerId = TO_TRUNCATED_INT($$ACTION_TRACKER_ID$$)\nreturn actionTrackerId"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"inputKey": "originalTimestamp",
|
|
45
|
+
"outputKey": "eventTime"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"inputKey": "context.providers.commissionJunction.cjEvent",
|
|
49
|
+
"outputKey": "cjEvent"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"inputKey": "properties.sid",
|
|
53
|
+
"outputKey": "sid"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"eventSpecific": {
|
|
58
|
+
"order_completed": {
|
|
59
|
+
"mappings": [
|
|
60
|
+
{
|
|
61
|
+
"inputKey": "properties.order_id",
|
|
62
|
+
"outputKey": "orderId"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"inputKey": "properties.revenue",
|
|
66
|
+
"outputKey": "amount"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"inputKey": "properties.discount",
|
|
70
|
+
"outputKey": "discount"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"inputKey": "input",
|
|
74
|
+
"outputKey": "items",
|
|
75
|
+
"transforms": [
|
|
76
|
+
{
|
|
77
|
+
"expression": {
|
|
78
|
+
"lang": "lua",
|
|
79
|
+
"body": "return MAP(\n input.properties.products,\n function (p)\n return {\n unitPrice=p.price,\n quantity=p.quantity,\n sku=p.sku,\n discount=p.discount or 0\n }\n end\n )"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"inputKey": "properties.coupon",
|
|
86
|
+
"outputKey": "coupon"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"inputKey": "properties.currency",
|
|
90
|
+
"outputKey": "currency",
|
|
91
|
+
"transforms": [
|
|
92
|
+
{
|
|
93
|
+
"modifyString": "uppercase"
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"inputKey": "properties.customerStatus",
|
|
99
|
+
"outputKey": "customerStatus"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"inputKey": "properties.confirmationNumber",
|
|
103
|
+
"outputKey": "verticalParameters.confirmationNumber"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"inputKey": "properties.originCity",
|
|
107
|
+
"outputKey": "verticalParameters.originCity"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"inputKey": "properties.originState",
|
|
111
|
+
"outputKey": "verticalParameters.originState"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"inputKey": "properties.destinationCity",
|
|
115
|
+
"outputKey": "verticalParameters.destinationCity"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"inputKey": "properties.destinationState",
|
|
119
|
+
"outputKey": "verticalParameters.destinationState"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"inputKey": "properties.noCancellation",
|
|
123
|
+
"outputKey": "verticalParameters.noCancellation",
|
|
124
|
+
"transforms": [
|
|
125
|
+
{
|
|
126
|
+
"toScalar": "string"
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"inputKey": "properties.revenue",
|
|
132
|
+
"outputKey": "verticalParameters.orderSubtotal",
|
|
133
|
+
"transforms": [
|
|
134
|
+
{
|
|
135
|
+
"toScalar": "string"
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"inputKey": "properties.tax",
|
|
141
|
+
"outputKey": "verticalParameters.taxAmount",
|
|
142
|
+
"transforms": [
|
|
143
|
+
{
|
|
144
|
+
"toScalar": "string"
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"inputKey": "input",
|
|
150
|
+
"outputKey": "verticalParameters.itemId",
|
|
151
|
+
"transforms": [
|
|
152
|
+
{
|
|
153
|
+
"expression": {
|
|
154
|
+
"lang": "lua",
|
|
155
|
+
"body": "return JOIN(PLUCK(input.properties.products,\"product_id\"), \", \")"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"c1dc9ad61c527d0444a8b1be3e6df966"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"params": [
|
|
3
|
+
{
|
|
4
|
+
"name": "ENDPOINT",
|
|
5
|
+
"exampleValue": "my-endpoint"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"name": "PASSWORD",
|
|
9
|
+
"exampleValue": "my-password"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "USERNAME",
|
|
13
|
+
"exampleValue": "my-username"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"default": {
|
|
17
|
+
"basicAuth": {
|
|
18
|
+
"password": "$$PASSWORD$$",
|
|
19
|
+
"username": "$$USERNAME$$"
|
|
20
|
+
},
|
|
21
|
+
"endpoint": "https://collector.movableink-dmz.com/behavioral/$$ENDPOINT$$",
|
|
22
|
+
"headers": [
|
|
23
|
+
{
|
|
24
|
+
"key": "Content-Type",
|
|
25
|
+
"value": "application/json"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"method": "POST"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"336af703682abd0abed08e879d1da392"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"isDraft": false,
|
|
3
|
+
"isBeta": true,
|
|
4
|
+
"friendlyName": "Movable Ink - Customer Data",
|
|
5
|
+
"description": "Movable Ink is a marketing technology platform that specializes in creating personalized and dynamic content for email and mobile marketing campaigns.",
|
|
6
|
+
"logo": "https://cdn.metarouter.io/logo.svg",
|
|
7
|
+
"color": "#e21c79",
|
|
8
|
+
"eventSource": {
|
|
9
|
+
"isAndroidApp": false,
|
|
10
|
+
"isIosApp": false,
|
|
11
|
+
"isWebApp": true
|
|
12
|
+
},
|
|
13
|
+
"inputSchema": "analytics_js",
|
|
14
|
+
"releaseNotes": [
|
|
15
|
+
{
|
|
16
|
+
"date": "2024-02-07T00:00:00.000Z",
|
|
17
|
+
"note": "Movable Ink - Customer Data initial release."
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"6eec9986ab61724920bac87ac9dc1c6f"
|
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.1.0",
|
|
3
|
+
"default": {
|
|
4
|
+
"filters": [
|
|
5
|
+
{
|
|
6
|
+
"byEventNames": {
|
|
7
|
+
"action": "allow",
|
|
8
|
+
"events": [
|
|
9
|
+
""
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"global": {
|
|
16
|
+
"mappings": [
|
|
17
|
+
{
|
|
18
|
+
"inputKey": "context.providers.movableInkCustomerData.mi_u",
|
|
19
|
+
"outputKey": "user_id"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"inputKey": "anonymousId",
|
|
23
|
+
"outputKey": "anonymousId"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"inputKey": "timestamp",
|
|
27
|
+
"outputKey": "timestamp"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"inputKey": "type",
|
|
31
|
+
"outputKey": "type"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"inputKey": "input",
|
|
35
|
+
"outputKey": "event",
|
|
36
|
+
"transforms": [
|
|
37
|
+
{
|
|
38
|
+
"expression": {
|
|
39
|
+
"lang": "lua",
|
|
40
|
+
"body": "if input.type == 'track' then\n if input.event == 'product_list_viewed' then\n return 'category_viewed'\n else\n return REPLACE(LOWER(input.event), ' ', '_')\n end\nelseif input.type == 'page' then\n return 'page_viewed'\nelse\n return 'user_identified'\nend"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"eventSpecific": {
|
|
48
|
+
"identify": {
|
|
49
|
+
"mappings": [
|
|
50
|
+
{
|
|
51
|
+
"inputKey": "userId",
|
|
52
|
+
"outputKey": "userId"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"page": {
|
|
57
|
+
"mappings": [
|
|
58
|
+
{
|
|
59
|
+
"inputKey": "properties.title",
|
|
60
|
+
"outputKey": "properties.title",
|
|
61
|
+
"transforms": [
|
|
62
|
+
{
|
|
63
|
+
"substring": {
|
|
64
|
+
"start": 0,
|
|
65
|
+
"end": 256
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"inputKey": "properties.url",
|
|
72
|
+
"outputKey": "properties.url",
|
|
73
|
+
"transforms": [
|
|
74
|
+
{
|
|
75
|
+
"substring": {
|
|
76
|
+
"start": 0,
|
|
77
|
+
"end": 256
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
"products_searched": {
|
|
85
|
+
"mappings": [
|
|
86
|
+
{
|
|
87
|
+
"inputKey": "properties.query",
|
|
88
|
+
"outputKey": "properties.query",
|
|
89
|
+
"defaultString": "",
|
|
90
|
+
"transforms": [
|
|
91
|
+
{
|
|
92
|
+
"substring": {
|
|
93
|
+
"start": 0,
|
|
94
|
+
"end": 256
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"inputKey": "context.page.url",
|
|
101
|
+
"outputKey": "properties.url",
|
|
102
|
+
"transforms": [
|
|
103
|
+
{
|
|
104
|
+
"substring": {
|
|
105
|
+
"start": 0,
|
|
106
|
+
"end": 256
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"product_list_viewed": {
|
|
114
|
+
"mappings": [
|
|
115
|
+
{
|
|
116
|
+
"inputKey": "properties.list_id",
|
|
117
|
+
"outputKey": "properties.id",
|
|
118
|
+
"transforms": [
|
|
119
|
+
{
|
|
120
|
+
"substring": {
|
|
121
|
+
"start": 0,
|
|
122
|
+
"end": 256
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"inputKey": "context.page.url",
|
|
129
|
+
"outputKey": "properties.url",
|
|
130
|
+
"transforms": [
|
|
131
|
+
{
|
|
132
|
+
"substring": {
|
|
133
|
+
"start": 0,
|
|
134
|
+
"end": 256
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"inputKey": "properties.category",
|
|
141
|
+
"outputKey": "properties.category",
|
|
142
|
+
"transforms": [
|
|
143
|
+
{
|
|
144
|
+
"substring": {
|
|
145
|
+
"start": 0,
|
|
146
|
+
"end": 256
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"inputKey": "properties.currency",
|
|
153
|
+
"outputKey": "properties.currency"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"inputKey": "input",
|
|
157
|
+
"outputKey": "properties.products",
|
|
158
|
+
"transforms": [
|
|
159
|
+
{
|
|
160
|
+
"expression": {
|
|
161
|
+
"lang": "lua",
|
|
162
|
+
"body": "function slice(table, first, last, step)\n local sliced = {}\n for i = first or 1, last or #table, step or 1 do\n sliced[#sliced+1] = table[i]\n end\n return sliced\nend\nlocal products = slice(input.properties.products, 1, 100)\nreturn MAP(\n products,\n function (product)\n return {\n product_id = SUBSTRING(product.product_id, 0, 256) or SUBSTRING(product.sku, 0, 256),\n sku = SUBSTRING(product.sku, 0, 256),\n category = SUBSTRING(product.category, 0, 256),\n name = SUBSTRING(product.name, 0, 256),\n price = product.price,\n quantity = product.quantity or 1,\n url = SUBSTRING(product.url, 0, 256)\n }\n end\n)"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
"product_viewed": {
|
|
170
|
+
"mappings": [
|
|
171
|
+
{
|
|
172
|
+
"inputKey": "properties",
|
|
173
|
+
"outputKey": "properties.product_id",
|
|
174
|
+
"transforms": [
|
|
175
|
+
{
|
|
176
|
+
"expression": {
|
|
177
|
+
"lang": "lua",
|
|
178
|
+
"body": "return SUBSTRING(input.properties.product_id, 0, 256) or SUBSTRING(input.properties.sku, 0, 256)"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"inputKey": "properties.sku",
|
|
185
|
+
"outputKey": "properties.sku",
|
|
186
|
+
"transforms": [
|
|
187
|
+
{
|
|
188
|
+
"substring": {
|
|
189
|
+
"start": 0,
|
|
190
|
+
"end": 256
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"inputKey": "properties.category",
|
|
197
|
+
"outputKey": "properties.category",
|
|
198
|
+
"transforms": [
|
|
199
|
+
{
|
|
200
|
+
"substring": {
|
|
201
|
+
"start": 0,
|
|
202
|
+
"end": 256
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"inputKey": "properties.currency",
|
|
209
|
+
"outputKey": "properties.currency"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"inputKey": "properties.name",
|
|
213
|
+
"outputKey": "properties.name",
|
|
214
|
+
"transforms": [
|
|
215
|
+
{
|
|
216
|
+
"substring": {
|
|
217
|
+
"start": 0,
|
|
218
|
+
"end": 256
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"inputKey": "properties.price",
|
|
225
|
+
"outputKey": "properties.price"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"inputKey": "properties.quantity",
|
|
229
|
+
"outputKey": "properties.quantity"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"inputKey": "properties.url",
|
|
233
|
+
"outputKey": "properties.url",
|
|
234
|
+
"transforms": [
|
|
235
|
+
{
|
|
236
|
+
"substring": {
|
|
237
|
+
"start": 0,
|
|
238
|
+
"end": 256
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
},
|
|
245
|
+
"product_added": {
|
|
246
|
+
"mappings": [
|
|
247
|
+
{
|
|
248
|
+
"inputKey": "properties.cart_id",
|
|
249
|
+
"outputKey": "properties.cart_id",
|
|
250
|
+
"transforms": [
|
|
251
|
+
{
|
|
252
|
+
"substring": {
|
|
253
|
+
"start": 0,
|
|
254
|
+
"end": 256
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"inputKey": "properties",
|
|
261
|
+
"outputKey": "properties.product_id",
|
|
262
|
+
"transforms": [
|
|
263
|
+
{
|
|
264
|
+
"expression": {
|
|
265
|
+
"lang": "lua",
|
|
266
|
+
"body": "return SUBSTRING(input.properties.product_id, 0, 256) or SUBSTRING(input.properties.sku, 0, 256)"
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"inputKey": "properties.sku",
|
|
273
|
+
"outputKey": "properties.sku",
|
|
274
|
+
"transforms": [
|
|
275
|
+
{
|
|
276
|
+
"substring": {
|
|
277
|
+
"start": 0,
|
|
278
|
+
"end": 256
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"inputKey": "properties.category",
|
|
285
|
+
"outputKey": "properties.category",
|
|
286
|
+
"transforms": [
|
|
287
|
+
{
|
|
288
|
+
"substring": {
|
|
289
|
+
"start": 0,
|
|
290
|
+
"end": 256
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"inputKey": "properties.currency",
|
|
297
|
+
"outputKey": "properties.currency"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"inputKey": "properties.name",
|
|
301
|
+
"outputKey": "properties.name",
|
|
302
|
+
"transforms": [
|
|
303
|
+
{
|
|
304
|
+
"substring": {
|
|
305
|
+
"start": 0,
|
|
306
|
+
"end": 256
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
]
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"inputKey": "properties.price",
|
|
313
|
+
"outputKey": "properties.price"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"inputKey": "properties.quantity",
|
|
317
|
+
"outputKey": "properties.quantity"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"inputKey": "properties.url",
|
|
321
|
+
"outputKey": "properties.url",
|
|
322
|
+
"transforms": [
|
|
323
|
+
{
|
|
324
|
+
"substring": {
|
|
325
|
+
"start": 0,
|
|
326
|
+
"end": 256
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
]
|
|
330
|
+
}
|
|
331
|
+
]
|
|
332
|
+
},
|
|
333
|
+
"cart_viewed": {
|
|
334
|
+
"mappings": [
|
|
335
|
+
{
|
|
336
|
+
"inputKey": "properties.cart_id",
|
|
337
|
+
"outputKey": "properties.cart_id",
|
|
338
|
+
"transforms": [
|
|
339
|
+
{
|
|
340
|
+
"substring": {
|
|
341
|
+
"start": 0,
|
|
342
|
+
"end": 256
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
]
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"inputKey": "input",
|
|
349
|
+
"outputKey": "properties.total",
|
|
350
|
+
"transforms": [
|
|
351
|
+
{
|
|
352
|
+
"expression": {
|
|
353
|
+
"lang": "lua",
|
|
354
|
+
"body": "return SUM(MAP(input.properties.products, function (p) return p.price * (p.quantity or 1) end))"
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
]
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"inputKey": "properties.currency",
|
|
361
|
+
"outputKey": "properties.currency"
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"inputKey": "input",
|
|
365
|
+
"outputKey": "properties.products",
|
|
366
|
+
"transforms": [
|
|
367
|
+
{
|
|
368
|
+
"expression": {
|
|
369
|
+
"lang": "lua",
|
|
370
|
+
"body": "function slice(table, first, last, step)\n local sliced = {}\n for i = first or 1, last or #table, step or 1 do\n sliced[#sliced+1] = table[i]\n end\n return sliced\nend\nlocal products = slice(input.properties.products, 1, 100)\nreturn MAP(\n products,\n function (product)\n return {\n product_id = SUBSTRING(product.product_id, 0, 256) or SUBSTRING(product.sku, 0, 256),\n sku = SUBSTRING(product.sku, 0, 256),\n category = SUBSTRING(product.category, 0, 256),\n name = SUBSTRING(product.name, 0, 256),\n price = product.price,\n quantity = product.quantity or 1,\n url = SUBSTRING(product.url, 0, 256)\n }\n end\n)"
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
]
|
|
374
|
+
}
|
|
375
|
+
]
|
|
376
|
+
},
|
|
377
|
+
"order_completed": {
|
|
378
|
+
"mappings": [
|
|
379
|
+
{
|
|
380
|
+
"inputKey": "properties.order_id",
|
|
381
|
+
"outputKey": "properties.order_id",
|
|
382
|
+
"transforms": [
|
|
383
|
+
{
|
|
384
|
+
"substring": {
|
|
385
|
+
"start": 0,
|
|
386
|
+
"end": 256
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
]
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"inputKey": "properties.total",
|
|
393
|
+
"outputKey": "properties.total"
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"inputKey": "properties.revenue",
|
|
397
|
+
"outputKey": "properties.revenue"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"inputKey": "properties.currency",
|
|
401
|
+
"outputKey": "properties.currency"
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"inputKey": "input",
|
|
405
|
+
"outputKey": "properties.products",
|
|
406
|
+
"transforms": [
|
|
407
|
+
{
|
|
408
|
+
"expression": {
|
|
409
|
+
"lang": "lua",
|
|
410
|
+
"body": "function slice(table, first, last, step)\n local sliced = {}\n for i = first or 1, last or #table, step or 1 do\n sliced[#sliced+1] = table[i]\n end\n return sliced\nend\nlocal products = slice(input.properties.products, 1, 100)\nreturn MAP(\n products,\n function (product)\n return {\n product_id = SUBSTRING(product.product_id, 0, 256) or SUBSTRING(product.sku, 0, 256),\n sku = SUBSTRING(product.sku, 0, 256),\n category = SUBSTRING(product.category, 0, 256),\n name = SUBSTRING(product.name, 0, 256),\n price = product.price,\n quantity = product.quantity or 1,\n url = SUBSTRING(product.url, 0, 256)\n }\n end\n)"
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
]
|
|
414
|
+
}
|
|
415
|
+
]
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
package/index.js
CHANGED
|
@@ -110,7 +110,12 @@ exports.convert = {
|
|
|
110
110
|
playbook: require('./.dist/convert/playbook.json'),
|
|
111
111
|
metadata: require('./.dist/convert/metadata.json')
|
|
112
112
|
},
|
|
113
|
-
|
|
113
|
+
exports['commission-junction'] = {
|
|
114
|
+
connectionTemplate: connectionSchemas.properties.commissionJunction,
|
|
115
|
+
endpointSchema: require('./.dist/commission-junction/connection.json'),
|
|
116
|
+
playbook: require('./.dist/commission-junction/playbook.json'),
|
|
117
|
+
metadata: require('./.dist/commission-junction/metadata.json')
|
|
118
|
+
},
|
|
114
119
|
exports.criteo = {
|
|
115
120
|
connectionTemplate: connectionSchemas.properties.criteo,
|
|
116
121
|
endpointSchema: require('./.dist/criteo/connection.json'),
|
|
@@ -273,6 +278,13 @@ exports['movable-ink'] = {
|
|
|
273
278
|
metadata: require('./.dist/movable-ink/metadata.json')
|
|
274
279
|
}
|
|
275
280
|
|
|
281
|
+
exports['movable-ink-customer-data'] = {
|
|
282
|
+
connectionTemplate: connectionSchemas.properties.movableInkCustomerData,
|
|
283
|
+
endpointSchema: require('./.dist/movable-ink-customer-data/connection.json'),
|
|
284
|
+
playbook: require('./.dist/movable-ink-customer-data/playbook.json'),
|
|
285
|
+
metadata: require('./.dist/movable-ink-customer-data/metadata.json')
|
|
286
|
+
}
|
|
287
|
+
|
|
276
288
|
exports['nextdoor'] = {
|
|
277
289
|
connectionTemplate: connectionSchemas.properties.nextdoor,
|
|
278
290
|
endpointSchema: require('./.dist/nextdoor/connection.json'),
|
|
@@ -499,6 +511,11 @@ exports.etags = {
|
|
|
499
511
|
playbook: require('./.dist/convert/playbook.etag.json'),
|
|
500
512
|
kit: require('./.dist/convert/kit.etag.json')
|
|
501
513
|
},
|
|
514
|
+
'commission-junction': {
|
|
515
|
+
endpointSchema: require('./.dist/commission-junction/connection.etag.json'),
|
|
516
|
+
playbook: require('./.dist/commission-junction/playbook.etag.json'),
|
|
517
|
+
kit: require('./.dist/commission-junction/kit.etag.json')
|
|
518
|
+
},
|
|
502
519
|
criteo: {
|
|
503
520
|
endpointSchema: require('./.dist/criteo/connection.etag.json'),
|
|
504
521
|
playbook: require('./.dist/criteo/playbook.etag.json'),
|
|
@@ -611,6 +628,11 @@ exports.etags = {
|
|
|
611
628
|
playbook: require('./.dist/movable-ink/playbook.etag.json'),
|
|
612
629
|
kit: require('./.dist/movable-ink/kit.etag.json')
|
|
613
630
|
},
|
|
631
|
+
'movable-ink-customer-data': {
|
|
632
|
+
endpointSchema: require('./.dist/movable-ink-customer-data/connection.etag.json'),
|
|
633
|
+
playbook: require('./.dist/movable-ink-customer-data/playbook.etag.json'),
|
|
634
|
+
kit: require('./.dist/movable-ink-customer-data/kit.etag.json')
|
|
635
|
+
},
|
|
614
636
|
nextdoor: {
|
|
615
637
|
endpointSchema: require('./.dist/nextdoor/connection.etag.json'),
|
|
616
638
|
playbook: require('./.dist/nextdoor/playbook.etag.json'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metarouter/ajs-starter-kit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.80",
|
|
4
4
|
"description": "MetaRouter analytics.js starter kit",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"yamljs": "^0.3.0"
|
|
14
14
|
}
|
|
15
|
-
}
|
|
15
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"eeda0ad0e6e29b0e4c74a37861e207d4"
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"amazon_redshift_v2": {
|
|
3
|
-
"load_cadence": "6h",
|
|
4
|
-
"user": "my-user",
|
|
5
|
-
"password": "my-password",
|
|
6
|
-
"host": "my-host",
|
|
7
|
-
"port": "my-port",
|
|
8
|
-
"database": "my-database",
|
|
9
|
-
"schema": "my-schema",
|
|
10
|
-
"s3": {
|
|
11
|
-
"region": "us-east-1",
|
|
12
|
-
"bucket": "my-bucket",
|
|
13
|
-
"access_key": "my-access-key",
|
|
14
|
-
"secret_key": "my-access-secret"
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"32a81767b155b64e25f8ef5efd994eaf"
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"isDraft": true,
|
|
3
|
-
"isBeta": false,
|
|
4
|
-
"friendlyName": "Amazon Redshift",
|
|
5
|
-
"description": "Amazon's managed server-less enterprise-level data warehouse.\nCollect structured data and run powerful queries to unlock custom insights with your customer data.",
|
|
6
|
-
"logo": "https://cdn.metarouter.io/logo.svg",
|
|
7
|
-
"color": "#396AB8",
|
|
8
|
-
"eventSource": {
|
|
9
|
-
"isAndroidApp": true,
|
|
10
|
-
"isIosApp": true,
|
|
11
|
-
"isWebApp": true
|
|
12
|
-
},
|
|
13
|
-
"inputSchema": "analytics_js",
|
|
14
|
-
"releaseNotes": [
|
|
15
|
-
{
|
|
16
|
-
"date": "2021-06-24T00:00:00.000Z",
|
|
17
|
-
"note": "Amazon Redshift initial release."
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"date": "2022-11-16T00:00:00.000Z",
|
|
21
|
-
"note": "Add isBeta field"
|
|
22
|
-
}
|
|
23
|
-
]
|
|
24
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"49cecd39b3c33954561fcbf0f6cc17b2"
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "v1.0.0",
|
|
3
|
-
"global": {
|
|
4
|
-
"mappings": [
|
|
5
|
-
{
|
|
6
|
-
"inputKey": "messageId",
|
|
7
|
-
"outputKey": "id"
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"inputKey": "userId",
|
|
11
|
-
"outputKey": "user_id"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"inputKey": "previousId",
|
|
15
|
-
"outputKey": "previous_id"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"inputKey": "anonymousId",
|
|
19
|
-
"outputKey": "anonymous_id"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"inputKey": "originalTimestamp",
|
|
23
|
-
"outputKey": "original_timestamp"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"inputKey": "receivedAt",
|
|
27
|
-
"outputKey": "received_at"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"inputKey": "sentAt",
|
|
31
|
-
"outputKey": "sent_at"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"inputKey": "timestamp",
|
|
35
|
-
"outputKey": "timestamp"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"inputKey": "integrations",
|
|
39
|
-
"outputKey": "integrations",
|
|
40
|
-
"transforms": [
|
|
41
|
-
{
|
|
42
|
-
"toScalar": "string"
|
|
43
|
-
}
|
|
44
|
-
]
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"inputKey": "type",
|
|
48
|
-
"outputKey": "type"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"inputKey": "event",
|
|
52
|
-
"outputKey": "event"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"inputKey": "name",
|
|
56
|
-
"outputKey": "name"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"inputKey": "category",
|
|
60
|
-
"outputKey": "category"
|
|
61
|
-
}
|
|
62
|
-
],
|
|
63
|
-
"spreadings": [
|
|
64
|
-
{
|
|
65
|
-
"inputKey": "context",
|
|
66
|
-
"flatten": {
|
|
67
|
-
"separator": "_",
|
|
68
|
-
"prefix": "context",
|
|
69
|
-
"depth": 5
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"inputKey": "traits",
|
|
74
|
-
"flatten": {
|
|
75
|
-
"separator": "_"
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"inputKey": "properties",
|
|
80
|
-
"flatten": {
|
|
81
|
-
"separator": "_"
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
]
|
|
85
|
-
},
|
|
86
|
-
"eventSpecific": {},
|
|
87
|
-
"default": {}
|
|
88
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"d57939f1af32b8bab3de9a469358e7c0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"c7b3c0dd7607cc5a524171847aefd499"
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"isDraft": true,
|
|
3
|
-
"isBeta": false,
|
|
4
|
-
"friendlyName": "Google DoubleClick Digital Marketing",
|
|
5
|
-
"description": "DoubleClick Digital Marketing (DDM) is an integrated ad-technology platform\nthat enables agencies and advertisers\nto more effectively create, manage and grow high-impact digital marketing campaigns.\nDDM integrates world-class solutions to help buyers run holistic campaigns across multiple channels.",
|
|
6
|
-
"logo": "https://cdn.metarouter.io/logo.svg",
|
|
7
|
-
"color": "#CF4853",
|
|
8
|
-
"eventSource": {
|
|
9
|
-
"isAndroidApp": true,
|
|
10
|
-
"isIosApp": true,
|
|
11
|
-
"isWebApp": true
|
|
12
|
-
},
|
|
13
|
-
"inputSchema": "analytics_js",
|
|
14
|
-
"releaseNotes": [
|
|
15
|
-
{
|
|
16
|
-
"date": "2021-06-24T00:00:00.000Z",
|
|
17
|
-
"note": "Google DoubleClick Digital Marketing initial release."
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"date": "2022-11-16T00:00:00.000Z",
|
|
21
|
-
"note": "Add isBeta field"
|
|
22
|
-
}
|
|
23
|
-
]
|
|
24
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"b595e137717755bf1031fcaa01ce64b5"
|