@metarouter/ajs-starter-kit 1.0.117 → 1.0.119

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
- "9c76a2415b6ffe38b747ebde78268ff1"
1
+ "793ff19fbebbe9b152fc8ab7184582ce"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "isDraft": false,
3
3
  "isDeprecated": false,
4
- "isBeta": true,
4
+ "isBeta": false,
5
5
  "friendlyName": "Blueshift",
6
6
  "description": "From unified data to intelligent decisioning, Blueshift’s SmartHub CDP provides all the tools\nto deliver the omnichannel experience your customers expect.",
7
7
  "logo": "https://cdn.metarouter.io/logo.svg",
@@ -52,6 +52,10 @@
52
52
  {
53
53
  "date": "2025-01-15T00:00:00.000Z",
54
54
  "note": "Version: 0.5.0\nAdded global enrichment for partner field."
55
+ },
56
+ {
57
+ "date": "2025-01-22T00:00:00.000Z",
58
+ "note": "Version: 1.0.0\nStable release"
55
59
  }
56
60
  ]
57
61
  }
@@ -1 +1 @@
1
- "26a8b0365a6a26820e9295fbd49c1043"
1
+ "f8d56376a9de75b065e3b7731d685445"
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.5.0",
2
+ "version": "1.0.0",
3
3
  "global": {
4
4
  "enrichments": [
5
5
  {
@@ -116,11 +116,20 @@
116
116
  "dataset": {
117
117
  "type": "string"
118
118
  },
119
+ "defaultTableOverride": {
120
+ "type": "string"
121
+ },
119
122
  "projectId": {
120
123
  "type": "string"
121
124
  },
122
125
  "region": {
123
126
  "type": "string"
127
+ },
128
+ "tableOverrides": {
129
+ "type": "object",
130
+ "additionalProperties": {
131
+ "type": "string"
132
+ }
124
133
  }
125
134
  },
126
135
  "required": [
@@ -1 +1 @@
1
- "4a403d37d082fdcabaf3cccd48203c70"
1
+ "5ebffd12d5b38bbd159a889836503c13"
@@ -3,6 +3,17 @@
3
3
  "credentials": "my-credentials",
4
4
  "dataset": "my-dataset",
5
5
  "project_id": "my-project-id",
6
- "region": "my-region"
6
+ "region": "my-region",
7
+ "defaultTableOverride": "my-default-table-override",
8
+ "tableOverrides": {
9
+ "identify": "identify",
10
+ "page": "page",
11
+ "products_searched": "products_searched",
12
+ "product_list_viewed": "product_list_viewed",
13
+ "product_viewed": "product_viewed",
14
+ "product_added": "product_added",
15
+ "cart_viewed": "cart_viewed",
16
+ "order_completed": "order_completed"
17
+ }
7
18
  }
8
19
  }
@@ -1 +1 @@
1
- "5ac3f228d5a84e64c7681d3c519e9d71"
1
+ "7819ac44a9d64153d0fd61a2c915b561"
@@ -32,6 +32,10 @@
32
32
  {
33
33
  "date": "2024-08-21T00:00:00.000Z",
34
34
  "note": "Version: 1.0.0\nAdding option to set datase creation mode to BIG_QUERY_OPTIONS_DISABLE_DATASET_CREATION\nThis will allow users to create save events without having the bigquery.datasets.create permission in their IAM role"
35
+ },
36
+ {
37
+ "date": "2025-01-16T00:00:00.000Z",
38
+ "note": "Version: 1.1.0\nAdding support for table overrides"
35
39
  }
36
40
  ]
37
41
  }
