@metarouter/ajs-starter-kit 1.0.104 → 1.0.106

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.
@@ -1 +1 @@
1
- "a26a6fe09a8a9b2540dff249c19f4882"
1
+ "85228b2378ded68a4c47c6d4ea35ff9d"
@@ -36,6 +36,10 @@
36
36
  {
37
37
  "key": "Content-Type",
38
38
  "value": "application/json"
39
+ },
40
+ {
41
+ "key": "Accept-Encoding",
42
+ "value": "application/json"
39
43
  }
40
44
  ],
41
45
  "oauth2Auth": {
@@ -1 +1 @@
1
- "ee5290e1f74aaeba8c947706fbe4ad0d"
1
+ "de54cca1a8477e5b71dc239ebf259eb7"
@@ -27,6 +27,10 @@
27
27
  {
28
28
  "date": "2024-08-21T00:00:00.000Z",
29
29
  "note": "Version: 0.3.0\nRemoving Bearer Header\nAdding oAuth\nUpdated friendly name"
30
+ },
31
+ {
32
+ "date": "2024-09-25T00:00:00.000Z",
33
+ "note": "Version: 0.4.0\nAdding additional parameters\nAdding additional events:\n order completed\n cart viewed\n product added\n product removed\n product viewed"
30
34
  }
31
35
  ]
32
36
  }
@@ -1 +1 @@
1
- "5ca4b63ebc1591921e0c5fb27ec3cb30"
1
+ "588702c0127eea405ad4e8b7c588a102"
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.3.0",
2
+ "version": "0.4.0",
3
3
  "default": {
4
4
  "filters": [
5
5
  {
@@ -32,15 +32,43 @@
32
32
  "transforms": [
33
33
  {
34
34
  "expression": {
35
- "body": "if (input.context.traits.email) then\n return {{ id = TO_SHA256_HASH(LOWER(TRIM(input.context.traits.email))), primary = false }}\nend\nreturn",
35
+ "body": "local email = input.context.traits.email\nif email then\n return {{ id = TO_SHA256_HASH(LOWER(TRIM(email))), primary = false }}\nend\nreturn",
36
36
  "lang": "lua"
37
37
  }
38
38
  }
39
39
  ]
40
40
  },
41
41
  {
42
- "inputKey": "timestamp",
43
- "outputKey": "event.xdm.timestamp"
42
+ "inputKey": "input",
43
+ "outputKey": "event.xdm.timestamp",
44
+ "transforms": [
45
+ {
46
+ "expression": {
47
+ "lang": "lua",
48
+ "body": "return SECONDS_SINCE_EPOCH_FROM_RFC3999(input.timestamp)"
49
+ }
50
+ }
51
+ ]
52
+ },
53
+ {
54
+ "inputKey": "messageId",
55
+ "outputKey": "event.xdm._id"
56
+ },
57
+ {
58
+ "inputKey": "context.locale",
59
+ "outputKey": "event.xdm.environment.language"
60
+ },
61
+ {
62
+ "inputKey": "context.locale",
63
+ "outputKey": "event.xdm.environment.browserDetails.acceptLanguage"
64
+ },
65
+ {
66
+ "inputKey": "context.userAgent",
67
+ "outputKey": "event.xdm.environment.browserDetails.userAgent"
68
+ },
69
+ {
70
+ "inputKey": "context.ip",
71
+ "outputKey": "event.xdm.environment.ipV4"
44
72
  }
45
73
  ]
46
74
  },
@@ -66,6 +94,180 @@
66
94
  "outputKey": "event.data.prop1"
67
95
  }
68
96
  ]
