@metarouter/ajs-starter-kit 1.0.37 → 1.0.40

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
- "92b4fd944be41a62e2ad46300c775456"
1
+ "d6a97c9fb257249f2d277c4880c7ebae"
@@ -7,7 +7,7 @@
7
7
  ],
8
8
  "default": {
9
9
  "endpoint": "https://api2.amplitude.com/batch",
10
- "batchSize": 1000,
10
+ "batchSize": 10,
11
11
  "transform": {
12
12
  "lang": "lua",
13
13
  "body": "request.body = { events = batch, api_key = '$$API_KEY$$' }\nreturn request"
@@ -1 +1 @@
1
- "662ccfc459443df8faa20f374eb754ca"
1
+ "385c95d2c5d208ad0ce3c2d8f073e320"
@@ -25,11 +25,15 @@
25
25
  },
26
26
  {
27
27
  "date": "2021-08-26T00:00:00.000Z",
28
- "note": "adds some context input"
28
+ "note": "Adds some context input"
29
29
  },
30
30
  {
31
31
  "date": "2021-11-19T00:00:00.000Z",
32
- "note": "uses batch endpoint"
32
+ "note": "Uses batch endpoint"
33
+ },
34
+ {
35
+ "date": "2022-05-18T00:00:00.000Z",
36
+ "note": "Tune Down the batch size"
33
37
  }
34
38
  ]
35
39
  }
@@ -1 +1 @@
1
- "ffc6ae809d69bb231effd6f805894565"
1
+ "d5ca02338956602b73bfef7503abb33e"
@@ -16,7 +16,7 @@
16
16
  "default": {
17
17
  "endpoint": "https://graph.facebook.com/$$API_VERSION$$/$$PIXEL_ID$$/events?access_token=$$ACCESS_TOKEN$$",
18
18
  "method": "POST",
19
- "batchSize": 1000,
19
+ "batchSize": 10,
20
20
  "transform": {
21
21
  "lang": "lua",
22
22
  "body": "request.body = { data = batch }\nreturn request"
@@ -1 +1 @@
1
- "bc571a996baa33a0232799ddf3db03db"
1
+ "4454a05ef6771f08fbdfa3cab67e86cb"
@@ -25,11 +25,15 @@
25
25
  },
26
26
  {
27
27
  "date": "2021-11-19T00:00:00.000Z",
28
- "note": "uses batch endpoint"
28
+ "note": "Uses batch endpoint"
29
29
  },
30
30
  {
31
31
  "date": "2022-02-18T00:00:00.000Z",
32
- "note": "updated from v12.0 to v13.0"
32
+ "note": "Updated from v12.0 to v13.0"
33
+ },
34
+ {
35
+ "date": "2022-05-18T00:00:00.000Z",
36
+ "note": "Tune Down the batch size"
33
37
  }
34
38
  ]
35
39
  }
@@ -1 +1 @@
1
- "212997f22690a4e5206f15e1a5c5b242"
1
+ "5119bda1879448fa80660bd228a12d9d"
@@ -30,7 +30,7 @@
30
30
  }
31
31
  ],
32
32
  "method": "POST",
33
- "batchSize": 1000,
33
+ "batchSize": 10,
34
34
  "transform": {
35
35
  "lang": "lua",
36
36
  "body": "request.body = batch\nreturn request"
@@ -1 +1 @@
1
- "59e919b7e943ee362c17bd64d59c2aaa"
1
+ "eb79dcce8230e965a2b1ac42cfde1f73"
@@ -14,6 +14,10 @@
14
14
  {
15
15
  "date": "2022-03-23T00:00:00.000Z",
16
16
  "note": "Mixpanel initial release."
17
+ },
18
+ {
19
+ "date": "2022-05-18T00:00:00.000Z",
20
+ "note": "Tune Down the batch size"
17
21
  }
18
22
  ]
19
23
  }