@@ -1 +1 @@
1
- "bdb3427237ab8b3dead809d79dee7325"
1
+ "b9a666c0d9eebe09a7266fa90a6213a6"
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.0",
2
+ "version": "1.1.0",
3
3
  "global": {
4
4
  "mappings": [
5
5
  {
@@ -0,0 +1 @@
1
+ "34d9a2fcc47ca80348b70c8d7bbd0589"
@@ -0,0 +1,12 @@
1
+ {
2
+ "default": {
3
+ "endpoint": "https://g.msn.com/uets2s/0",
4
+ "method": "GET",
5
+ "headers": [
6
+ {
7
+ "key": "User-Agent",
8
+ "fromEventKey": "context.userAgent"
9
+ }
10
+ ]
11
+ }
12
+ }
@@ -0,0 +1 @@
1
+ "70505b8496f26ec95396135072da16f0"
@@ -0,0 +1,21 @@
1
+ {
2
+ "isDraft": false,
3
+ "isDeprecated": false,
4
+ "isBeta": true,
5
+ "friendlyName": "Microsoft Ads",
6
+ "description": "Microsoft Ads is a digital advertising platform that allows businesses to create and manage paid search and display ad campaigns across Microsoft's network, including Bing, MSN, and other partner sites.",
7
+ "logo": "https://cdn.metarouter.io/microsoft-ads.png",
8
+ "color": "#0078D4",
9
+ "eventSource": {
10
+ "isAndroidApp": false,
11
+ "isIosApp": false,
12
+ "isWebApp": true
13
+ },
14
+ "inputSchema": "analytics_js",
15
+ "releaseNotes": [
16
+ {
17
+ "date": "2025-01-22T22:00:00.000Z",
18
+ "note": "Version: 0.1.0\nBeta Version\nMicrosoft Ads initial release"
19
+ }
20
+ ]
21
+ }
@@ -0,0 +1 @@
1
+ "bb2eaa8e02d3efe77d0a35026a287924"
@@ -0,0 +1,449 @@
1
+ {
2
+ "version": "0.1.0",
3
+ "params": [
4
+ {
5
+ "name": "UET_TAG_ID",
6
+ "exampleValue": "my-uet-tag-id"
7
+ }
8
+ ],
9
+ "global": {
10
+ "enrichments": [
11
+ {
12
+ "staticString": "$$UET_TAG_ID$$",
13
+ "outputKey": "ti"
14
+ },
15
+ {
16
+ "staticString": "2.2",
17
+ "outputKey": "ver"
18
+ }
19
+ ],
20
+ "mappings": [
21
+ {
22
+ "inputKey": "context.providers.microsoftAds.mid",
23
+ "outputKey": "mid"
24
+ },
25
+ {
26
+ "inputKey": "context.providers.microsoftAds.msclkid",
27
+ "outputKey": "msclkid"
28
+ },
29
+ {
30
+ "inputKey": "anonymousId",
31
+ "outputKey": "vid"
32
+ },
33
+ {
34
+ "inputKey": "input",
35
+ "outputKey": "uid",
36
+ "transforms": [
37
+ {
38
+ "expression": {
39
+ "lang": "lua",
40
+ "body": "if input.userId and input.userId ~= '' then return TO_MD5_HASH(LOWER(TRIM(input.userId))) end"
41
+ }
42
+ }
43
+ ]
44
+ },
45
+ {
46
+ "inputKey": "context.ip",
47
+ "outputKey": "ip"
48
+ },
49
+ {
50
+ "inputKey": "context.userAgent",
51
+ "outputKey": "ua"
52
+ },
53
+ {
54
+ "inputKey": "input",
55
+ "outputKey": "ts",
56
+ "transforms": [
57
+ {
58
+ "expression": {
59
+ "lang": "lua",
60
+ "body": "return SECONDS_SINCE_EPOCH_FROM_RFC3999(input.timestamp or input.originalTimestamp or input.sentAt)"
61
+ }
62
+ }
63
+ ]
64
+ },
65
+ {
66
+ "inputKey": "input",
67
+ "outputKey": "pid",
68
+ "transforms": [
69
+ {
70
+ "expression": {
71
+ "lang": "lua",
72
+ "body": "local pid = {}\nid = 1\nlocal email = input.traits.email or input.context.traits.email\nemail = LOWER(TRIM(email))\nif email then\n if (string.find(email, '@') ~= nil) then\n email = SPLIT(email, '@', 2)\n if string.sub(email[1], -6) == '+alias' then email[1] = REPLACE(email[1], '+alias', '') end\n pid[id] = 'em=' .. TO_SHA256_HASH(REPLACE(email[1], '.', '') .. '@' .. email[2])\n else\n pid[id] = 'em=' .. TO_SHA256_HASH(email)\n end\n id = id + 1\nend\nlocal phone = input.traits.phone or input.context.traits.phone\nif phone then\n pid[id] = 'ph=' .. TO_SHA256_HASH(LOWER(TRIM(phone)))\nend\nif (#pid > 0) then return JOIN(pid, '&') end"
73
+ }
74
+ }
75
+ ]
76
+ },
77
+ {
78
+ "inputKey": "input",
79
+ "outputKey": "el",
80
+ "transforms": [
81
+ {
82
+ "expression": {
83
+ "lang": "lua",
84
+ "body": "if input.type == 'track' then return input.event end"
85
+ }
86
+ }
87
+ ]
88
+ }
89
+ ]
90
+ },
91
+ "eventSpecific": {
92
+ "page": {
93
+ "enrichments": [
94
+ {
95
+ "staticString": "pageLoad",
96
+ "outputKey": "evt"
97
+ }
98
+ ],
99
+ "mappings": [
100
+ {
101
+ "inputKey": "context.page.url",
102
+ "outputKey": "p"
103
+ },
104
+ {
105
+ "inputKey": "context.page.referrer",
106
+ "outputKey": "r"
107
+ },
108
+ {
109
+ "inputKey": "context.page.title",
110
+ "outputKey": "tl"
111
+ }
112
+ ]
113
+ },
114
+ "products_searched": {
115
+ "enrichments": [
116
+ {
117
+ "staticString": "custom",
118
+ "outputKey": "evt"
119
+ },
120
+ {
121
+ "staticString": "view_search_results",
122
+ "outputKey": "ea"
123
+ },
124
+ {
125
+ "staticString": "searchresults",
126
+ "outputKey": "pagetype"
127
+ }
128
+ ],
129
+ "mappings": [
130
+ {
131
+ "inputKey": "properties.query",
132
+ "outputKey": "search_term"
133
+ }
134
+ ]
135
+ },
136
+ "product_list_viewed": {
137
+ "enrichments": [
138
+ {
139
+ "staticString": "custom",
140
+ "outputKey": "evt"
141
+ },
142
+ {
143
+ "staticString": "view_item_list",
144
+ "outputKey": "ea"
145
+ },
146
+ {
147
+ "staticString": "category",
148
+ "outputKey": "pageType"
149
+ }
150
+ ],
151
+ "mappings": [
152
+ {
153
+ "inputKey": "properties.list_id",
154
+ "outputKey": "ecomm_category"
155
+ },
156
+ {
157
+ "inputKey": "input",
158
+ "outputKey": "prodid",
159
+ "transforms": [
160
+ {
161
+ "expression": {
162
+ "lang": "lua",
163
+ "body": "return JOIN(PLUCK(input.properties.products, 'product_id') or {}, ',')"
164
+ }
165
+ }
166
+ ]
167
+ },
168
+ {
169
+ "inputKey": "input",
170
+ "outputKey": "items",
171
+ "transforms": [
172
+ {
173
+ "expression": {
174
+ "lang": "lua",
175
+ "body": "local items = MAP(\n input.properties.products,\n function (p)\n return JOIN(\n {\n 'id=' .. (p.product_id or p.sku or ''),\n 'name=' .. (p.name or ''),\n 'price=' .. (p.price or ''),\n 'quantity=' .. (p.quantity or 1)\n },\n '&'\n )\n end\n)\nreturn JOIN(items, ',')"
176
+ }
177
+ }
178
+ ]
179
+ }
180
+ ]
181
+ },
182
+ "product_viewed": {
183
+ "enrichments": [
184
+ {
185
+ "staticString": "custom",
186
+ "outputKey": "evt"
187
+ },
188
+ {
189
+ "staticString": "view_item",
190
+ "outputKey": "ea"
191
+ },
192
+ {
193
+ "staticString": "product",
194
+ "outputKey": "pageType"
195
+ }
196
+ ],
197
+ "mappings": [
198
+ {
199
+ "inputKey": "properties.product_id",
200
+ "outputKey": "prodid"
201
+ },
202
+ {
203
+ "inputKey": "input",
204
+ "outputKey": "items",
205
+ "transforms": [
206
+ {
207
+ "expression": {
208
+ "lang": "lua",
209
+ "body": "return JOIN(\n {\n 'id=' .. (input.properties.product_id or input.properties.sku or ''),\n 'name=' .. (input.properties.name or ''),\n 'price=' .. (input.properties.price or ''),\n 'quantity=' .. (input.properties.quantity or 1)\n },\n '&'\n)"
210
+ }
211
+ }
212
+ ]
213
+ }
214
+ ]
215
+ },
216
+ "product_added": {
217
+ "enrichments": [
218
+ {
219
+ "staticString": "custom",
220
+ "outputKey": "evt"
221
+ },
222
+ {
223
+ "staticString": "add_to_cart",
224
+ "outputKey": "ea"
225
+ },
226
+ {
227
+ "staticString": "product",
228
+ "outputKey": "pageType"
229
+ }
230
+ ],
231
+ "mappings": [
232
+ {
233
+ "inputKey": "properties.product_id",
234
+ "outputKey": "prodid"
235
+ },
236
+ {
237
+ "inputKey": "input",
238
+ "outputKey": "items",
239
+ "transforms": [
240
+ {
241
+ "expression": {
242
+ "lang": "lua",
243
+ "body": "return JOIN(\n {\n 'id=' .. (input.properties.product_id or input.properties.sku or ''),\n 'name=' .. (input.properties.name or ''),\n 'price=' .. (input.properties.price or ''),\n 'quantity=' .. (input.properties.quantity or 1)\n },\n '&'\n)"
244
+ }
245
+ }
246
+ ]
247
+ },
248
+ {
249
+ "inputKey": "input",
250
+ "outputKey": "ecomm_totalvalue",
251
+ "transforms": [
252
+ {
253
+ "expression": {
254
+ "lang": "lua",
255
+ "body": "return input.properties.price * (input.properties.quantity or 1)"
256
+ }
257
+ }
258
+ ]
259
+ },
260
+ {
261
+ "inputKey": "input",
262
+ "outputKey": "gv",
263
+ "transforms": [
264
+ {
265
+ "expression": {
266
+ "lang": "lua",
267
+ "body": "return input.properties.price * (input.properties.quantity or 1)"
268
+ }
269
+ }
270
+ ]
271
+ },
272
+ {
273
+ "inputKey": "properties.currency",
274
+ "outputKey": "gc",
275
+ "transforms": [
276
+ {
277
+ "modifyString": "uppercase"
278
+ }
279
+ ],
280
+ "defaultString": "USD"
281
+ }
282
+ ]
283
+ },
284
+ "cart_viewed": {
285
+ "enrichments": [
286
+ {
287
+ "staticString": "custom",
288
+ "outputKey": "evt"
289
+ },
290
+ {
291
+ "staticString": "cart",
292
+ "outputKey": "pageType"
293
+ }
294
+ ],
295
+ "mappings": [
296
+ {
297
+ "inputKey": "input",
298
+ "outputKey": "prodid",
299
+ "transforms": [
300
+ {
301
+ "expression": {
302
+ "lang": "lua",
303
+ "body": "return JOIN(PLUCK(input.properties.products, 'product_id') or {}, ',' )"
304
+ }
305
+ }
306
+ ]
307
+ },
308
+ {
309
+ "inputKey": "input",
310
+ "outputKey": "items",
311
+ "transforms": [
312
+ {
313
+ "expression": {
314
+ "lang": "lua",
315
+ "body": "local items = MAP(\n input.properties.products,\n function (p)\n return JOIN(\n {\n 'id=' .. (p.product_id or p.sku or ''),\n 'name=' .. (p.name or ''),\n 'price=' .. (p.price or ''),\n 'quantity=' .. (p.quantity or 1)\n },\n '&'\n )\n end\n)\nreturn JOIN(items, ',')"
316
+ }
317
+ }
318
+ ]
319
+ },
320
+ {
321
+ "inputKey": "input",
322
+ "outputKey": "ecomm_totalvalue",
323
+ "transforms": [
324
+ {
325
+ "expression": {
326
+ "lang": "lua",
327
+ "body": "return SUM(MAP(input.properties.products, function (p) return p.price * (p.quantity or 1) end))"
328
+ }
329
+ }
330
+ ]
331
+ },
332
+ {
333
+ "inputKey": "input",
334
+ "outputKey": "gv",
335
+ "transforms": [
336
+ {
337
+ "expression": {
338
+ "lang": "lua",
339
+ "body": "return SUM(MAP(input.properties.products, function (p) return p.price * (p.quantity or 1) end))"
340
+ }
341
+ }
342
+ ]
343
+ },
344
+ {
345
+ "inputKey": "properties.currency",
346
+ "outputKey": "gc",
347
+ "transforms": [
348
+ {
349
+ "modifyString": "uppercase"
350
+ }
351
+ ],
352
+ "defaultString": "USD"
353
+ }
354
+ ]
355
+ },
356
+ "order_completed": {
357
+ "enrichments": [
358
+ {
359
+ "staticString": "custom",
360
+ "outputKey": "evt"
361
+ },
362
+ {
363
+ "staticString": "purchase",
364
+ "outputKey": "ea"
365
+ },
366
+ {
367
+ "staticString": "purchase",
368
+ "outputKey": "pageType"
369
+ }
370
+ ],
371
+ "mappings": [
372
+ {
373
+ "inputKey": "properties.order_id",
374
+ "outputKey": "transaction_id"
375
+ },
376
+ {
377
+ "inputKey": "input",
378
+ "outputKey": "prodid",
379
+ "transforms": [
380
+ {
381
+ "expression": {
382
+ "lang": "lua",
383
+ "body": "return JOIN(PLUCK(input.properties.products, 'product_id') or {}, ',')"
384
+ }
385
+ }
386
+ ]
387
+ },
388
+ {
389
+ "inputKey": "input",
390
+ "outputKey": "items",
391
+ "transforms": [
392
+ {
393
+ "expression": {
394
+ "lang": "lua",
395
+ "body": "local items = MAP(\n input.properties.products,\n function (p)\n return JOIN(\n {\n 'id=' .. (p.product_id or p.sku or ''),\n 'name=' .. (p.name or ''),\n 'price=' .. (p.price or ''),\n 'quantity=' .. (p.quantity or 1)\n },\n '&'\n )\n end\n)\nreturn JOIN(items, ',')"
396
+ }
397
+ }
398
+ ]
399
+ },
400
+ {
401
+ "inputKey": "input",
402
+ "outputKey": "ecomm_totalvalue",
403
+ "transforms": [
404
+ {
405
+ "expression": {
406
+ "lang": "lua",
407
+ "body": "return SUM(MAP(input.properties.products, function (p) return p.price * (p.quantity or 1) end))"
408
+ }
409
+ }
410
+ ]
411
+ },
412
+ {
413
+ "inputKey": "input",
414
+ "outputKey": "gv",
415
+ "transforms": [
416
+ {
417
+ "expression": {
418
+ "lang": "lua",
419
+ "body": "return SUM(MAP(input.properties.products, function (p) return p.price * (p.quantity or 1) end))"
420
+ }
421
+ }
422
+ ]
423
+ },
424
+ {
425
+ "inputKey": "properties.currency",
426
+ "outputKey": "gc",
427
+ "transforms": [
428
+ {
429
+ "modifyString": "uppercase"
430
+ }
431
+ ],
432
+ "defaultString": "USD"
433
+ }
434
+ ]
435
+ }
436
+ },
437
+ "default": {
438
+ "filters": [
439
+ {
440
+ "byEventNames": {
441
+ "action": "allow",
442
+ "events": [
443
+ ""
444
+ ]
445
+ }
446
+ }
447
+ ]
448
+ }
449
+ }
package/README.md CHANGED
@@ -7,7 +7,9 @@ users visit, the actions they take on your property, and whether the user has be
7
7
  previously.
8
8
  ## 2025-01
9
9
  - AWIN (BETA)
10
- - Blueshift (BETA)
10
+ - Blueshift
11
+ - Google BigQuery
12
+ - Microsoft Ads (BETA)
11
13
  - Moloco Commerce Media (BETA)
12
14
 
13
15
  ## 2024-12
@@ -76,7 +78,6 @@ previously.
76
78
 
77
79
  ## 2024-08
78
80
  - Webhooks
79
- - Google BigQuery
80
81
  - Nextdoor
81
82
 
82
83
  ## 2024-06
@@ -104,7 +105,9 @@ previously.
104
105
  | Kit Name | Date | Latest Note |
105
106
  |----------|------|-------------|
106
107
  | AWIN (BETA) | 2025-01 | Version: 0.2.0 Handle voucher code Format order reference Add SKU fallback |
107
- | Blueshift (BETA) | 2025-01 | Version: 0.5.0 Added global enrichment for partner field. |
108
+ | Blueshift | 2025-01 | Version: 1.0.0 Stable release |
109
+ | Google BigQuery | 2025-01 | Version: 1.1.0 Adding support for table overrides |
110
+ | Microsoft Ads (BETA) | 2025-01 | Version: 0.1.0 Beta Version Microsoft Ads initial release |
108
111
  | Moloco Commerce Media (BETA) | 2025-01 | Version: 0.4.0 Updated friendlyName Updated kit name |
109
112
  | Google Analytics 4 (Collect) (BETA) | 2024-12 | Version: 0.4.0 Added user property expression for anonymousId. |
110
113
  | RTB House (BETA) | 2024-12 | Version: 0.2.1 Updated Endpoint URL Added new fields for all events: page URL (`su`) and page referrer (`sr`) Added new events: identify, page, products_searched, product_list_viewed, product_viewed, product_added, product_added_to_wishlist, cart_viewed, checkout_started |
@@ -163,7 +166,6 @@ previously.
163
166
  | CM360 - Floodlights (BETA) | 2024-09 | Version 0.4.0 Friendly name renaming Description and color updated |
164
167
  | X Ads - Web Conversions | 2024-09 | Version: 1.0.0 Stable release |
165
168
  | Webhooks | 2024-08 | Version: 1.0.0 Stable release |
166
- | 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 |
167
169
  | Nextdoor | 2024-08 | Version: 1.0.0 Stable release |
168
170
  | Google AJSID Segments (BETA) | 2024-06 | Renaming to Google AJSID Segments |
169
171
  | Azure Blob | 2024-04 | Added SAS Token |
package/index.js CHANGED
@@ -285,6 +285,12 @@ exports['media-math'] = {
285
285
  metadata: require('./.dist/media-math/metadata.json')
286
286
  }
287
287
 
288
+ exports['microsoft-ads'] = {
289
+ endpointSchema: require('./.dist/microsoft-ads/connection.json'),
290
+ playbook: require('./.dist/microsoft-ads/playbook.json'),
291
+ metadata: require('./.dist/microsoft-ads/metadata.json')
292
+ }
293
+
288
294
  exports.merkle = {
289
295
  endpointSchema: require('./.dist/merkle/connection.json'),
290
296
  playbook: require('./.dist/merkle/playbook.json'),
@@ -703,6 +709,11 @@ exports.etags = {
703
709
  playbook: require('./.dist/merkle/playbook.etag.json'),
704
710
  kit: require('./.dist/merkle/kit.etag.json')
705
711
  },
712
+ 'microsoft-ads': {
713
+ endpointSchema: require('./.dist/microsoft-ads/connection.etag.json'),
714
+ playbook: require('./.dist/microsoft-ads/playbook.etag.json'),
715
+ kit: require('./.dist/microsoft-ads/kit.etag.json')
716
+ },
706
717
  'miq-xandr': {
707
718
  endpointSchema: require('./.dist/miq-xandr/connection.etag.json'),
708
719
  playbook: require('./.dist/miq-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.117",
3
+ "version": "1.0.119",
4
4
  "description": "MetaRouter analytics.js starter kit",
5
5
  "main": "index.js",
6
6
  "scripts": {