@metarouter/ajs-starter-kit 1.0.76 → 1.0.77

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
- "eb4c895034cb47ad096a947b459f9ec0"
1
+ "ce536a6703ee0c1fb97f8eb001693ebf"
@@ -18,7 +18,7 @@
18
18
  "password": "$$PASSWORD$$",
19
19
  "username": "$$USERNAME$$"
20
20
  },
21
- "endpoint": "https://push.actioniq.com/v1/streams/$$ENDPOINT_IDENTIFIER$$_track",
21
+ "endpoint": "https://push.actioniq.com/v2/streams/$$ENDPOINT_IDENTIFIER$$_track",
22
22
  "headers": [
23
23
  {
24
24
  "key": "Content-Type",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "eventSpecific": {
36
36
  "identify": {
37
- "endpoint": "https://push.actioniq.com/v1/streams/$$ENDPOINT_IDENTIFIER$$_identify",
37
+ "endpoint": "https://push.actioniq.com/v2/streams/$$ENDPOINT_IDENTIFIER$$_identify",
38
38
  "basicAuth": {
39
39
  "password": "$$PASSWORD$$",
40
40
  "username": "$$USERNAME$$"
@@ -53,7 +53,7 @@
53
53
  }
54
54
  },
55
55
  "page": {
56
- "endpoint": "https://push.actioniq.com/v1/streams/$$ENDPOINT_IDENTIFIER$$_page",
56
+ "endpoint": "https://push.actioniq.com/v2/streams/$$ENDPOINT_IDENTIFIER$$_page",
57
57
  "basicAuth": {
58
58
  "password": "$$PASSWORD$$",
59
59
  "username": "$$USERNAME$$"
@@ -1 +1 @@
1
- "17ec96be19e77128c237548aa219cc53"
1
+ "703e59e95bed736d98a46275bbfae523"
@@ -1 +1 @@
1
- "70f0c0318da9112cfbf9c40ace582ee6"
1
+ "266edea268952cbd0bb1f65e536a8b25"
@@ -1 +1 @@
1
- "9995f07e9469faf62f709a50b60ced96"
1
+ "67602e875ed17a63aadf78daa5490ac3"
@@ -238,7 +238,7 @@
238
238
  "product_list_viewed": {
239
239
  "enrichments": [
240
240
  {
241
- "staticString": "product_list_viewed",
241
+ "staticString": "Product List Viewed",
242
242
  "outputKey": "event_type"
243
243
  }
244
244
  ],
@@ -339,7 +339,7 @@
339
339
  "product_viewed": {
340
340
  "enrichments": [
341
341
  {
342
- "staticString": "product_viewed",
342
+ "staticString": "Product Viewed",
343
343
  "outputKey": "event_type"
344
344
  }
345
345
  ],
@@ -452,7 +452,7 @@
452
452
  "product_added": {
453
453
  "enrichments": [
454
454
  {
455
- "staticString": "product_added",
455
+ "staticString": "Product Added",
456
456
  "outputKey": "event_type"
457
457
  }
458
458
  ],
@@ -569,7 +569,7 @@
569
569
  "cart_viewed": {
570
570
  "enrichments": [
571
571
  {
572
- "staticString": "cart_viewed",
572
+ "staticString": "Cart Viewed",
573
573
  "outputKey": "event_type"
574
574
  }
575
575
  ],
@@ -666,7 +666,7 @@
666
666
  "order_completed": {
667
667
  "enrichments": [
668
668
  {
669
- "staticString": "order_completed",
669
+ "staticString": "Order Completed",
670
670
  "outputKey": "event_type"
671
671
  }
672
672
  ],
@@ -1 +1 @@
1
- "b56c2663a25f8e97a22fa36df2f14a0c"
1
+ "6e9fc1f3596b2f65722e9de689815b55"
@@ -1 +1 @@
1
- "7e25c96b1194971f91f413880709d94e"
1
+ "56835270dea13c699f1795ed83f4d863"
@@ -1 +1 @@
1
- "f150cdd49747c4ec593ceac3fd1a36df"
1
+ "049bb35264639af0fca9e3b210b09537"
@@ -32,7 +32,7 @@
32
32
  {
33
33
  "expression": {
34
34
  "lang": "lua",
35
- "body": "\n-- variables needed from input schema --\nevent = LOWER(input.event)\nevent_type = LOWER(input.type)\npage_title = LOWER(input.context.page.title)\ntimestamp = input.originalTimestamp\nproducts = input.properties.products\ntotal = input.properties.total\nsingle_product_name = LOWER(input.properties.name)\nsingle_product_sku = LOWER(input.properties.sku)\n-- END --\n\nif event == null\nthen\n segment_name = \"page view | \" .. event_type .. \" | \" .. page_title\n return {{\n Name = segment_name,\n TTLInMinutes = TO_ROUNDED_INT($$TTL_IN_MINUTES$$),\n TimestampUtc = timestamp\n }}\nelse\n segment_name = event\n if products == null\n then\n\n if event == \"product_added\" or segment_name == \"product_viewed\"\n then\n segment_name = event .. \" | \" .. single_product_name .. \" | \" .. single_product_sku\n end\n return {{\n Name = segment_name,\n TTLInMinutes = TO_ROUNDED_INT($$TTL_IN_MINUTES$$),\n TimestampUtc = timestamp\n }}\n\n else\n p = {}\n p = MAP(products, function(p)\n return {\n Name = LOWER(event .. \" | \" .. p.name .. \" | \" .. p.sku),\n TTLInMinutes = TO_ROUNDED_INT($$TTL_IN_MINUTES$$),\n TimestampUtc = timestamp\n }\n end\n )\n if total ~= null\n then\n\n -- function --\n function totalRounded(total, divisible)\n total = math.floor(total)\n if total <= 0\n then\n return \"= 0\"\n end\n total = math.floor((total + divisible) / divisible) * divisible\n return \"< \" .. total\n end\n -- END --\n\n table.insert(p, {\n Name = \"order total \" .. totalRounded(tonumber(total), 100),\n TTLInMinutes = TO_ROUNDED_INT($$TTL_IN_MINUTES$$),\n TimestampUtc = timestamp,\n })\n end\n return p\n end\nend"
35
+ "body": "\n-- variables needed from input schema --\nevent = LOWER(input.event)\nevent_type = LOWER(input.type)\npage_title = LOWER(input.context.page.title)\ntimestamp = input.originalTimestamp\nproducts = input.properties.products\ntotal = input.properties.total\nsingle_product_name = LOWER(input.properties.name)\nsingle_product_sku = LOWER(input.properties.sku)\n-- END --\n\nif event == null\nthen\n segment_name = \"page view | \" .. event_type .. \" | \" .. page_title\n return {{\n Name = segment_name,\n TTLInMinutes = TO_ROUNDED_INT($$TTL_IN_MINUTES$$),\n TimestampUtc = timestamp\n }}\nelse\n segment_name = event\n if products == null\n then\n\n if event == \"product added\" or segment_name == \"product viewed\"\n then\n segment_name = event .. \" | \" .. single_product_name .. \" | \" .. single_product_sku\n end\n return {{\n Name = segment_name,\n TTLInMinutes = TO_ROUNDED_INT($$TTL_IN_MINUTES$$),\n TimestampUtc = timestamp\n }}\n\n else\n p = {}\n p = MAP(products, function(p)\n return {\n Name = LOWER(event .. \" | \" .. p.name .. \" | \" .. p.sku),\n TTLInMinutes = TO_ROUNDED_INT($$TTL_IN_MINUTES$$),\n TimestampUtc = timestamp\n }\n end\n )\n if total ~= null\n then\n\n -- function --\n function totalRounded(total, divisible)\n total = math.floor(total)\n if total <= 0\n then\n return \"= 0\"\n end\n total = math.floor((total + divisible) / divisible) * divisible\n return \"< \" .. total\n end\n -- END --\n\n table.insert(p, {\n Name = \"order total \" .. totalRounded(tonumber(total), 100),\n TTLInMinutes = TO_ROUNDED_INT($$TTL_IN_MINUTES$$),\n TimestampUtc = timestamp,\n })\n end\n return p\n end\nend"
36
36
  }
37
37
  }
38
38
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metarouter/ajs-starter-kit",
3
- "version": "1.0.76",
3
+ "version": "1.0.77",
4
4
  "description": "MetaRouter analytics.js starter kit",
5
5
  "main": "index.js",
6
6
  "scripts": {