@@ -0,0 +1 @@
1
+ "0f2b31eb090a4ef1f55f62093e393bf6"
@@ -0,0 +1,214 @@
1
+ {
2
+ "params": [
3
+ {
4
+ "exampleValue": "my-client-identifier",
5
+ "name": "CLIENT_IDENTIFIER"
6
+ },
7
+ {
8
+ "exampleValue": "my-ingestion-api-name",
9
+ "name": "INGESTION_API_NAME"
10
+ },
11
+ {
12
+ "exampleValue": "my-client-id",
13
+ "name": "CLIENT_ID"
14
+ },
15
+ {
16
+ "exampleValue": "my-user-name",
17
+ "name": "USER_NAME"
18
+ },
19
+ {
20
+ "exampleValue": "my-login-url",
21
+ "name": "LOGIN_URL"
22
+ },
23
+ {
24
+ "exampleValue": "my-private-key",
25
+ "name": "PRIVATE_KEY"
26
+ }
27
+ ],
28
+ "default": {
29
+ "batchSize": 100,
30
+ "endpoint": "https://$$CLIENT_IDENTIFIER$$/api/v1/ingest/sources/$$INGESTION_API_NAME$$/user",
31
+ "headers": [
32
+ {
33
+ "key": "Content-Type",
34
+ "value": "application/json"
35
+ }
36
+ ],
37
+ "method": "POST",
38
+ "providerAuth": {
39
+ "salesforceCdp": {
40
+ "clientId": "$$CLIENT_ID$$",
41
+ "loginUrl": "$$LOGIN_URL$$",
42
+ "privateKey": "$$PRIVATE_KEY$$",
43
+ "userName": "$$USER_NAME$$"
44
+ }
45
+ },
46
+ "transform": {
47
+ "body": "request.body = { data = batch }\nreturn request",
48
+ "lang": "lua"
49
+ }
50
+ },
51
+ "eventSpecific": {
52
+ "identify": {
53
+ "batchSize": 100,
54
+ "endpoint": "https://$$CLIENT_IDENTIFIER$$/api/v1/ingest/sources/$$INGESTION_API_NAME$$/user",
55
+ "headers": [
56
+ {
57
+ "key": "Content-Type",
58
+ "value": "application/json"
59
+ }
60
+ ],
61
+ "method": "POST",
62
+ "providerAuth": {
63
+ "salesforceCdp": {
64
+ "clientId": "$$CLIENT_ID$$",
65
+ "loginUrl": "$$LOGIN_URL$$",
66
+ "privateKey": "$$PRIVATE_KEY$$",
67
+ "userName": "$$USER_NAME$$"
68
+ }
69
+ },
70
+ "transform": {
71
+ "body": "request.body = { data = batch }\nreturn request",
72
+ "lang": "lua"
73
+ }
74
+ },
75
+ "page": {
76
+ "batchSize": 100,
77
+ "endpoint": "https://$$CLIENT_IDENTIFIER$$/api/v1/ingest/sources/$$INGESTION_API_NAME$$/page",
78
+ "headers": [
79
+ {
80
+ "key": "Content-Type",
81
+ "value": "application/json"
82
+ }
83
+ ],
84
+ "method": "POST",
85
+ "providerAuth": {
86
+ "salesforceCdp": {
87
+ "clientId": "$$CLIENT_ID$$",
88
+ "loginUrl": "$$LOGIN_URL$$",
89
+ "privateKey": "$$PRIVATE_KEY$$",
90
+ "userName": "$$USER_NAME$$"
91
+ }
92
+ },
93
+ "transform": {
94
+ "body": "request.body = { data = batch }\nreturn request",
95
+ "lang": "lua"
96
+ }
97
+ },
98
+ "order_completed": {
99
+ "batchSize": 100,
100
+ "endpoint": "https://$$CLIENT_IDENTIFIER$$/api/v1/ingest/sources/$$INGESTION_API_NAME$$/order_completed",
101
+ "headers": [
102
+ {
103
+ "key": "Content-Type",
104
+ "value": "application/json"
105
+ }
106
+ ],
107
+ "method": "POST",
108
+ "providerAuth": {
109
+ "salesforceCdp": {
110
+ "clientId": "$$CLIENT_ID$$",
111
+ "loginUrl": "$$LOGIN_URL$$",
112
+ "privateKey": "$$PRIVATE_KEY$$",
113
+ "userName": "$$USER_NAME$$"
114
+ }
115
+ },
116
+ "transform": {
117
+ "body": "request.body = { data = batch }\nreturn request",
118
+ "lang": "lua"
119
+ }
120
+ },
121
+ "product_added": {
122
+ "batchSize": 100,
123
+ "endpoint": "https://$$CLIENT_IDENTIFIER$$/api/v1/ingest/sources/$$INGESTION_API_NAME$$/product_added",
124
+ "headers": [
125
+ {
126
+ "key": "Content-Type",
127
+ "value": "application/json"
128
+ }
129
+ ],
130
+ "method": "POST",
131
+ "providerAuth": {
132
+ "salesforceCdp": {
133
+ "clientId": "$$CLIENT_ID$$",
134
+ "loginUrl": "$$LOGIN_URL$$",
135
+ "privateKey": "$$PRIVATE_KEY$$",
136
+ "userName": "$$USER_NAME$$"
137
+ }
138
+ },
139
+ "transform": {
140
+ "body": "request.body = { data = batch }\nreturn request",
141
+ "lang": "lua"
142
+ }
143
+ },
144
+ "product_list_viewed": {
145
+ "batchSize": 100,
146
+ "endpoint": "https://$$CLIENT_IDENTIFIER$$/api/v1/ingest/sources/$$INGESTION_API_NAME$$/product_list_viewed",
147
+ "headers": [
148
+ {
149
+ "key": "Content-Type",
150
+ "value": "application/json"
151
+ }
152
+ ],
153
+ "method": "POST",
154
+ "providerAuth": {
155
+ "salesforceCdp": {
156
+ "clientId": "$$CLIENT_ID$$",
157
+ "loginUrl": "$$LOGIN_URL$$",
158
+ "privateKey": "$$PRIVATE_KEY$$",
159
+ "userName": "$$USER_NAME$$"
160
+ }
161
+ },
162
+ "transform": {
163
+ "body": "request.body = { data = batch }\nreturn request",
164
+ "lang": "lua"
165
+ }
166
+ },
167
+ "product_viewed": {
168
+ "batchSize": 100,
169
+ "endpoint": "https://$$CLIENT_IDENTIFIER$$/api/v1/ingest/sources/$$INGESTION_API_NAME$$/product_viewed",
170
+ "headers": [
171
+ {
172
+ "key": "Content-Type",
173
+ "value": "application/json"
174
+ }
175
+ ],
176
+ "method": "POST",
177
+ "providerAuth": {
178
+ "salesforceCdp": {
179
+ "clientId": "$$CLIENT_ID$$",
180
+ "loginUrl": "$$LOGIN_URL$$",
181
+ "privateKey": "$$PRIVATE_KEY$$",
182
+ "userName": "$$USER_NAME$$"
183
+ }
184
+ },
185
+ "transform": {
186
+ "body": "request.body = { data = batch }\nreturn request",
187
+ "lang": "lua"
188
+ }
189
+ },
190
+ "cart_viewed": {
191
+ "batchSize": 100,
192
+ "endpoint": "https://$$CLIENT_IDENTIFIER$$/api/v1/ingest/sources/$$INGESTION_API_NAME$$/cart_viewed",
193
+ "headers": [
194
+ {
195
+ "key": "Content-Type",
196
+ "value": "application/json"
197
+ }
198
+ ],
199
+ "method": "POST",
200
+ "providerAuth": {
201
+ "salesforceCdp": {
202
+ "clientId": "$$CLIENT_ID$$",
203
+ "loginUrl": "$$LOGIN_URL$$",
204
+ "privateKey": "$$PRIVATE_KEY$$",
205
+ "userName": "$$USER_NAME$$"
206
+ }
207
+ },
208
+ "transform": {
209
+ "body": "request.body = { data = batch }\nreturn request",
210
+ "lang": "lua"
211
+ }
212
+ }
213
+ }
214
+ }
@@ -0,0 +1 @@
1
+ "6dc1746511395b6e1f356b07e1d27647"
@@ -0,0 +1,19 @@
1
+ {
2
+ "isDraft": false,
3
+ "friendlyName": "Salesforce CDP",
4
+ "description": "Salesforce CDP is a self-service customer data platform, or CDP, that drives personalization and engagement.",
5
+ "logo": "https://cdn.metarouter.io/logo.svg",
6
+ "color": "#0693e3",
7
+ "eventSource": {
8
+ "isAndroidApp": true,
9
+ "isIosApp": true,
10
+ "isWebApp": true
11
+ },
12
+ "inputSchema": "analytics_js",
13
+ "releaseNotes": [
14
+ {
15
+ "date": "2022-05-31T00:00:00.000Z",
16
+ "note": "Salesforce CDP initial release."
17
+ }
18
+ ]
19
+ }
@@ -0,0 +1 @@
1
+ "92ede4ee473e16ee277463b18f3beab7"
@@ -0,0 +1,409 @@
1
+ {
2
+ "version": "v0.0.1",
3
+ "global": {
4
+ "filters": [
5
+ {
6
+ "byEventNames": {
7
+ "action": "allow",
8
+ "events": [
9
+ "identify",
10
+ "page",
11
+ "order_completed",
12
+ "product_added",
13
+ "product_list_viewed",
14
+ "product_viewed",
15
+ "cart_viewed"
16
+ ]
17
+ }
18
+ }
19
+ ],
20
+ "mappings": [
21
+ {
22
+ "inputKey": "anonymousId",
23
+ "outputKey": "anonymous_id"
24
+ },
25
+ {
26
+ "inputKey": "originalTimestamp",
27
+ "outputKey": "created"
28
+ }
29
+ ]
30
+ },
31
+ "eventSpecific": {
32
+ "page": {
33
+ "mappings": [
34
+ {
35
+ "inputKey": "context.page.path",
36
+ "outputKey": "path"
37
+ },
38
+ {
39
+ "inputKey": "context.page.title",
40
+ "outputKey": "title"
41
+ },
42
+ {
43
+ "inputKey": "context.page.url",
44
+ "outputKey": "url"
45
+ },
46
+ {
47
+ "inputKey": "context.page.referrer",
48
+ "outputKey": "referrer"
49
+ },
50
+ {
51
+ "inputKey": "messageId",
52
+ "outputKey": "event_id"
53
+ }
54
+ ]
55
+ },
56
+ "order_completed": {
57
+ "mappings": [
58
+ {
59
+ "inputKey": "properties.checkout_id",
60
+ "outputKey": "checkout_id"
61
+ },
62
+ {
63
+ "inputKey": "properties.total",
64
+ "outputKey": "total"
65
+ },
66
+ {
67
+ "inputKey": "properties.order_id",
68
+ "outputKey": "order_id"
69
+ },
70
+ {
71
+ "inputKey": "properties.revenue",
72
+ "outputKey": "revenue"
73
+ },
74
+ {
75
+ "inputKey": "properties.shipping",
76
+ "outputKey": "shipping"
77
+ },
78
+ {
79
+ "inputKey": "properties.tax",
80
+ "outputKey": "tax"
81
+ },
82
+ {
83
+ "inputKey": "properties.discount",
84
+ "outputKey": "revenue"
85
+ },
86
+ {
87
+ "inputKey": "properties.coupon",
88
+ "outputKey": "coupon"
89
+ },
90
+ {
91
+ "inputKey": "messageId",
92
+ "outputKey": "event_id"
93
+ }
94
+ ]
95
+ },
96
+ "product_added": {
97
+ "mappings": [
98
+ {
99
+ "inputKey": "properties.cart_id",
100
+ "outputKey": "cart_id"
101
+ },
102
+ {
103
+ "inputKey": "properties.product_id",
104
+ "outputKey": "product_id"
105
+ },
106
+ {
107
+ "inputKey": "properties.sku",
108
+ "outputKey": "sku"
109
+ },
110
+ {
111
+ "inputKey": "properties.category",
112
+ "outputKey": "category"
113
+ },
114
+ {
115
+ "inputKey": "properties.name",
116
+ "outputKey": "name"
117
+ },
118
+ {
119
+ "inputKey": "properties.brand",
120
+ "outputKey": "brand"
121
+ },
122
+ {
123
+ "inputKey": "properties.variant",
124
+ "outputKey": "variant"
125
+ },
126
+ {
127
+ "inputKey": "properties.price",
128
+ "outputKey": "price"
129
+ },
130
+ {
131
+ "inputKey": "properties.quantity",
132
+ "outputKey": "quantity"
133
+ },
134
+ {
135
+ "inputKey": "properties.coupon",
136
+ "outputKey": "coupon"
137
+ },
138
+ {
139
+ "inputKey": "properties.position",
140
+ "outputKey": "position"
141
+ },
142
+ {
143
+ "inputKey": "properties.url",
144
+ "outputKey": "url"
145
+ },
146
+ {
147
+ "inputKey": "properties.image_url",
148
+ "outputKey": "image_url"
149
+ },
150
+ {
151
+ "inputKey": "messageId",
152
+ "outputKey": "event_id"
153
+ }
154
+ ]
155
+ },
156
+ "product_viewed": {
157
+ "mappings": [
158
+ {
159
+ "inputKey": "properties.product_id",
160
+ "outputKey": "product_id"
161
+ },
162
+ {
163
+ "inputKey": "properties.sku",
164
+ "outputKey": "sku"
165
+ },
166
+ {
167
+ "inputKey": "properties.category",
168
+ "outputKey": "category"
169
+ },
170
+ {
171
+ "inputKey": "properties.name",
172
+ "outputKey": "name"
173
+ },
174
+ {
175
+ "inputKey": "properties.brand",
176
+ "outputKey": "brand"
177
+ },
178
+ {
179
+ "inputKey": "properties.variant",
180
+ "outputKey": "variant"
181
+ },
182
+ {
183
+ "inputKey": "properties.price",
184
+ "outputKey": "price"
185
+ },
186
+ {
187
+ "inputKey": "properties.coupon",
188
+ "outputKey": "coupon"
189
+ },
190
+ {
191
+ "inputKey": "properties.position",
192
+ "outputKey": "position"
193
+ },
194
+ {
195
+ "inputKey": "properties.url",
196
+ "outputKey": "url"
197
+ },
198
+ {
199
+ "inputKey": "properties.image_url",
200
+ "outputKey": "image_url"
201
+ },
202
+ {
203
+ "inputKey": "messageId",
204
+ "outputKey": "event_id"
205
+ }
206
+ ]
207
+ },
208
+ "product_list_viewed": {
209
+ "mappings": [
210
+ {
211
+ "inputKey": "properties.list_id",
212
+ "outputKey": "list_id"
213
+ },
214
+ {
215
+ "inputKey": "properties.category",
216
+ "outputKey": "category"
217
+ },
218
+ {
219
+ "inputKey": "messageId",
220
+ "outputKey": "event_id"
221
+ }
222
+ ]
223
+ },
224
+ "cart_viewed": {
225
+ "mappings": [
226
+ {
227
+ "inputKey": "properties.cart_id",
228
+ "outputKey": "cart_id"
229
+ },
230
+ {
231
+ "inputKey": "input",
232
+ "outputKey": "product_id",
233
+ "transforms": [
234
+ {
235
+ "expression": {
236
+ "lang": "lua",
237
+ "body": "return JOIN(PLUCK(input.properties.products, \"product_id\"), \",\")"
238
+ }
239
+ }
240
+ ]
241
+ },
242
+ {
243
+ "inputKey": "input",
244
+ "outputKey": "sku",
245
+ "transforms": [
246
+ {
247
+ "expression": {
248
+ "lang": "lua",
249
+ "body": "return JOIN(PLUCK(input.properties.products, \"sku\"), \",\")"
250
+ }
251
+ }
252
+ ]
253
+ },
254
+ {
255
+ "inputKey": "input",
256
+ "outputKey": "category",
257
+ "transforms": [
258
+ {
259
+ "expression": {
260
+ "lang": "lua",
261
+ "body": "return JOIN(PLUCK(input.properties.products, \"category\"), \",\")"
262
+ }
263
+ }
264
+ ]
265
+ },
266
+ {
267
+ "inputKey": "input",
268
+ "outputKey": "name",
269
+ "transforms": [
270
+ {
271
+ "expression": {
272
+ "lang": "lua",
273
+ "body": "return JOIN(PLUCK(input.properties.products, \"name\"), \",\")"
274
+ }
275
+ }
276
+ ]
277
+ },
278
+ {
279
+ "inputKey": "input",
280
+ "outputKey": "brand",
281
+ "transforms": [
282
+ {
283
+ "expression": {
284
+ "lang": "lua",
285
+ "body": "return JOIN(PLUCK(input.properties.products, \"brand\"), \",\")"
286
+ }
287
+ }
288
+ ]
289
+ },
290
+ {
291
+ "inputKey": "input",
292
+ "outputKey": "variant",
293
+ "transforms": [
294
+ {
295
+ "expression": {
296
+ "lang": "lua",
297
+ "body": "return JOIN(PLUCK(input.properties.products, \"variant\"), \",\")"
298
+ }
299
+ }
300
+ ]
301
+ },
302
+ {
303
+ "inputKey": "input",
304
+ "outputKey": "price",
305
+ "transforms": [
306
+ {
307
+ "expression": {
308
+ "lang": "lua",
309
+ "body": "return JOIN(PLUCK(input.properties.products, \"price\"), \",\")"
310
+ }
311
+ }
312
+ ]
313
+ },
314
+ {
315
+ "inputKey": "input",
316
+ "outputKey": "quantity",
317
+ "transforms": [
318
+ {
319
+ "expression": {
320
+ "lang": "lua",
321
+ "body": "return JOIN(PLUCK(input.properties.products, \"quantity\"), \",\")"
322
+ }
323
+ }
324
+ ]
325
+ },
326
+ {
327
+ "inputKey": "input",
328
+ "outputKey": "coupon",
329
+ "transforms": [
330
+ {
331
+ "expression": {
332
+ "lang": "lua",
333
+ "body": "return JOIN(PLUCK(input.properties.products, \"coupon\"), \",\")"
334
+ }
335
+ }
336
+ ]
337
+ },
338
+ {
339
+ "inputKey": "input",
340
+ "outputKey": "position",
341
+ "transforms": [
342
+ {
343
+ "expression": {
344
+ "lang": "lua",
345
+ "body": "return JOIN(PLUCK(input.properties.products, \"position\"), \",\")"
346
+ }
347
+ }
348
+ ]
349
+ },
350
+ {
351
+ "inputKey": "input",
352
+ "outputKey": "url",
353
+ "transforms": [
354
+ {
355
+ "expression": {
356
+ "lang": "lua",
357
+ "body": "return JOIN(PLUCK(input.properties.products, \"url\"), \",\")"
358
+ }
359
+ }
360
+ ]
361
+ },
362
+ {
363
+ "inputKey": "input",
364
+ "outputKey": "image_url",
365
+ "transforms": [
366
+ {
367
+ "expression": {
368
+ "lang": "lua",
369
+ "body": "return JOIN(PLUCK(input.properties.products, \"image_url\"), \",\")"
370
+ }
371
+ }
372
+ ]
373
+ },
374
+ {
375
+ "inputKey": "messageId",
376
+ "outputKey": "event_id"
377
+ }
378
+ ]
379
+ },
380
+ "identify": {
381
+ "mappings": [
382
+ {
383
+ "inputKey": "context.userAgent",
384
+ "outputKey": "user_agent"
385
+ },
386
+ {
387
+ "inputKey": "userId",
388
+ "outputKey": "user_id"
389
+ },
390
+ {
391
+ "inputKey": "traits.email",
392
+ "outputKey": "email"
393
+ },
394
+ {
395
+ "inputKey": "context.providers.pinterest.derived_epik",
396
+ "outputKey": "pinterest_id"
397
+ },
398
+ {
399
+ "inputKey": "context.providers.theTradeDesk.ttd_id",
400
+ "outputKey": "tradedesk_id"
401
+ },
402
+ {
403
+ "inputKey": "context.ip",
404
+ "outputKey": "ip_address"
405
+ }
406
+ ]
407
+ }
408
+ }
409
+ }
@@ -0,0 +1 @@
1
+ "c2520096843f081b92efc48366b848a4"
@@ -0,0 +1,48 @@
1
+ {
2
+ "params": [
3
+ {
4
+ "name": "ACCOUNT_ID",
5
+ "exampleValue": "account-id"
6
+ },
7
+ {
8
+ "name": "CONSUMER_KEY",
9
+ "exampleValue": "consumer-key"
10
+ },
11
+ {
12
+ "name": "CONSUMER_SECRET",
13
+ "exampleValue": "consumer-secret"
14
+ },
15
+ {
16
+ "name": "ACCESS_TOKEN",
17
+ "exampleValue": "access-token"
18
+ },
19
+ {
20
+ "name": "TOKEN_SECRET",
21
+ "exampleValue": "token-secret"
22
+ }
23
+ ],
24
+ "default": {
25
+ "endpoint": "https://ads-api.twitter.com/10/accounts/$$ACCOUNT_ID$$/measurement/conversions",
26
+ "oauth1Auth": {
27
+ "consumer_key": "$$CONSUMER_KEY$$",
28
+ "consumer_secret": "$$CONSUMER_SECRET$$",
29
+ "access_token": "$$ACCESS_TOKEN$$",
30
+ "token_secret": "$$TOKEN_SECRET$$"
31
+ },
32
+ "method": "POST",
33
+ "headers": [
34
+ {
35
+ "key": "Content-Type",
36
+ "value": "application/json"
37
+ },
38
+ {
39
+ "key": "Accept",
40
+ "value": "*/*"
41
+ },
42
+ {
43
+ "key": "Accept-Encoding",
44
+ "value": "application/json"
45
+ }
46
+ ]
47
+ }
48
+ }
@@ -0,0 +1 @@
1
+ "c0158460674afec9376b96adcf53b2a1"
@@ -0,0 +1,19 @@
1
+ {
2
+ "isDraft": false,
3
+ "friendlyName": "Twitter Ads",
4
+ "description": "Twitter Ads and MetaRouter's connection allows marketers to track ad campaign conversions that come from Twitter and occur on a client's website.",
5
+ "logo": "https://cdn.metarouter.io/vendor-assets/twitter-conversions.svg",
6
+ "color": "#1DA1F2",
7
+ "eventSource": {
8
+ "isAndroidApp": false,
9
+ "isIosApp": false,
10
+ "isWebApp": true
11
+ },
12
+ "inputSchema": "analytics_js",
13
+ "releaseNotes": [
14
+ {
15
+ "date": "2022-06-16T00:00:00.000Z",
16
+ "note": "Twitter Ads initial release."
17
+ }
18
+ ]
19
+ }
@@ -0,0 +1 @@
1
+ "81f956214c1610cd42a2417fa0121ecb"
@@ -0,0 +1,261 @@
1
+ {
2
+ "version": "v0.0.1",
3
+ "params": [
4
+ {
5
+ "name": "ACCOUNT_ID",
6
+ "exampleValue": "account-id"
7
+ },
8
+ {
9
+ "name": "PAGE_EVENT_ID",
10
+ "exampleValue": "event-id-for-page-events"
11
+ },
12
+ {
13
+ "name": "PRODUCTS_SEARCHED_EVENT_ID",
14
+ "exampleValue": "event-id-for-products-searched-events"
15
+ },
16
+ {
17
+ "name": "PRODUCT_LIST_VIEWED_EVENT_ID",
18
+ "exampleValue": "event-id-for-product-list-viewed-events"
19
+ },
20
+ {
21
+ "name": "PRODUCT_VIEWED_EVENT_ID",
22
+ "exampleValue": "event-id-for-product-viewed-events"
23
+ },
24
+ {
25
+ "name": "PRODUCT_ADDED_EVENT_ID",
26
+ "exampleValue": "event-id-for-product-added-events"
27
+ },
28
+ {
29
+ "name": "CART_VIEWED_EVENT_ID",
30
+ "exampleValue": "event-id-for-cart-viewed-events"
31
+ },
32
+ {
33
+ "name": "ORDER_COMPLETED_EVENT_ID",
34
+ "exampleValue": "event-id-for-order-completed-events"
35
+ },
36
+ {
37
+ "name": "CATCH_ALL_EVENT_ID",
38
+ "exampleValue": "catch-all-event-id"
39
+ }
40
+ ],
41
+ "global": {
42
+ "filters": [
43
+ {
44
+ "byConditions": {
45
+ "action": "allow",
46
+ "when": {
47
+ "matchesAny": {
48
+ "conditions": [
49
+ {
50
+ "inputPathExists": {
51
+ "inputPath": "context.providers.twitterConversion.twclid"
52
+ }
53
+ },
54
+ {
55
+ "inputPathExists": {
56
+ "inputPath": "context.traits.email"
57
+ }
58
+ }
59
+ ]
60
+ }
61
+ }
62
+ }
63
+ }
64
+ ],
65
+ "enrichments": [
66
+ {
67
+ "staticString": "$$ACCOUNT_ID$$",
68
+ "outputKey": "account_id"
69
+ }
70
+ ],
71
+ "mappings": [
72
+ {
73
+ "inputKey": "timestamp",
74
+ "outputKey": "conversion_time"
75
+ },
76
+ {
77
+ "inputKey": "context.page.url",
78
+ "outputKey": "event_source_url"
79
+ },
80
+ {
81
+ "inputKey": "context.providers.twitterConversion.twclid",
82
+ "outputKey": "twclid"
83
+ },
84
+ {
85
+ "inputKey": "context.traits.email",
86
+ "outputKey": "hashed_email",
87
+ "transforms": [
88
+ {
89
+ "toHash": "sha256"
90
+ }
91
+ ]
92
+ }
93
+ ]
94
+ },
95
+ "eventSpecific": {
96
+ "page": {
97
+ "enrichments": [
98
+ {
99
+ "staticString": "$$PAGE_EVENT_ID$$",
100
+ "outputKey": "event_id"
101
+ }
102
+ ]
103
+ },
104
+ "products_searched": {
105
+ "enrichments": [
106
+ {
107
+ "staticString": "$$PRODUCTS_SEARCHED_EVENT_ID$$",
108
+ "outputKey": "event_id"
109
+ }
110
+ ]
111
+ },
112
+ "product_list_viewed": {
113
+ "enrichments": [
114
+ {
115
+ "staticString": "$$PRODUCT_LIST_VIEWED_EVENT_ID$$",
116
+ "outputKey": "event_id"
117
+ }
118
+ ]
119
+ },
120
+ "product_viewed": {
121
+ "enrichments": [
122
+ {
123
+ "staticString": "$$PRODUCT_VIEWED_EVENT_ID$$",
124
+ "outputKey": "event_id"
125
+ }
126
+ ]
127
+ },
128
+ "product_added": {
129
+ "enrichments": [
130
+ {
131
+ "staticString": "$$PRODUCT_ADDED_EVENT_ID$$",
132
+ "outputKey": "event_id"
133
+ }
134
+ ],
135
+ "mappings": [
136
+ {
137
+ "inputKey": "properties.quantity",
138
+ "outputKey": "number_items"
139
+ },
140
+ {
141
+ "inputKey": "input",
142
+ "outputKey": "value",
143
+ "transforms": [
144
+ {
145
+ "expression": {
146
+ "lang": "lua",
147
+ "body": "return string.format(\"%.2f\", input.properties.price * (input.properties.quantity or 1))"
148
+ }
149
+ }
150
+ ]
151
+ },
152
+ {
153
+ "inputKey": "properties.currency",
154
+ "outputKey": "price_currency",
155
+ "transforms": [
156
+ {
157
+ "modifyString": "uppercase"
158
+ }
159
+ ],
160
+ "defaultString": "USD"
161
+ }
162
+ ]
163
+ },
164
+ "cart_viewed": {
165
+ "enrichments": [
166
+ {
167
+ "staticString": "$$CART_VIEWED_EVENT_ID$$",
168
+ "outputKey": "event_id"
169
+ }
170
+ ],
171
+ "mappings": [
172
+ {
173
+ "inputKey": "input",
174
+ "outputKey": "number_items",
175
+ "transforms": [
176
+ {
177
+ "expression": {
178
+ "lang": "lua",
179
+ "body": "return SUM(MAP(input.properties.products, function (p) return p.quantity or 1 end))"
180
+ }
181
+ }
182
+ ]
183
+ },
184
+ {
185
+ "inputKey": "input",
186
+ "outputKey": "value",
187
+ "transforms": [
188
+ {
189
+ "expression": {
190
+ "lang": "lua",
191
+ "body": "return string.format(\"%.2f\", SUM(MAP(input.properties.products, function (p) return p.price * (p.quantity or 1) end)))"
192
+ }
193
+ }
194
+ ]
195
+ },
196
+ {
197
+ "inputKey": "properties.currency",
198
+ "outputKey": "price_currency",
199
+ "transforms": [
200
+ {
201
+ "modifyString": "uppercase"
202
+ }
203
+ ],
204
+ "defaultString": "USD"
205
+ }
206
+ ]
207
+ },
208
+ "order_completed": {
209
+ "enrichments": [
210
+ {
211
+ "staticString": "$$ORDER_COMPLETED_EVENT_ID$$",
212
+ "outputKey": "event_id"
213
+ }
214
+ ],
215
+ "mappings": [
216
+ {
217
+ "inputKey": "input",
218
+ "outputKey": "number_items",
219
+ "transforms": [
220
+ {
221
+ "expression": {
222
+ "lang": "lua",
223
+ "body": "return SUM(MAP(input.properties.products, function (p) return p.quantity or 1 end))"
224
+ }
225
+ }
226
+ ]
227
+ },
228
+ {
229
+ "inputKey": "input",
230
+ "outputKey": "value",
231
+ "transforms": [
232
+ {
233
+ "expression": {
234
+ "lang": "lua",
235
+ "body": "return string.format(\"%.2f\", input.properties.total)"
236
+ }
237
+ }
238
+ ]
239
+ },
240
+ {
241
+ "inputKey": "properties.currency",
242
+ "outputKey": "price_currency",
243
+ "transforms": [
244
+ {
245
+ "modifyString": "uppercase"
246
+ }
247
+ ],
248
+ "defaultString": "USD"
249
+ }
250
+ ]
251
+ }
252
+ },
253
+ "default": {
254
+ "enrichments": [
255
+ {
256
+ "staticString": "$$CATCH_ALL_EVENT_ID$$",
257
+ "outputKey": "event_id"
258
+ }
259
+ ]
260
+ }
261
+ }
package/index.js CHANGED
@@ -236,6 +236,13 @@ exports.s3 = {
236
236
  metadata: require('./.dist/s3/metadata.json')
237
237
  }