97
+ },
98
+ "product_added": {
99
+ "enrichments": [
100
+ {
101
+ "outputKey": "event.xdm.eventType",
102
+ "staticString": "commerce.productListAdds"
103
+ },
104
+ {
105
+ "outputKey": "event.xdm.commerce.productListAdds.value",
106
+ "staticInt": 1
107
+ }
108
+ ],
109
+ "mappings": [
110
+ {
111
+ "inputKey": "properties.cart_id",
112
+ "outputKey": "event.xdm.commerce.cart.cartID"
113
+ },
114
+ {
115
+ "inputKey": "messageId",
116
+ "outputKey": "event.xdm.commerce.productListAdds.id"
117
+ },
118
+ {
119
+ "inputKey": "input",
120
+ "outputKey": "event.xdm.productListItems",
121
+ "transforms": [
122
+ {
123
+ "expression": {
124
+ "lang": "lua",
125
+ "body": "local productCategories = { { categoryID = input.properties.category } }\nreturn {{\n productCategories = productCategories,\n SKU = input.properties.sku,\n name = input.properties.name,\n priceTotal = input.properties.price * input.properties.quantity,\n quantity = input.properties.quantity\n}}"
126
+ }
127
+ }
128
+ ]
129
+ }
130
+ ]
131
+ },
132
+ "order_completed": {
133
+ "enrichments": [
134
+ {
135
+ "outputKey": "event.xdm.eventType",
136
+ "staticString": "commerce.purchases"
137
+ },
138
+ {
139
+ "outputKey": "event.xdm.commerce.purchases.value",
140
+ "staticInt": 1
141
+ }
142
+ ],
143
+ "mappings": [
144
+ {
145
+ "inputKey": "properties.order_id",
146
+ "outputKey": "event.xdm.commerce.order.payments.transactionID"
147
+ },
148
+ {
149
+ "inputKey": "properties.currency",
150
+ "outputKey": "event.xdm.commerce.order.currencyCode"
151
+ },
152
+ {
153
+ "inputKey": "properties.order_id",
154
+ "outputKey": "event.xdm.commerce.order.purchaseID"
155
+ },
156
+ {
157
+ "inputKey": "messageId",
158
+ "outputKey": "event.xdm.commerce.purchases.id"
159
+ },
160
+ {
161
+ "inputKey": "input",
162
+ "outputKey": "event.xdm.productListItems",
163
+ "transforms": [
164
+ {
165
+ "expression": {
166
+ "lang": "lua",
167
+ "body": "return MAP(input.properties.products, function(p)\n local productCategories = { { categoryID = p.category } }\n return {\n productCategories = productCategories,\n SKU = p.sku,\n name = p.name,\n priceTotal = p.price * (p.quantity or 1),\n quantity = p.quantity or 1\n }\nend)"
168
+ }
169
+ }
170
+ ]
171
+ }
172
+ ]
173
+ },
174
+ "cart_viewed": {
175
+ "enrichments": [
176
+ {
177
+ "outputKey": "event.xdm.eventType",
178
+ "staticString": "commerce.productListViews"
179
+ },
180
+ {
181
+ "outputKey": "event.xdm.commerce.productListViews.value",
182
+ "staticInt": 1
183
+ }
184
+ ],
185
+ "mappings": [
186
+ {
187
+ "inputKey": "properties.cart_id",
188
+ "outputKey": "event.xdm.commerce.cart.cartID"
189
+ },
190
+ {
191
+ "inputKey": "messageId",
192
+ "outputKey": "event.xdm.commerce.productListViews.id"
193
+ },
194
+ {
195
+ "inputKey": "input",
196
+ "outputKey": "event.xdm.productListItems",
197
+ "transforms": [
198
+ {
199
+ "expression": {
200
+ "lang": "lua",
201
+ "body": "return MAP(input.properties.products, function(p)\n local productCategories = { { categoryID = p.category } }\n return {\n productCategories = productCategories,\n SKU = p.sku,\n name = p.name,\n priceTotal = p.price * (p.quantity or 1),\n quantity = p.quantity or 1\n }\nend)"
202
+ }
203
+ }
204
+ ]
205
+ }
206
+ ]
207
+ },
208
+ "product_removed": {
209
+ "enrichments": [
210
+ {
211
+ "outputKey": "event.xdm.eventType",
212
+ "staticString": "commerce.productListRemovals"
213
+ },
214
+ {
215
+ "outputKey": "event.xdm.commerce.productListRemovals.value",
216
+ "staticInt": 1
217
+ }
218
+ ],
219
+ "mappings": [
220
+ {
221
+ "inputKey": "properties.cart_id",
222
+ "outputKey": "event.xdm.commerce.cart.cartID"
223
+ },
224
+ {
225
+ "inputKey": "messageId",
226
+ "outputKey": "event.xdm.commerce.productListRemovals.id"
227
+ },
228
+ {
229
+ "inputKey": "input",
230
+ "outputKey": "event.xdm.productListItems",
231
+ "transforms": [
232
+ {
233
+ "expression": {
234
+ "lang": "lua",
235
+ "body": "local productCategories = { { categoryID = input.properties.category } }\nreturn {{\n productCategories = productCategories,\n SKU = input.properties.sku,\n name = input.properties.name,\n priceTotal = input.properties.price * input.properties.quantity,\n quantity = input.properties.quantity\n}}"
236
+ }
237
+ }
238
+ ]
239
+ }
240
+ ]
241
+ },
242
+ "product_viewed": {
243
+ "enrichments": [
244
+ {
245
+ "outputKey": "event.xdm.eventType",
246
+ "staticString": "commerce.productViews"
247
+ },
248
+ {
249
+ "outputKey": "event.xdm.commerce.productViews.value",
250
+ "staticInt": 1
251
+ }
252
+ ],
253
+ "mappings": [
254
+ {
255
+ "inputKey": "messageId",
256
+ "outputKey": "event.xdm.commerce.productViews.id"
257
+ },
258
+ {
259
+ "inputKey": "input",
260
+ "outputKey": "event.xdm.productListItems",
261
+ "transforms": [
262
+ {
263
+ "expression": {
264
+ "lang": "lua",
265
+ "body": "local productCategories = { { categoryID = input.properties.category } }\nreturn {{\n productCategories = productCategories,\n SKU = input.properties.sku,\n name = input.properties.name,\n priceTotal = input.properties.price * input.properties.quantity,\n quantity = input.properties.quantity\n}}"
266
+ }
267
+ }
268
+ ]
269
+ }
270
+ ]
69
271
  }
70
272
  }
71
273
  }
@@ -1 +1 @@
1
- "6488fdb9ca7cd982a6c0bc7bd4100ada"
1
+ "47c697f9302155341d749f19a62ba67c"
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "isDraft": false,
3
3
  "isBeta": true,
4
- "friendlyName": "Google Campaign Manager",
5
- "description": "Campaign Manager 360 is a web-based ad management system for advertisers and agencies.\nIt helps you manage your digital campaigns across websites and mobile.\nThis includes a robust set of features for ad serving, targeting, verification, and reporting.",
4
+ "friendlyName": "CM360 - Floodlights",
5
+ "description": "Google Marketing Platform tool that enables advertisers to manage and measure their digital ads campaigns across various online advertising channels.",
6
6
  "logo": "https://cdn.metarouter.io/logo.svg",