238
238
 
239
+ exports['salesforce-cdp'] = {
240
+ connectionTemplate: connectionSchemas.properties.salesforceCdp,
241
+ endpointSchema: require('./.dist/salesforce-cdp/endpoint_schema.json'),
242
+ playbook: require('./.dist/salesforce-cdp/playbook.json'),
243
+ metadata: require('./.dist/salesforce-cdp/metadata.json')
244
+ }
245
+
239
246
  exports.snapchat = {
240
247
  connectionTemplate: connectionSchemas.properties.snapchat,
241
248
  endpointSchema: require('./.dist/snapchat/endpoint_schema.json'),
@@ -249,6 +256,12 @@ exports.snowflake = {
249
256
  metadata: require('./.dist/snowflake/metadata.json')
250
257
  }
251
258
 
259
+ exports['twitter-conversions'] = {
260
+ connectionTemplate: connectionSchemas.properties.twitterConversions,
261
+ endpointSchema: require('./.dist/twitter-conversions/endpoint_schema.json'),
262
+ playbook: require('./.dist/twitter-conversions/playbook.json'),
263
+ metadata: require('./.dist/twitter-conversions/metadata.json')
264
+ }
252
265
 
253
266
  exports['verizon-media'] = {
254
267
  connectionTemplate: connectionSchemas.properties.verizonMedia,
@@ -432,6 +445,11 @@ exports.etags = {
432
445
  playbook: require('./.dist/s3/playbook.etag.json'),
433
446
  kit: require('./.dist/s3/kit.etag.json')
434
447
  },
448
+ 'salesforce-cdp': {
449
+ endpointSchema: require('./.dist/salesforce-cdp/endpoint_schema.etag.json'),
450
+ playbook: require('./.dist/salesforce-cdp/playbook.etag.json'),
451
+ kit: require('./.dist/salesforce-cdp/kit.etag.json')
452
+ },
435
453
  snapchat: {
436
454
  endpointSchema: require('./.dist/snapchat/endpoint_schema.etag.json'),
437
455
  playbook: require('./.dist/snapchat/playbook.etag.json'),
@@ -441,6 +459,11 @@ exports.etags = {
441
459
  playbook: require('./.dist/snowflake/playbook.etag.json'),
442
460
  kit: require('./.dist/snowflake/kit.etag.json')
443
461
  },
462
+ 'twitter-conversions': {
463
+ endpointSchema: require('./.dist/twitter-conversions/endpoint_schema.etag.json'),
464
+ playbook: require('./.dist/twitter-conversions/playbook.etag.json'),
465
+ kit: require('./.dist/twitter-conversions/kit.etag.json')
466
+ },
444
467
  'verizon-media': {
445
468
  endpointSchema: require('./.dist/verizon-media/endpoint_schema.etag.json'),
446
469
  playbook: require('./.dist/verizon-media/playbook.etag.json'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metarouter/ajs-starter-kit",
3
- "version": "1.0.37",
3
+ "version": "1.0.40",
4
4
  "description": "MetaRouter analytics.js starter kit",
5
5
  "main": "index.js",
6
6
  "scripts": {