7
- "color": "#1E8E3D",
7
+ "color": "#0F9D58",
8
8
  "eventSource": {
9
9
  "isAndroidApp": true,
10
10
  "isIosApp": true,
@@ -35,6 +35,10 @@
35
35
  {
36
36
  "date": "2024-08-22T00:00:00.000Z",
37
37
  "note": "Version 0.3.0\ntimestamp field is used as the event time"
38
+ },
39
+ {
40
+ "date": "2024-09-25T00:00:00.000Z",
41
+ "note": "Version 0.4.0\nFriendly name renaming\nDescription and color updated"
38
42
  }
39
43
  ]
40
44
  }
@@ -1 +1 @@
1
- "b4b43961c72b82dac8dc5b2f565e4afd"
1
+ "4a127dcb2b4f1b96ce0d913562f718f6"
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.3.0",
2
+ "version": "0.4.0",
3
3
  "params": [
4
4
  {
5
5
  "name": "CONFIG_ID",
@@ -0,0 +1 @@
1
+ "c60cb71c30e0faf3b4b77d06d56d2149"
@@ -0,0 +1,135 @@
1
+ {
2
+ "params": [
3
+ {
4
+ "name": "API_KEY",
5
+ "exampleValue": "my-api-key"
6
+ },
7
+ {
8
+ "name": "API_BASE_URL",
9
+ "exampleValue": "my-api-base-url",
10
+ "defaultValue": "https://api.iterable.com"
11
+ }
12
+ ],
13
+ "default": {
14
+ "endpoint": "$$API_BASE_URL$$/api/events/track",
15
+ "method": "POST",
16
+ "headers": [
17
+ {
18
+ "key": "Content-Type",
19
+ "value": "application/json"
20
+ },
21
+ {
22
+ "key": "Accept-Encoding",
23
+ "value": "application/json"
24
+ },
25
+ {
26
+ "key": "X-Forwarded-For",
27
+ "fromEventKey": "context.ip"
28
+ },
29
+ {
30
+ "key": "User-Agent",
31
+ "fromEventKey": "context.userAgent"
32
+ },
33
+ {
34
+ "key": "Api-User-Agent",
35
+ "value": "MetaRouter/integration/1.0.0"
36
+ },
37
+ {
38
+ "key": "Api-Key",
39
+ "value": "$$API_KEY$$"
40
+ }
41
+ ]
42
+ },
43
+ "eventSpecific": {
44
+ "identify": {
45
+ "endpoint": "$$API_BASE_URL$$/api/users/update",
46
+ "method": "POST",
47
+ "headers": [
48
+ {
49
+ "key": "Content-Type",
50
+ "value": "application/json"
51
+ },
52
+ {
53
+ "key": "Accept-Encoding",
54
+ "value": "application/json"
55
+ },
56
+ {
57
+ "key": "X-Forwarded-For",
58
+ "fromEventKey": "context.ip"
59
+ },
60
+ {
61
+ "key": "User-Agent",
62
+ "fromEventKey": "context.userAgent"
63
+ },
64
+ {
65
+ "key": "Api-User-Agent",
66
+ "value": "MetaRouter/integration/1.0.0"
67
+ },
68
+ {
69
+ "key": "Api-Key",
70
+ "value": "$$API_KEY$$"
71
+ }
72
+ ]
73
+ },
74
+ "product_added": {
75
+ "endpoint": "$$API_BASE_URL$$/api/commerce/updateCart",
76
+ "method": "POST",
77
+ "headers": [
78
+ {
79
+ "key": "Content-Type",
80
+ "value": "application/json"
81
+ },
82
+ {
83
+ "key": "Accept-Encoding",
84
+ "value": "application/json"
85
+ },
86
+ {
87
+ "key": "X-Forwarded-For",
88
+ "fromEventKey": "context.ip"
89
+ },
90
+ {
91
+ "key": "User-Agent",
92
+ "fromEventKey": "context.userAgent"
93
+ },
94
+ {
95
+ "key": "Api-User-Agent",
96
+ "value": "MetaRouter/integration/1.0.0"
97
+ },
98
+ {
99
+ "key": "Api-Key",
100
+ "value": "$$API_KEY$$"
101
+ }
102
+ ]
103
+ },
104
+ "order_completed": {
105
+ "endpoint": "$$API_BASE_URL$$/api/commerce/trackPurchase",
106
+ "method": "POST",
107
+ "headers": [
108
+ {
109
+ "key": "Content-Type",
110
+ "value": "application/json"
111
+ },
112
+ {
113
+ "key": "Accept-Encoding",
114
+ "value": "application/json"
115
+ },
116
+ {
117
+ "key": "X-Forwarded-For",
118
+ "fromEventKey": "context.ip"
119
+ },
120
+ {
121
+ "key": "User-Agent",
122
+ "fromEventKey": "context.userAgent"
123
+ },
124
+ {
125
+ "key": "Api-User-Agent",
126
+ "value": "MetaRouter/integration/1.0.0"
127
+ },
128
+ {
129
+ "key": "Api-Key",
130
+ "value": "$$API_KEY$$"
131
+ }
132
+ ]
133
+ }
134
+ }
135
+ }
@@ -0,0 +1 @@
1
+ "496fbb8a6ca823ec3bbe0d72d97bd038"
@@ -0,0 +1,24 @@
1
+ {
2
+ "isDraft": false,
3
+ "isBeta": true,
4
+ "friendlyName": "Iterable",
5
+ "description": "Iterable is a customer engagement platform that enables brands to create, execute, and optimize cross-channel marketing campaigns.",
6
+ "logo": "https://cdn.metarouter.io/iterable.png",
7
+ "color": "#3258FF",
8
+ "eventSource": {
9
+ "isAndroidApp": false,
10
+ "isIosApp": false,
11
+ "isWebApp": true
12
+ },
13
+ "inputSchema": "analytics_js",
14
+ "releaseNotes": [
15
+ {
16
+ "date": "2024-09-25T21:00:00.000Z",
17
+ "note": "Version: 0.1.0\nBeta Version\nIterable initial release"
18
+ },
19
+ {
20
+ "date": "2024-09-25T21:00:00.000Z",
21
+ "note": "Version: 0.2.0\nUpdate endpoint for identify event\nInclude IP and userAgent in dataFields"
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1 @@
1
+ "2034696c9313bc0af010d08e6f167e4d"
@@ -0,0 +1,155 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "global": {
4
+ "enrichments": [
5
+ {
6
+ "staticBool": true,
7
+ "outputKey": "createNewFields"
8
+ }
9
+ ],
10
+ "mappings": [
11
+ {
12
+ "inputKey": "messageId",
13
+ "outputKey": "id"
14
+ },
15
+ {
16
+ "inputKey": "input",
17
+ "outputKey": "createdAt",
18
+ "transforms": [
19
+ {
20
+ "expression": {
21
+ "lang": "lua",
22
+ "body": "return SECONDS_SINCE_EPOCH_FROM_RFC3999(input.timestamp)"
23
+ }
24
+ }
25
+ ]
26
+ }
27
+ ]
28
+ },
29
+ "default": {
30
+ "mappings": [
31
+ {
32
+ "inputKey": "traits.email",
33
+ "outputKey": "email"
34
+ },
35
+ {
36
+ "inputKey": "anonymousId",
37
+ "outputKey": "userId"
38
+ },
39
+ {
40
+ "inputKey": "input",
41
+ "outputKey": "eventName",
42
+ "transforms": [
43
+ {
44
+ "expression": {
45
+ "lang": "lua",
46
+ "body": "if input.type == \"track\" then\n return input.event\nend\nreturn input.type"
47
+ }
48
+ }
49
+ ]
50
+ },
51
+ {
52
+ "inputKey": "properties",
53
+ "outputKey": "dataFields"
54
+ }
55
+ ]
56
+ },
57
+ "eventSpecific": {
58
+ "identify": {
59
+ "mappings": [
60
+ {
61
+ "inputKey": "traits.email",
62
+ "outputKey": "email"
63
+ },
64
+ {
65
+ "inputKey": "anonymousId",
66
+ "outputKey": "userId"
67
+ },
68
+ {
69
+ "inputKey": "properties",
70
+ "outputKey": "dataFields"
71
+ },
72
+ {
73
+ "inputKey": "context.ip",
74
+ "outputKey": "dataFields.ip"
75
+ },
76
+ {
77
+ "inputKey": "context.userAgent",
78
+ "outputKey": "dataFields.userAgent"
79
+ }
80
+ ]
81
+ },
82
+ "order_completed": {
83
+ "mappings": [
84
+ {
85
+ "inputKey": "traits.email",
86
+ "outputKey": "user.email"
87
+ },
88
+ {
89
+ "inputKey": "anonymousId",
90
+ "outputKey": "user.userId"
91
+ },
92
+ {
93
+ "inputKey": "input",
94
+ "outputKey": "total",
95
+ "transforms": [
96
+ {
97
+ "expression": {
98
+ "lang": "lua",
99
+ "body": "local prods = input.properties.products or input.properties\nreturn SUM(\n MAP(prods,\n function (p)\n return (p.price or 0) * (p.quantity or 1)\n end)\n)"
100
+ }
101
+ }
102
+ ]
103
+ },
104
+ {
105
+ "inputKey": "input",
106
+ "outputKey": "items",
107
+ "transforms": [
108
+ {
109
+ "expression": {
110
+ "lang": "lua",
111
+ "body": "local function get_content(p)\nreturn {\n id = p.product_id,\n sku = p.sku,\n name = p.name,\n categories = { p.category },\n price = p.price,\n quantity = p.quantity,\n imageUrl = p.image_url,\n url = p.url,\n}\nend\n\nlocal prods = input.properties.products or {input.properties}\nreturn MAP(prods, get_content)"
112
+ }
113
+ }
114
+ ]
115
+ },
116
+ {
117
+ "inputKey": "input",
118
+ "outputKey": "dataFields",
119
+ "transforms": [
120
+ {
121
+ "expression": {
122
+ "lang": "lua",
123
+ "body": "local props = input.properties\nprops.products = nil\nreturn props"
124
+ }
125
+ }
126
+ ]
127
+ }
128
+ ]
129
+ },
130
+ "product_added": {
131
+ "mappings": [
132
+ {
133
+ "inputKey": "traits.email",
134
+ "outputKey": "user.email"
135
+ },
136
+ {
137
+ "inputKey": "anonymousId",
138
+ "outputKey": "user.userId"
139
+ },
140
+ {
141
+ "inputKey": "input",
142
+ "outputKey": "items",
143
+ "transforms": [
144
+ {
145
+ "expression": {
146
+ "lang": "lua",
147
+ "body": "local p = input.properties\nreturn {{\n id = p.product_id,\n sku = p.sku,\n name = p.name,\n categories = { p.category },\n price = p.price,\n quantity = p.quantity,\n imageUrl = p.image_url,\n url = p.url,\n}}"
148
+ }
149
+ }
150
+ ]
151
+ }
152
+ ]
153
+ }
154
+ }
155
+ }
@@ -0,0 +1 @@
1
+ "8a2c80212609e82c64e64d02e5186ac3"
@@ -0,0 +1,58 @@
1
+ {
2
+ "params": [
3
+ {
4
+ "name": "PIXEL_ID",
5
+ "exampleValue": "my-pixel-id"
6
+ },
7
+ {
8
+ "name": "API_VERSION",
9
+ "exampleValue": "my-api-version",
10
+ "defaultValue": "12"
11
+ },
12
+ {
13
+ "name": "CONSUMER_KEY",
14
+ "exampleValue": "my-consumer-key"
15
+ },
16
+ {
17
+ "name": "CONSUMER_SECRET",
18
+ "exampleValue": "my-consumer-secret"
19
+ },
20
+ {
21
+ "name": "ACCESS_TOKEN",
22
+ "exampleValue": "my-access-token"
23
+ },
24
+ {
25
+ "name": "TOKEN_SECRET",
26
+ "exampleValue": "my-token-secret"
27
+ }
28
+ ],
29
+ "default": {
30
+ "endpoint": "https://ads-api.x.com/$$API_VERSION$$/measurement/conversions/$$PIXEL_ID$$",
31
+ "oauth1Auth": {
32
+ "consumer_key": "$$CONSUMER_KEY$$",
33
+ "consumer_secret": "$$CONSUMER_SECRET$$",
34
+ "access_token": "$$ACCESS_TOKEN$$",
35
+ "token_secret": "$$TOKEN_SECRET$$"
36
+ },
37
+ "batchSize": 250,
38
+ "transform": {
39
+ "lang": "lua",
40
+ "body": "request.body = { conversions = batch }\nreturn request"
41
+ },
42
+ "method": "POST",
43
+ "headers": [
44
+ {
45
+ "key": "Content-Type",
46
+ "value": "application/json"
47
+ },
48
+ {
49
+ "key": "Accept",
50
+ "value": "*/*"
51
+ },
52
+ {
53
+ "key": "Accept-Encoding",
54
+ "value": "application/json"
55
+ }
56
+ ]
57
+ }
58
+ }
@@ -0,0 +1 @@
1
+ "7a09e307602e7b276d59089a6b3e6d28"
@@ -0,0 +1,24 @@
1
+ {
2
+ "isDraft": false,
3
+ "isBeta": false,
4
+ "friendlyName": "X Ads - Web Conversions",
5
+ "description": "X Ads is a digital advertising platform designed to help businesses reach and engage with their target audiences on X, formerly known as Twitter.",
6
+ "logo": "https://cdn.metarouter.io/x-ads.png",
7
+ "color": "#000000",
8
+ "eventSource": {
9
+ "isAndroidApp": false,
10
+ "isIosApp": false,
11
+ "isWebApp": true
12
+ },
13
+ "inputSchema": "analytics_js",
14
+ "releaseNotes": [
15
+ {
16
+ "date": "2024-09-04T21:00:00.000Z",
17
+ "note": "Version: 0.1.0\nBeta Version\nX Ads initial release"
18
+ },
19
+ {
20
+ "date": "2024-09-25T21:00:00.000Z",
21
+ "note": "Version: 1.0.0\nStable release"
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1 @@
1
+ "e2d5f9c04c1ac695ffa566d45c888dd9"
@@ -0,0 +1,167 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "default": {
4
+ "enrichments": [
5
+ {
6
+ "staticString": "ADD_CATCH_ALL_EVENT_ID_HERE",
7
+ "outputKey": "event_id"
8
+ }
9
+ ]
10
+ },
11
+ "global": {
12
+ "mappings": [
13
+ {
14
+ "inputKey": "messageId",
15
+ "outputKey": "conversion_id"
16
+ },
17
+ {
18
+ "inputKey": "timestamp",
19
+ "outputKey": "conversion_time"
20
+ },
21
+ {
22
+ "inputKey": "input",
23
+ "outputKey": "identifiers",
24
+ "transforms": [
25
+ {
26
+ "expression": {
27
+ "lang": "lua",
28
+ "body": "local identifiers = {}\n\nlocal email = input.traits.email or input.context.traits.email\nif (email) then\n table.insert(identifiers, { hashed_email = TO_SHA256_HASH(LOWER(TRIM(email))) })\nend\n\nlocal phone = input.traits.phone or input.context.traits.phone\nif (phone) then\n table.insert(identifiers, { hashed_phone_number = TO_SHA256_HASH(LOWER(TRIM(phone))) })\nend\n\nif (input.context.providers.xAds.twclid) then\n table.insert(identifiers, { twclid = input.context.providers.xAds.twclid })\nend\nif (input.context.ip or input.context.userAgent) then\n table.insert(identifiers, {\n ip_address = input.context.ip,\n user_agent = input.context.userAgent\n })\nend\n\nif #identifiers > 0 then\n return identifiers\nend"
29
+ }
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ "inputKey": "input",
35
+ "outputKey": "number_items",
36
+ "transforms": [
37
+ {
38
+ "expression": {
39
+ "lang": "lua",
40
+ "body": "if input.properties.products then\n return SUM(MAP(input.properties.products, function (p) return p.quantity or 1 end))\nelseif input.properties.sku then\n return 1\nend"
41
+ }
42
+ }
43
+ ]
44
+ },
45
+ {
46
+ "inputKey": "input",
47
+ "outputKey": "price_currency",
48
+ "transforms": [
49
+ {
50
+ "expression": {
51
+ "lang": "lua",
52
+ "body": "local currency = input.properties.currency\nif currency then\n return UPPER(currency)\nend"
53
+ }
54
+ }
55
+ ]
56
+ },
57
+ {
58
+ "inputKey": "input",
59
+ "outputKey": "value",
60
+ "transforms": [
61
+ {
62
+ "expression": {
63
+ "lang": "lua",
64
+ "body": "local value = 0\nif input.properties.products then\n value = SUM(MAP(input.properties.products, function (p)\n return (p.price or 0) * (p.quantity or 1)\n end))\nelseif input.properties.sku then\n value = (input.properties.price or 0) * (input.properties.quantity or 1)\nelse\n return\nend\nreturn string.format(\"%.2f\", value)"
65
+ }
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ "inputKey": "input",
71
+ "outputKey": "description",
72
+ "transforms": [
73
+ {
74
+ "expression": {
75
+ "lang": "lua",
76
+ "body": "if input.type == 'track' then\n return input.event\nend\nreturn input.type"
77
+ }
78
+ }
79
+ ]
80
+ },
81
+ {
82
+ "inputKey": "input",
83
+ "outputKey": "contents",
84
+ "transforms": [
85
+ {
86
+ "expression": {
87
+ "lang": "lua",
88
+ "body": "local function get_content(p)\n if not p.sku then\n return nil\n end\n\n return {\n content_id = p.sku,\n content_name = p.name,\n content_price = string.format(\"%.2f\", p.price),\n content_type = p.category,\n num_items = p.quantity\n }\nend\n\nlocal prods = input.properties.products or {input.properties}\nlocal contents = MAP(prods, get_content)\nif #contents > 0 then\n return contents\nend"
89
+ }
90
+ }
91
+ ]
92
+ }
93
+ ]
94
+ },
95
+ "eventSpecific": {
96
+ "page": {
97
+ "enrichments": [
98
+ {
99
+ "staticString": "ADD_EVENT_ID_HERE",
100
+ "outputKey": "event_id"
101
+ }
102
+ ]
103
+ },
104
+ "checkout_started": {
105
+ "enrichments": [
106
+ {
107
+ "staticString": "ADD_EVENT_ID_HERE",
108
+ "outputKey": "event_id"
109
+ }
110
+ ]
111
+ },
112
+ "order_completed": {
113
+ "enrichments": [
114
+ {
115
+ "staticString": "ADD_EVENT_ID_HERE",
116
+ "outputKey": "event_id"
117
+ }
118
+ ]
119
+ },
120
+ "payment_info_entered": {
121
+ "enrichments": [
122
+ {
123
+ "staticString": "ADD_EVENT_ID_HERE",
124
+ "outputKey": "event_id"
125
+ }
126
+ ]
127
+ },
128
+ "product_added": {
129
+ "enrichments": [
130
+ {
131
+ "staticString": "ADD_EVENT_ID_HERE",
132
+ "outputKey": "event_id"
133
+ }
134
+ ]
135
+ },
136
+ "product_added_to_wishlist": {
137
+ "enrichments": [
138
+ {
139
+ "staticString": "ADD_EVENT_ID_HERE",
140
+ "outputKey": "event_id"
141
+ }
142
+ ]
143
+ },
144
+ "product_viewed": {
145
+ "enrichments": [
146
+ {
147
+ "staticString": "ADD_EVENT_ID_HERE",
148
+ "outputKey": "event_id"
149
+ }
150
+ ]
151
+ },
152
+ "products_searched": {
153
+ "enrichments": [
154
+ {
155
+ "staticString": "ADD_EVENT_ID_HERE",
156
+ "outputKey": "event_id"
157
+ }
158
+ ],
159
+ "mappings": [
160
+ {
161
+ "inputKey": "properties.query",
162
+ "outputKey": "search_string"
163
+ }
164
+ ]
165
+ }
166
+ }
167
+ }
@@ -1 +1 @@
1
- "fd019ec7efa4110a98aabedf76c9b45b"
1
+ "47ca86410616998fb5217b01a0f6394b"
@@ -1,28 +1,28 @@
1
1
  {
2
2
  "params": [
3
3
  {
4
- "name": "ENDPOINT",
4
+ "name": "API_URL",
5
5
  "isOptional": false,
6
- "exampleValue": "my-endpoint"
6
+ "exampleValue": "my-api-url"
7
7
  },
8
8
  {
9
- "name": "API_KEY",
9
+ "name": "WRITE_KEY",
10
10
  "isOptional": false,
11
- "exampleValue": "my-api-key"
11
+ "exampleValue": "my-write-key"
12
12
  }
13
13
  ],
14
14
  "default": {
15
- "endpoint": "$$ENDPOINT$$",
15
+ "endpoint": "$$API_URL$$",
16
16
  "method": "POST",
17
17
  "headers": [
18
18
  {
19
19
  "key": "Content-Type",
20
20
  "value": "application/json"
21
- },
22
- {
23
- "key": "Authorization",
24
- "value": "Basic $$API_KEY$$"
25
21
  }
26
- ]
22
+ ],
23
+ "transform": {
24
+ "body": "request.headers[\"Authorization\"] = \"Basic \" .. BASE64_ENCODE(\"w_k:$$WRITE_KEY$$\") return request",
25
+ "lang": "lua"
26
+ }
27
27
  }
28
28
  }
@@ -1 +1 @@
1
- "ffe8b69fced0b5fe21e99f7f3dd2688d"
1
+ "6d9e44ff3933ba72b87b0367c50625f8"
@@ -4,7 +4,7 @@
4
4
  "friendlyName": "Zeotap",
5
5
  "description": "Zeotap is a secure Customer Data Platform that allows clients the ability to unify customer data now and in the cookieless future.",
6
6
  "logo": "https://cdn.metarouter.io/logo.svg",
7
- "color": "#",
7
+ "color": "#094390",
8
8
  "eventSource": {
9
9
  "isAndroidApp": true,
10
10
  "isIosApp": true,
@@ -15,6 +15,10 @@
15
15
  {
16
16
  "date": "2024-02-21T00:00:00.000Z",
17
17
  "note": "Initial release; beta."
18
+ },
19
+ {
20
+ "date": "2024-09-25T00:00:00.000Z",
21
+ "note": "Version 0.2.0\nParams renaming\nAuth header and playbook timestamp updates"
18
22
  }
19
23
  ]
20
24
  }
@@ -1 +1 @@
1
- "b41b6a6abf842c24f13a67478667c4f9"
1
+ "66f3383843cd907c7524a23adbcf051c"
@@ -1,6 +1,12 @@
1
1
  {
2
- "version": "0.1.0",
2
+ "version": "0.2.0",
3
3
  "global": {
4
+ "enrichments": [
5
+ {
6
+ "outputKey": "event_timestamp",
7
+ "timestamp": "milliseconds"
8
+ }
9
+ ],
4
10
  "mappings": [
5
11
  {
6
12
  "inputKey": "messageId",
@@ -18,10 +24,6 @@
18
24
  "inputKey": "anonymousId",
19
25
  "outputKey": "anonymous_id"
20
26
  },
21
- {
22
- "inputKey": "originalTimestamp",
23
- "outputKey": "original_timestamp"
24
- },
25
27
  {
26
28
  "inputKey": "receivedAt",
27
29
  "outputKey": "received_at"
@@ -30,10 +32,6 @@
30
32
  "inputKey": "sentAt",
31
33
  "outputKey": "sent_at"
32
34
  },
33
- {
34
- "inputKey": "timestamp",
35
- "outputKey": "timestamp"
36
- },
37
35
  {
38
36
  "inputKey": "integrations",
39
37
  "outputKey": "integrations",
package/README.md CHANGED
@@ -7,11 +7,15 @@ users visit, the actions they take on your property, and whether the user has be
7
7
  previously.
8
8
  ## 2024-09
9
9
  - ActionIQ
10
+ - Adobe Analytics - Experience (BETA)
11
+ - CM360 - Floodlights (BETA)
12
+ - Iterable (BETA)
10
13
  - TikTok
11
14
  - VideoAmp (BETA)
15
+ - X Ads - Web Conversions
16
+ - Zeotap (BETA)
12
17
 
13
18
  ## 2024-08
14
- - Adobe Analytics - Experience (BETA)
15
19
  - AppsFlyer Android
16
20
  - AppsFlyer iOS
17
21
  - Webhooks
@@ -19,7 +23,6 @@ previously.
19
23
  - Commission Junction
20
24
  - Google Ads - Conversions
21
25
  - Google BigQuery
22
- - Google Campaign Manager (BETA)
23
26
  - HubSpot (BETA)
24
27
  - Impact Radius
25
28
  - Magellan AI
@@ -53,7 +56,6 @@ previously.
53
56
  - Kafka
54
57
  - Amazon S3
55
58
  - Treasure Data (BETA)
56
- - Zeotap (BETA)
57
59
 
58
60
  ## 2024-01
59
61
  - Firebase (BETA)
@@ -96,9 +98,13 @@ previously.
96
98
  | Kit Name | Date | Latest Note |
97
99
  |----------|------|-------------|
98
100
  | ActionIQ | 2024-09 | Version: 1.1.0 Added endpoint details for screen events Added screen event mappings to the playbook |
101
+ | Adobe Analytics - Experience (BETA) | 2024-09 | Version: 0.4.0 Adding additional parameters Adding additional events: order completed cart viewed product added product removed product viewed |
102
+ | CM360 - Floodlights (BETA) | 2024-09 | Version 0.4.0 Friendly name renaming Description and color updated |
103
+ | Iterable (BETA) | 2024-09 | Version: 0.1.0 Beta Version Iterable initial release |
99
104
  | TikTok | 2024-09 | Version: 2.1.0 Stable release |
100
105
  | VideoAmp (BETA) | 2024-09 | Version 0.2.0 Added new GPP related mappings |
101
- | Adobe Analytics - Experience (BETA) | 2024-08 | Version: 0.3.0 Removing Bearer Header Adding oAuth Updated friendly name |
106
+ | X Ads - Web Conversions | 2024-09 | Version: 1.0.0 Stable release |
107
+ | Zeotap (BETA) | 2024-09 | Version 0.2.0 Params renaming Auth header and playbook timestamp updates |
102
108
  | AppsFlyer Android | 2024-08 | Version 1.1.0 timestamp field is used as the event time |
103
109
  | AppsFlyer iOS | 2024-08 | Version 1.1.0 timestamp field is used as the event time |
104
110
  | Webhooks | 2024-08 | Version: 1.0.0 Stable release |
@@ -106,7 +112,6 @@ previously.
106
112
  | Commission Junction | 2024-08 | Version 1.1.0 timestamp field is used as the event time |
107
113
  | Google Ads - Conversions | 2024-08 | Version 1.2.0 timestamp field is used as the event time |
108
114
  | Google BigQuery | 2024-08 | Version: 1.0.0 Adding option to set datase creation mode to BIG_QUERY_OPTIONS_DISABLE_DATASET_CREATION This will allow users to create save events without having the bigquery.datasets.create permission in their IAM role |
109
- | Google Campaign Manager (BETA) | 2024-08 | Version 0.3.0 timestamp field is used as the event time |
110
115
  | HubSpot (BETA) | 2024-08 | Version 0.2.0 timestamp field is used as the event time |
111
116
  | Impact Radius | 2024-08 | Version 1.1.0 timestamp field is used as the event time |
112
117
  | Magellan AI | 2024-08 | Version: 1.0.0 Stable release |
@@ -130,7 +135,6 @@ previously.
130
135
  | Kafka | 2024-02 | Removed Identity |
131
136
  | Amazon S3 | 2024-02 | Removed Identity |
132
137
  | Treasure Data (BETA) | 2024-02 | Initial release; beta. |
133
- | Zeotap (BETA) | 2024-02 | Initial release; beta. |
134
138
  | Firebase (BETA) | 2024-01 | google-firebase initial release. |
135
139
  | Acuity Ads | 2023-12 | Stable release Marked as stable version: 1.0.0 |
136
140
  | Adobe ID (BETA) | 2023-12 | Marked as unstable version: 0.1.0 |
package/index.js CHANGED
@@ -249,6 +249,12 @@ exports['in-market'] = {
249
249
  metadata: require('./.dist/in-market/metadata.json')
250
250
  }
251
251
 
252
+ exports.iterable = {
253
+ endpointSchema: require('./.dist/iterable/connection.json'),
254
+ playbook: require('./.dist/iterable/playbook.json'),
255
+ metadata: require('./.dist/iterable/metadata.json')
256
+ }
257
+
252
258
  exports.kochava = {
253
259
  endpointSchema: require('./.dist/kochava/connection.json'),
254
260
  playbook: require('./.dist/kochava/playbook.json'),
@@ -417,6 +423,12 @@ exports.videoamp = {
417
423
  metadata: require('./.dist/videoamp/metadata.json')
418
424
  }
419
425
 
426
+ exports['x-ads'] = {
427
+ endpointSchema: require('./.dist/x-ads/connection.json'),
428
+ playbook: require('./.dist/x-ads/playbook.json'),
429
+ metadata: require('./.dist/x-ads/metadata.json')
430
+ }
431
+
420
432
  exports.xandr = {
421
433
  endpointSchema: require('./.dist/xandr/connection.json'),
422
434
  playbook: require('./.dist/xandr/playbook.json'),
@@ -640,6 +652,11 @@ exports.etags = {
640
652
  playbook: require('./.dist/in-market/playbook.etag.json'),
641
653
  kit: require('./.dist/in-market/kit.etag.json')
642
654
  },
655
+ iterable: {
656
+ endpointSchema: require('./.dist/iterable/connection.etag.json'),
657
+ playbook: require('./.dist/iterable/playbook.etag.json'),
658
+ kit: require('./.dist/iterable/kit.etag.json')
659
+ },
643
660
  kochava: {
644
661
  playbook: require('./.dist/kochava/playbook.etag.json'),
645
662
  kit: require('./.dist/kochava/kit.etag.json')
@@ -779,6 +796,11 @@ exports.etags = {
779
796
  playbook: require('./.dist/videoamp/playbook.etag.json'),
780
797
  kit: require('./.dist/videoamp/kit.etag.json')
781
798
  },
799
+ 'x-ads': {
800
+ endpointSchema: require('./.dist/x-ads/connection.etag.json'),
801
+ playbook: require('./.dist/x-ads/playbook.etag.json'),
802
+ kit: require('./.dist/x-ads/kit.etag.json')
803
+ },
782
804
  xandr: {
783
805
  endpointSchema: require('./.dist/xandr/connection.etag.json'),
784
806
  playbook: require('./.dist/xandr/playbook.etag.json'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metarouter/ajs-starter-kit",
3
- "version": "1.0.104",
3
+ "version": "1.0.106",
4
4
  "description": "MetaRouter analytics.js starter kit",
5
5
  "main": "index.js",
6
6
  "scripts": {