@metarouter/ajs-starter-kit 1.0.27 → 1.0.32

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.
Files changed (95) hide show
  1. package/.dist/actioniq/endpoint_schema.etag.json +1 -1
  2. package/.dist/actioniq/endpoint_schema.json +22 -6
  3. package/.dist/actioniq/kit.etag.json +1 -1
  4. package/.dist/actioniq/metadata.json +4 -0
  5. package/.dist/actioniq/playbook.etag.json +1 -1
  6. package/.dist/actioniq/playbook.json +13 -1
  7. package/.dist/acuity-ads/endpoint_schema.etag.json +1 -1
  8. package/.dist/acuity-ads/endpoint_schema.json +1 -2
  9. package/.dist/acuity-ads/kit.etag.json +1 -1
  10. package/.dist/adobe/endpoint_schema.etag.json +1 -1
  11. package/.dist/adobe/endpoint_schema.json +1 -2
  12. package/.dist/adobe/kit.etag.json +1 -1
  13. package/.dist/amnet/endpoint_schema.etag.json +1 -1
  14. package/.dist/amnet/endpoint_schema.json +1 -2
  15. package/.dist/amnet/kit.etag.json +1 -1
  16. package/.dist/amobee/endpoint_schema.etag.json +1 -1
  17. package/.dist/amobee/endpoint_schema.json +1 -2
  18. package/.dist/amobee/kit.etag.json +1 -1
  19. package/.dist/amplitude/endpoint_schema.etag.json +1 -1
  20. package/.dist/amplitude/endpoint_schema.json +1 -3
  21. package/.dist/amplitude/kit.etag.json +1 -1
  22. package/.dist/amplitude/metadata.json +4 -0
  23. package/.dist/amplitude/playbook.etag.json +1 -1
  24. package/.dist/amplitude/playbook.json +24 -25
  25. package/.dist/apps-flyer-android/endpoint_schema.etag.json +1 -1
  26. package/.dist/apps-flyer-android/endpoint_schema.json +0 -1
  27. package/.dist/apps-flyer-android/kit.etag.json +1 -1
  28. package/.dist/apps-flyer-ios/endpoint_schema.etag.json +1 -1
  29. package/.dist/apps-flyer-ios/endpoint_schema.json +0 -1
  30. package/.dist/apps-flyer-ios/kit.etag.json +1 -1
  31. package/.dist/bing-ads/endpoint_schema.etag.json +1 -1
  32. package/.dist/bing-ads/endpoint_schema.json +1 -2
  33. package/.dist/bing-ads/kit.etag.json +1 -1
  34. package/.dist/blueshift/endpoint_schema.etag.json +1 -1
  35. package/.dist/blueshift/endpoint_schema.json +1 -2
  36. package/.dist/blueshift/kit.etag.json +1 -1
  37. package/.dist/braze/endpoint_schema.etag.json +1 -1
  38. package/.dist/braze/endpoint_schema.json +2 -4
  39. package/.dist/braze/kit.etag.json +1 -1
  40. package/.dist/criteo/endpoint_schema.etag.json +1 -1
  41. package/.dist/criteo/endpoint_schema.json +1 -2
  42. package/.dist/criteo/kit.etag.json +1 -1
  43. package/.dist/facebook-pixel/endpoint_schema.etag.json +1 -1
  44. package/.dist/facebook-pixel/endpoint_schema.json +1 -2
  45. package/.dist/facebook-pixel/kit.etag.json +1 -1
  46. package/.dist/google-ad-words/endpoint_schema.etag.json +1 -1
  47. package/.dist/google-ad-words/endpoint_schema.json +1 -2
  48. package/.dist/google-ad-words/kit.etag.json +1 -1
  49. package/.dist/google-analytics/endpoint_schema.etag.json +1 -1
  50. package/.dist/google-analytics/endpoint_schema.json +1 -2
  51. package/.dist/google-analytics/kit.etag.json +1 -1
  52. package/.dist/google-double-click/endpoint_schema.etag.json +1 -1
  53. package/.dist/google-double-click/endpoint_schema.json +1 -2
  54. package/.dist/google-double-click/kit.etag.json +1 -1
  55. package/.dist/impact-radius/endpoint_schema.etag.json +1 -1
  56. package/.dist/impact-radius/endpoint_schema.json +2 -4
  57. package/.dist/impact-radius/kit.etag.json +1 -1
  58. package/.dist/in-market/endpoint_schema.etag.json +1 -1
  59. package/.dist/in-market/endpoint_schema.json +0 -1
  60. package/.dist/in-market/kit.etag.json +1 -1
  61. package/.dist/lytics/endpoint_schema.etag.json +1 -1
  62. package/.dist/lytics/endpoint_schema.json +1 -2
  63. package/.dist/lytics/kit.etag.json +1 -1
  64. package/.dist/media-math/endpoint_schema.etag.json +1 -1
  65. package/.dist/media-math/endpoint_schema.json +1 -2
  66. package/.dist/media-math/kit.etag.json +1 -1
  67. package/.dist/merkle/endpoint_schema.etag.json +1 -1
  68. package/.dist/merkle/endpoint_schema.json +1 -2
  69. package/.dist/merkle/kit.etag.json +1 -1
  70. package/.dist/movable-ink/endpoint_schema.etag.json +1 -1
  71. package/.dist/movable-ink/endpoint_schema.json +1 -2
  72. package/.dist/movable-ink/kit.etag.json +1 -1
  73. package/.dist/pinterest/endpoint_schema.etag.json +1 -1
  74. package/.dist/pinterest/endpoint_schema.json +1 -2
  75. package/.dist/pinterest/kit.etag.json +1 -1
  76. package/.dist/rev-jet/endpoint_schema.etag.json +1 -1
  77. package/.dist/rev-jet/endpoint_schema.json +1 -2
  78. package/.dist/rev-jet/kit.etag.json +1 -1
  79. package/.dist/roomvo/endpoint_schema.etag.json +1 -1
  80. package/.dist/roomvo/endpoint_schema.json +0 -1
  81. package/.dist/roomvo/kit.etag.json +1 -1
  82. package/.dist/snapchat/endpoint_schema.etag.json +1 -1
  83. package/.dist/snapchat/endpoint_schema.json +1 -2
  84. package/.dist/snapchat/kit.etag.json +1 -1
  85. package/.dist/snowflake/endpoint_schema.etag.json +1 -1
  86. package/.dist/snowflake/endpoint_schema.json +1 -2
  87. package/.dist/snowflake/kit.etag.json +1 -1
  88. package/.dist/verizon-media/endpoint_schema.etag.json +1 -1
  89. package/.dist/verizon-media/endpoint_schema.json +0 -1
  90. package/.dist/verizon-media/kit.etag.json +1 -1
  91. package/.dist/xandr/endpoint_schema.etag.json +1 -1
  92. package/.dist/xandr/endpoint_schema.json +1 -2
  93. package/.dist/xandr/kit.etag.json +1 -1
  94. package/index.js +40 -36
  95. package/package.json +1 -1
@@ -1 +1 @@
1
- "cc92667d537c5d7fce05525237af4879"
1
+ "2afa3462fc26bac8ae25190b322764c5"
@@ -7,6 +7,10 @@
7
7
  {
8
8
  "name": "PASSWORD",
9
9
  "exampleValue": "my-api-token"
10
+ },
11
+ {
12
+ "name": "ENDPOINT_IDENTIFIER",
13
+ "exampleValue": "metarouter"
10
14
  }
11
15
  ],
12
16
  "default": {
@@ -14,19 +18,32 @@
14
18
  "password": "$$PASSWORD$$",
15
19
  "username": "$$USERNAME$$"
16
20
  },
17
- "endpoint": "https://push.actioniq.com/v1/streams/mr_test_page",
21
+ "endpoint": "https://push.actioniq.com/v1/streams/$$ENDPOINT_IDENTIFIER$$_track",
18
22
  "headers": [
19
23
  {
20
24
  "key": "Content-Type",
21
25
  "value": "application/json"
22
26
  }
23
27
  ],
24
- "method": "POST",
25
- "timeout": "30s"
28
+ "method": "POST"
26
29
  },
27
30
  "eventSpecific": {
28
31
  "identify": {
29
- "endpoint": "https://push.actioniq.com/v1/streams/mr_test_track",
32
+ "endpoint": "https://push.actioniq.com/v1/streams/$$ENDPOINT_IDENTIFIER$$_identify",
33
+ "basicAuth": {
34
+ "password": "$$PASSWORD$$",
35
+ "username": "$$USERNAME$$"
36
+ },
37
+ "headers": [
38
+ {
39
+ "key": "Content-Type",
40
+ "value": "application/json"
41
+ }
42
+ ],
43
+ "method": "POST"
44
+ },
45
+ "page": {
46
+ "endpoint": "https://push.actioniq.com/v1/streams/$$ENDPOINT_IDENTIFIER$$_page",
30
47
  "basicAuth": {
31
48
  "password": "$$PASSWORD$$",
32
49
  "username": "$$USERNAME$$"
@@ -37,8 +54,7 @@
37
54
  "value": "application/json"
38
55
  }
39
56
  ],
40
- "method": "POST",
41
- "timeout": "30s"
57
+ "method": "POST"
42
58
  }
43
59
  }
44
60
  }
@@ -1 +1 @@
1
- "1c3f4c5e950c12dff8093bdd4744e5c2"
1
+ "60f7d97c416033cd8bffafb77774362a"
@@ -22,6 +22,10 @@
22
22
  {
23
23
  "date": "2021-10-04T00:00:00.000Z",
24
24
  "note": "properties field includes eventName and its properties"
25
+ },
26
+ {
27
+ "date": "2021-10-23T00:00:00.000Z",
28
+ "note": "context is moved up a level to become a child of properties"
25
29
  }
26
30
  ]
27
31
  }
@@ -1 +1 @@
1
- "aef161ed62070cea14c04a175cdc4cdc"
1
+ "2d91ab698f70628a0dd1315050a37f46"
@@ -43,6 +43,10 @@
43
43
  "inputKey": "traits",
44
44
  "outputKey": "properties.traits"
45
45
  },
46
+ {
47
+ "inputKey": "context",
48
+ "outputKey": "properties.context"
49
+ },
46
50
  {
47
51
  "inputKey": "input",
48
52
  "outputKey": "properties.isAnonymous",
@@ -67,6 +71,10 @@
67
71
  "inputKey": "anonymousId",
68
72
  "outputKey": "properties.anonymousId"
69
73
  },
74
+ {
75
+ "inputKey": "context",
76
+ "outputKey": "properties.context"
77
+ },
70
78
  {
71
79
  "inputKey": "input",
72
80
  "outputKey": "properties.isAnonymous",
@@ -84,6 +92,10 @@
84
92
  },
85
93
  "default": {
86
94
  "mappings": [
95
+ {
96
+ "inputKey": "context",
97
+ "outputKey": "properties.context"
98
+ },
87
99
  {
88
100
  "inputKey": "anonymousId",
89
101
  "outputKey": "properties.anonymousId"
@@ -116,7 +128,7 @@
116
128
  "expressions": [
117
129
  {
118
130
  "lang": "lua",
119
- "body": "local eventName = REPLACE(LOWER(input.event), \" \", \"_\")\nlocal results = {}\n\nlocal flatten = FLATTEN(input.properties, \"\", \"_\", 2)\nflatten[\"context\"] = input.context\nresults[eventName] = flatten\n\nreturn { properties = results }"
131
+ "body": "local eventName = REPLACE(LOWER(input.event), \" \", \"_\")\nlocal results = {}\n\nlocal flatten = FLATTEN(input.properties, \"\", \"_\", 2, { array_start_index = 1 })\nresults[eventName] = flatten\n\nreturn { properties = results }"
120
132
  }
121
133
  ]
122
134
  }
@@ -1 +1 @@
1
- "1c0ed3d4aa4eb82709868588c04d70a6"
1
+ "cd86cc049dbf57711f37abc7d3cb93e9"
@@ -29,7 +29,6 @@
29
29
  "fromEventKey": "$$COOKIE$$"
30
30
  }
31
31
  ],
32
- "method": "GET",
33
- "timeout": "30s"
32
+ "method": "GET"
34
33
  }
35
34
  }
@@ -1 +1 @@
1
- "a4410144dabe83ddabf7c1b4205b95f5"
1
+ "d48cb940c9b60d8515066e7d5baddc36"
@@ -1 +1 @@
1
- "f000602e5851195682cee9ddd4218a13"
1
+ "00a1119e77914ebb412cba0b4bda50ca"
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "default": {
3
3
  "endpoint": "TODO",
4
- "method": "GET",
5
- "timeout": "30s"
4
+ "method": "GET"
6
5
  }
7
6
  }
@@ -1 +1 @@
1
- "d38bc39bd852f292919f1d5bc26707dd"
1
+ "d0ef12bb0cc1957626398dd40527230c"
@@ -1 +1 @@
1
- "b8fcb6eefd0ad87174cd19d0d4b52180"
1
+ "fccf1b2a9e1768aeb123210f6d7b2ab7"
@@ -19,7 +19,6 @@
19
19
  "fromEventKey": "context.ip"
20
20
  }
21
21
  ],
22
- "method": "GET",
23
- "timeout": "30s"
22
+ "method": "GET"
24
23
  }
25
24
  }
@@ -1 +1 @@
1
- "7c16b7ea7ac10cf95956bff267e58115"
1
+ "0d48a69047ea95a58f95820fc5ce5897"
@@ -1 +1 @@
1
- "6ec377176e5da58eac7e1a927b068237"
1
+ "5c8066cad53974a7f636dd7b164808fb"
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "default": {
3
3
  "endpoint": "https://r.turn.com/r/beacon",
4
- "method": "GET",
5
- "timeout": "30s"
4
+ "method": "GET"
6
5
  }
7
6
  }
@@ -1 +1 @@
1
- "d0b26b473865f86bde22172fe2944910"
1
+ "db6248bf3c372b4907ff008dcfcccd70"
@@ -1 +1 @@
1
- "18696af7494c1c3aaf9516cbdc4d6471"
1
+ "f061609cccf83f121fadc494db9acbb3"
@@ -2,7 +2,6 @@
2
2
  "default": {
3
3
  "endpoint": "https://api2.amplitude.com/2/httpapi",
4
4
  "method": "POST",
5
- "timeout": "30s",
6
5
  "headers": [
7
6
  {
8
7
  "key": "Content-Type",
@@ -17,8 +16,7 @@
17
16
  "eventSpecific": {
18
17
  "identify": {
19
18
  "endpoint": "https://api.amplitude.com/identify",
20
- "method": "GET",
21
- "timeout": "30s"
19
+ "method": "GET"
22
20
  }
23
21
  }
24
22
  }
@@ -1 +1 @@
1
- "09f92d567a789c6cd79142f8dc7886d8"
1
+ "1c87bdc5dacfed08e2e38a3f9b5bb470"
@@ -22,6 +22,10 @@
22
22
  {
23
23
  "date": "2021-07-28T00:00:00.000Z",
24
24
  "note": "amplitude api update; identify"
25
+ },
26
+ {
27
+ "date": "2021-08-26T00:00:00.000Z",
28
+ "note": "adds some context input"
25
29
  }
26
30
  ]
27
31
  }
@@ -1 +1 @@
1
- "0138925273239f5c202a4cdc58a48ad8"
1
+ "7dc5d0857345917d8bb9939a899024b0"
@@ -7,23 +7,6 @@
7
7
  }
8
8
  ],
9
9
  "global": {
10
- "filters": [
11
- {
12
- "byEventNames": {
13
- "action": "allow",
14
- "events": [
15
- "identify",
16
- "page",
17
- "products_searched",
18
- "product_list_viewed",
19
- "product_viewed",
20
- "product_added",
21
- "cart_viewed",
22
- "order_completed"
23
- ]
24
- }
25
- }
26
- ],
27
10
  "enrichments": [
28
11
  {
29
12
  "staticString": "$$API_KEY$$",
@@ -41,7 +24,7 @@
41
24
  {
42
25
  "expression": {
43
26
  "lang": "lua",
44
- "body": "return {\n user_id = input.userId,\n device_id = input.anonymousId,\n user_properties = {\n user_id = input.userId,\n device_id = input.anonymousId,\n message_id = input.messageId,\n }\n}"
27
+ "body": "function getPlatform (type)\n local t = LOWER(type) or ''\n if t == 'ios' then\n return 'iOS'\n elseif t == 'android' then\n return 'Android'\n else\n return 'Web'\n end\nend\n\nfunction urldecode(s)\n s = s:gsub('+', ' ')\n :gsub('%%(%x%x)', function(h)\n return string.char(tonumber(h, 16))\n end)\n return s\nend\n\nfunction parseurl(s)\n local ans = {}\n for k,v in s:gmatch('([^&=?]-)=([^&=?]+)' ) do\n ans[ k ] = urldecode(v)\n end\n return ans\nend\n\nlocal url = parseurl(input.context.page.url)\n\nlocal user_props = input.traits or {}\nuser_props['user_id'] = input.userId\nuser_props['device_id'] = input.anonymousId\nuser_props['message_id'] = input.messageId\nuser_props['referrer'] = input.context.page.referrer or \"\"\nuser_props['referring_domain'] = SPLIT(SPLIT(input.context.page.referrer, \"//\", 2)[2], \"/\", 2)[1] or \"\"\nuser_props['utm_source'] = input.context.campaign.source\nuser_props['utm_medium'] = input.context.campaign.medium\nuser_props['utm_campaign'] = input.context.campaign.name\nuser_props['utm_term'] = input.context.campaign.term\nuser_props['utm_content'] = input.context.campaign.content\nuser_props['gclid'] = url.gclid\nuser_props['dclid'] = url.dclid\nuser_props['fbclid'] = url.fbclid\n\nreturn {\n user_id = input.userId,\n device_id = input.anonymousId,\n user_properties = user_props,\n app_version = input.context.app.version,\n platform = getPlatform(input.context.device.type),\n os_name = input.context.os.name,\n os_version = input.context.os.version,\n device_manufacturer = input.context.device.manufacturer,\n device_model = input.context.device.model,\n carrier = input.context.network.carrier,\n ip = input.context.ip,\n user_agent = input.context.userAgent,\n}"
45
28
  }
46
29
  }
47
30
  ]
@@ -57,7 +40,7 @@
57
40
  {
58
41
  "expression": {
59
42
  "lang": "lua",
60
- "body": "return {{\n user_id = input.userId,\n device_id = input.anonymousId,\n insert_id = input.messageId,\n event_type = 'Loaded a Page',\n event_properties = {\n category = input.properties.category,\n name = input.properties.name,\n },\n user_properties = {\n user_id = input.userId,\n device_id = input.anonymousId,\n }\n}}"
43
+ "body": "function getPlatform (type)\n local t = LOWER(type) or ''\n if t == 'ios' then\n return 'iOS'\n elseif t == 'android' then\n return 'Android'\n else\n return 'Web'\n end\nend\n\nfunction urldecode(s)\n s = s:gsub('+', ' ')\n :gsub('%%(%x%x)', function(h)\n return string.char(tonumber(h, 16))\n end)\n return s\nend\n\nfunction parseurl(s)\n local ans = {}\n for k,v in s:gmatch('([^&=?]-)=([^&=?]+)' ) do\n ans[ k ] = urldecode(v)\n end\n return ans\nend\n\nlocal url = parseurl(input.context.page.url)\n\nreturn {{\n user_id = input.userId,\n device_id = input.anonymousId,\n insert_id = input.messageId,\n event_type = 'Loaded a Page',\n event_properties = {\n category = input.properties.category,\n name = input.properties.name,\n },\n user_properties = {\n user_id = input.userId,\n device_id = input.anonymousId,\n referrer = input.context.page.referrer or \"\",\n referring_domain = SPLIT(SPLIT(input.context.page.referrer, \"//\", 2)[2], \"/\", 2)[1] or \"\",\n utm_source = input.context.campaign.source,\n utm_medium = input.context.campaign.medium,\n utm_campaign = input.context.campaign.name,\n utm_term = input.context.campaign.term,\n utm_content = input.context.campaign.content,\n gclid = url.gclid,\n dclid = url.dclid,\n fbclid = url.fbclid,\n },\n app_version = input.context.app.version,\n platform = getPlatform(input.context.device.type),\n os_name = input.context.os.name,\n os_version = input.context.os.version,\n device_manufacturer = input.context.device.manufacturer,\n device_model = input.context.device.model,\n carrier = input.context.network.carrier,\n ip = input.context.ip,\n user_agent = input.context.userAgent,\n}}"
61
44
  }
62
45
  }
63
46
  ]
@@ -73,7 +56,7 @@
73
56
  {
74
57
  "expression": {
75
58
  "lang": "lua",
76
- "body": "return {{\n user_id = input.userId,\n device_id = input.anonymousId,\n insert_id = input.messageId,\n event_type = 'search completed',\n event_properties = {\n keywords= input.properties.query,\n },\n user_properties = {\n user_id = input.userId,\n device_id = input.anonymousId,\n }\n}}"
59
+ "body": "function getPlatform (type)\n local t = LOWER(type) or ''\n if t == 'ios' then\n return 'iOS'\n elseif t == 'android' then\n return 'Android'\n else\n return 'Web'\n end\nend\n\nfunction urldecode(s)\n s = s:gsub('+', ' ')\n :gsub('%%(%x%x)', function(h)\n return string.char(tonumber(h, 16))\n end)\n return s\nend\n\nfunction parseurl(s)\n local ans = {}\n for k,v in s:gmatch('([^&=?]-)=([^&=?]+)' ) do\n ans[ k ] = urldecode(v)\n end\n return ans\nend\n\nlocal url = parseurl(input.context.page.url)\n\nreturn {{\n user_id = input.userId,\n device_id = input.anonymousId,\n insert_id = input.messageId,\n event_type = 'Search Completed',\n event_properties = {\n keywords= input.properties.query,\n },\n user_properties = {\n user_id = input.userId,\n device_id = input.anonymousId,\n referrer = input.context.page.referrer or \"\",\n referring_domain = SPLIT(SPLIT(input.context.page.referrer, \"//\", 2)[2], \"/\", 2)[1] or \"\",\n utm_source = input.context.campaign.source,\n utm_medium = input.context.campaign.medium,\n utm_campaign = input.context.campaign.name,\n utm_term = input.context.campaign.term,\n utm_content = input.context.campaign.content,\n gclid = url.gclid,\n dclid = url.dclid,\n fbclid = url.fbclid,\n },\n app_version = input.context.app.version,\n platform = getPlatform(input.context.device.type),\n os_name = input.context.os.name,\n os_version = input.context.os.version,\n device_manufacturer = input.context.device.manufacturer,\n device_model = input.context.device.model,\n carrier = input.context.network.carrier,\n ip = input.context.ip,\n user_agent = input.context.userAgent,\n}}"
77
60
  }
78
61
  }
79
62
  ]
@@ -89,7 +72,7 @@
89
72
  {
90
73
  "expression": {
91
74
  "lang": "lua",
92
- "body": "return {{\n user_id = input.userId,\n device_id = input.anonymousId,\n insert_id = input.messageId,\n event_type = 'product list viewed',\n event_properties = {\n list_category = input.properties.category,\n list_id = input.properties.list_id,\n },\n user_properties = {\n user_id = input.userId,\n device_id = input.anonymousId,\n }\n}}"
75
+ "body": "function getPlatform (type)\n local t = LOWER(type) or ''\n if t == 'ios' then\n return 'iOS'\n elseif t == 'android' then\n return 'Android'\n else\n return 'Web'\n end\nend\n\nfunction urldecode(s)\n s = s:gsub('+', ' ')\n :gsub('%%(%x%x)', function(h)\n return string.char(tonumber(h, 16))\n end)\n return s\nend\n\nfunction parseurl(s)\n local ans = {}\n for k,v in s:gmatch('([^&=?]-)=([^&=?]+)' ) do\n ans[ k ] = urldecode(v)\n end\n return ans\nend\n\nlocal url = parseurl(input.context.page.url)\n\nreturn {{\n user_id = input.userId,\n device_id = input.anonymousId,\n insert_id = input.messageId,\n event_type = 'Product List Viewed',\n event_properties = {\n list_category = input.properties.category,\n list_id = input.properties.list_id,\n },\n user_properties = {\n user_id = input.userId,\n device_id = input.anonymousId,\n referrer = input.context.page.referrer or \"\",\n referring_domain = SPLIT(SPLIT(input.context.page.referrer, \"//\", 2)[2], \"/\", 2)[1] or \"\",\n utm_source = input.context.campaign.source,\n utm_medium = input.context.campaign.medium,\n utm_campaign = input.context.campaign.name,\n utm_term = input.context.campaign.term,\n utm_content = input.context.campaign.content,\n gclid = url.gclid,\n dclid = url.dclid,\n fbclid = url.fbclid,\n },\n app_version = input.context.app.version,\n platform = getPlatform(input.context.device.type),\n os_name = input.context.os.name,\n os_version = input.context.os.version,\n device_manufacturer = input.context.device.manufacturer,\n device_model = input.context.device.model,\n carrier = input.context.network.carrier,\n ip = input.context.ip,\n user_agent = input.context.userAgent,\n}}"
93
76
  }
94
77
  }
95
78
  ]
@@ -105,7 +88,7 @@
105
88
  {
106
89
  "expression": {
107
90
  "lang": "lua",
108
- "body": "return {{\n user_id = input.userId,\n device_id = input.anonymousId,\n insert_id = input.messageId,\n event_type = 'product viewed',\n event_properties = {\n product_name = input.properties.name,\n product_sku = input.properties.sku,\n product_id = input.properties.product_id,\n product_category = input.properties.category,\n product_price = input.properties.price,\n },\n user_properties = {\n user_id = input.userId,\n device_id = input.anonymousId,\n }\n}}"
91
+ "body": "function getPlatform (type)\n local t = LOWER(type) or ''\n if t == 'ios' then\n return 'iOS'\n elseif t == 'android' then\n return 'Android'\n else\n return 'Web'\n end\nend\n\nfunction urldecode(s)\n s = s:gsub('+', ' ')\n :gsub('%%(%x%x)', function(h)\n return string.char(tonumber(h, 16))\n end)\n return s\nend\n\nfunction parseurl(s)\n local ans = {}\n for k,v in s:gmatch('([^&=?]-)=([^&=?]+)' ) do\n ans[ k ] = urldecode(v)\n end\n return ans\nend\n\nlocal url = parseurl(input.context.page.url)\n\nreturn {{\n user_id = input.userId,\n device_id = input.anonymousId,\n insert_id = input.messageId,\n event_type = 'Product Viewed',\n event_properties = {\n product_name = input.properties.name,\n product_sku = input.properties.sku,\n product_id = input.properties.product_id,\n product_category = input.properties.category,\n product_price = input.properties.price,\n },\n user_properties = {\n user_id = input.userId,\n device_id = input.anonymousId,\n referrer = input.context.page.referrer or \"\",\n referring_domain = SPLIT(SPLIT(input.context.page.referrer, \"//\", 2)[2], \"/\", 2)[1] or \"\",\n utm_source = input.context.campaign.source,\n utm_medium = input.context.campaign.medium,\n utm_campaign = input.context.campaign.name,\n utm_term = input.context.campaign.term,\n utm_content = input.context.campaign.content,\n gclid = url.gclid,\n dclid = url.dclid,\n fbclid = url.fbclid,\n },\n app_version = input.context.app.version,\n platform = getPlatform(input.context.device.type),\n os_name = input.context.os.name,\n os_version = input.context.os.version,\n device_manufacturer = input.context.device.manufacturer,\n device_model = input.context.device.model,\n carrier = input.context.network.carrier,\n ip = input.context.ip,\n user_agent = input.context.userAgent,\n}}"
109
92
  }
110
93
  }
111
94
  ]
@@ -121,7 +104,7 @@
121
104
  {
122
105
  "expression": {
123
106
  "lang": "lua",
124
- "body": "return {{\n user_id = input.userId,\n device_id = input.anonymousId,\n insert_id = input.messageId,\n event_type = 'product added',\n event_properties = {\n product_name = input.properties.name,\n product_sku = input.properties.sku,\n product_id = input.properties.product_id,\n product_category = input.properties.category,\n product_price = input.properties.price,\n product_quantity = input.properties.quantity,\n },\n user_properties = {\n user_id = input.userId,\n device_id = input.anonymousId,\n }\n}}"
107
+ "body": "function getPlatform (type)\n local t = LOWER(type) or ''\n if t == 'ios' then\n return 'iOS'\n elseif t == 'android' then\n return 'Android'\n else\n return 'Web'\n end\nend\n\nfunction urldecode(s)\n s = s:gsub('+', ' ')\n :gsub('%%(%x%x)', function(h)\n return string.char(tonumber(h, 16))\n end)\n return s\nend\n\nfunction parseurl(s)\n local ans = {}\n for k,v in s:gmatch('([^&=?]-)=([^&=?]+)' ) do\n ans[ k ] = urldecode(v)\n end\n return ans\nend\n\nlocal url = parseurl(input.context.page.url)\n\nreturn {{\n user_id = input.userId,\n device_id = input.anonymousId,\n insert_id = input.messageId,\n event_type = 'Product Added',\n event_properties = {\n product_name = input.properties.name,\n product_sku = input.properties.sku,\n product_id = input.properties.product_id,\n product_category = input.properties.category,\n product_price = input.properties.price,\n product_quantity = input.properties.quantity,\n },\n user_properties = {\n user_id = input.userId,\n device_id = input.anonymousId,\n referrer = input.context.page.referrer or \"\",\n referring_domain = SPLIT(SPLIT(input.context.page.referrer, \"//\", 2)[2], \"/\", 2)[1] or \"\",\n utm_source = input.context.campaign.source,\n utm_medium = input.context.campaign.medium,\n utm_campaign = input.context.campaign.name,\n utm_term = input.context.campaign.term,\n utm_content = input.context.campaign.content,\n gclid = url.gclid,\n dclid = url.dclid,\n fbclid = url.fbclid,\n },\n app_version = input.context.app.version,\n platform = getPlatform(input.context.device.type),\n os_name = input.context.os.name,\n os_version = input.context.os.version,\n device_manufacturer = input.context.device.manufacturer,\n device_model = input.context.device.model,\n carrier = input.context.network.carrier,\n ip = input.context.ip,\n user_agent = input.context.userAgent,\n}}"
125
108
  }
126
109
  }
127
110
  ]
@@ -137,7 +120,7 @@
137
120
  {
138
121
  "expression": {
139
122
  "lang": "lua",
140
- "body": "return {{\n user_id = input.userId,\n device_id = input.anonymousId,\n insert_id = input.messageId,\n event_type = 'cart viewed',\n event_properties = {\n total_cart_size = #input.properties.products,\n total_cart_value = SUM(MAP(input.properties.products, function (p) return p.price * (p.quantity or 1) end)),\n cart_id = input.properties.cart_id,\n },\n user_properties = {\n user_id = input.userId,\n device_id = input.anonymousId,\n }\n}}"
123
+ "body": "function getPlatform (type)\n local t = LOWER(type) or ''\n if t == 'ios' then\n return 'iOS'\n elseif t == 'android' then\n return 'Android'\n else\n return 'Web'\n end\nend\n\nfunction urldecode(s)\n s = s:gsub('+', ' ')\n :gsub('%%(%x%x)', function(h)\n return string.char(tonumber(h, 16))\n end)\n return s\nend\n\nfunction parseurl(s)\n local ans = {}\n for k,v in s:gmatch('([^&=?]-)=([^&=?]+)' ) do\n ans[ k ] = urldecode(v)\n end\n return ans\nend\n\nlocal url = parseurl(input.context.page.url)\n\nreturn {{\n user_id = input.userId,\n device_id = input.anonymousId,\n insert_id = input.messageId,\n event_type = 'Cart Viewed',\n event_properties = {\n total_cart_size = #input.properties.products,\n total_cart_value = SUM(MAP(input.properties.products, function (p) return p.price * (p.quantity or 1) end)),\n cart_id = input.properties.cart_id,\n },\n user_properties = {\n user_id = input.userId,\n device_id = input.anonymousId,\n referrer = input.context.page.referrer or \"\",\n referring_domain = SPLIT(SPLIT(input.context.page.referrer, \"//\", 2)[2], \"/\", 2)[1] or \"\",\n utm_source = input.context.campaign.source,\n utm_medium = input.context.campaign.medium,\n utm_campaign = input.context.campaign.name,\n utm_term = input.context.campaign.term,\n utm_content = input.context.campaign.content,\n gclid = url.gclid,\n dclid = url.dclid,\n fbclid = url.fbclid,\n },\n app_version = input.context.app.version,\n platform = getPlatform(input.context.device.type),\n os_name = input.context.os.name,\n os_version = input.context.os.version,\n device_manufacturer = input.context.device.manufacturer,\n device_model = input.context.device.model,\n carrier = input.context.network.carrier,\n ip = input.context.ip,\n user_agent = input.context.userAgent,\n}}"
141
124
  }
142
125
  }
143
126
  ]
@@ -153,12 +136,28 @@
153
136
  {
154
137
  "expression": {
155
138
  "lang": "lua",
156
- "body": "local event_properties = {\n cart_id = input.properties.cart_id,\n total_cart_size = #input.properties.products,\n total_cart_value = SUM(MAP(input.properties.products, function (p) return p.price * (p.quantity or 1) end)),\n promo_code_applied = input.properties.coupon,\n order_total = input.properties.total,\n total_discounts = input.properties.discount,\n order_id = input.properties.order_id,\n total_shipping = input.properties.shipping,\n total_tax = input.properties.tax,\n}\n\nevent_properties['$revenue'] = TO_FLOAT(input.properties.revenue)\n\nreturn {{\n user_id = input.userId,\n device_id = input.anonymousId,\n insert_id = input.messageId,\n event_type = 'order completed',\n event_properties = event_properties,\n user_properties = {\n user_id = input.userId,\n device_id = input.anonymousId,\n }\n}}"
139
+ "body": "function getPlatform (type)\n local t = LOWER(type) or ''\n if t == 'ios' then\n return 'iOS'\n elseif t == 'android' then\n return 'Android'\n else\n return 'Web'\n end\nend\n\nfunction urldecode(s)\n s = s:gsub('+', ' ')\n :gsub('%%(%x%x)', function(h)\n return string.char(tonumber(h, 16))\n end)\n return s\nend\n\nfunction parseurl(s)\n local ans = {}\n for k,v in s:gmatch('([^&=?]-)=([^&=?]+)' ) do\n ans[ k ] = urldecode(v)\n end\n return ans\nend\n\nlocal url = parseurl(input.context.page.url)\n\nlocal props = {\n cart_id = input.properties.cart_id,\n total_cart_size = #input.properties.products,\n total_cart_value = SUM(MAP(input.properties.products, function (p) return p.price * (p.quantity or 1) end)),\n promo_code_applied = input.properties.coupon,\n order_total = input.properties.total,\n total_discounts = input.properties.discount,\n order_id = input.properties.order_id,\n total_shipping = input.properties.shipping,\n total_tax = input.properties.tax,\n}\n\nprops['$revenue'] = TO_FLOAT(input.properties.revenue)\n\nreturn {{\n user_id = input.userId,\n device_id = input.anonymousId,\n insert_id = input.messageId,\n event_type = 'Order Completed',\n event_properties = props,\n user_properties = {\n user_id = input.userId,\n device_id = input.anonymousId,\n referrer = input.context.page.referrer or \"\",\n referring_domain = SPLIT(SPLIT(input.context.page.referrer, \"//\", 2)[2], \"/\", 2)[1] or \"\",\n utm_source = input.context.campaign.source,\n utm_medium = input.context.campaign.medium,\n utm_campaign = input.context.campaign.name,\n utm_term = input.context.campaign.term,\n utm_content = input.context.campaign.content,\n gclid = url.gclid,\n dclid = url.dclid,\n fbclid = url.fbclid,\n },\n app_version = input.context.app.version,\n platform = getPlatform(input.context.device.type),\n os_name = input.context.os.name,\n os_version = input.context.os.version,\n device_manufacturer = input.context.device.manufacturer,\n device_model = input.context.device.model,\n carrier = input.context.network.carrier,\n ip = input.context.ip,\n user_agent = input.context.userAgent,\n}}"
157
140
  }
158
141
  }
159
142
  ]
160
143
  }
161
144
  ]
162
145
  }
146
+ },
147
+ "default": {
148
+ "mappings": [
149
+ {
150
+ "inputKey": "input",
151
+ "outputKey": "events",
152
+ "transforms": [
153
+ {
154
+ "expression": {
155
+ "lang": "lua",
156
+ "body": "function getPlatform (type)\n local t = LOWER(type) or ''\n if t == 'ios' then\n return 'iOS'\n elseif t == 'android' then\n return 'Android'\n else\n return 'Web'\n end\nend\n\nfunction urldecode(s)\n s = s:gsub('+', ' ')\n :gsub('%%(%x%x)', function(h)\n return string.char(tonumber(h, 16))\n end)\n return s\nend\n\nfunction parseurl(s)\n local ans = {}\n for k,v in s:gmatch('([^&=?]-)=([^&=?]+)' ) do\n ans[ k ] = urldecode(v)\n end\n return ans\nend\n\nlocal url = parseurl(input.context.page.url)\n\nlocal props = input.properties or {}\n\nreturn {{\n user_id = input.userId,\n device_id = input.anonymousId,\n insert_id = input.messageId,\n event_type = input.event,\n event_properties = props,\n user_properties = {\n user_id = input.userId,\n device_id = input.anonymousId,\n referrer = input.context.page.referrer or \"\",\n referring_domain = SPLIT(SPLIT(input.context.page.referrer, \"//\", 2)[2], \"/\", 2)[1] or \"\",\n utm_source = input.context.campaign.source,\n utm_medium = input.context.campaign.medium,\n utm_campaign = input.context.campaign.name,\n utm_term = input.context.campaign.term,\n utm_content = input.context.campaign.content,\n gclid = url.gclid,\n dclid = url.dclid,\n fbclid = url.fbclid,\n },\n app_version = input.context.app.version,\n platform = getPlatform(input.context.device.type),\n os_name = input.context.os.name,\n os_version = input.context.os.version,\n device_manufacturer = input.context.device.manufacturer,\n device_model = input.context.device.model,\n carrier = input.context.network.carrier,\n ip = input.context.ip,\n user_agent = input.context.userAgent,\n}}"
157
+ }
158
+ }
159
+ ]
160
+ }
161
+ ]
163
162
  }
164
163
  }
@@ -1 +1 @@
1
- "9055856e3a38a8ec5b34e7065aab3fe3"
1
+ "f394685bc814f0e316a88b78ac13996a"
@@ -12,7 +12,6 @@
12
12
  "default": {
13
13
  "endpoint": "https://api2.appsflyer.com/inappevent/$$BUNDLE_ID$$",
14
14
  "method": "POST",
15
- "timeout": "30s",
16
15
  "headers": [
17
16
  {
18
17
  "key": "Content-Type",
@@ -1 +1 @@
1
- "1e1b97defa1e96dff28faf815cb63660"
1
+ "368edd84ddc9b3f15ff81d2e6243a76e"
@@ -1 +1 @@
1
- "e0d51411aebacaed66de0a5f13db4bde"
1
+ "bb350063b312a9a7be3ff17c148a38b8"
@@ -12,7 +12,6 @@
12
12
  "default": {
13
13
  "endpoint": "https://api2.appsflyer.com/inappevent/$$APP_ID$$",
14
14
  "method": "POST",
15
- "timeout": "30s",
16
15
  "headers": [
17
16
  {
18
17
  "key": "Content-Type",
@@ -1 +1 @@
1
- "ae67623f709291a8d740979d82177cf6"
1
+ "86dfbf689a137a56f818a62211686a2d"
@@ -1 +1 @@
1
- "1b964e5e86a73330755b172dbb6c25df"
1
+ "0d9fac87fe41d46e4380040b60eb3f8c"
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "default": {
3
3
  "endpoint": "https://g.msn.com/uets2s/0",
4
- "method": "GET",
5
- "timeout": "30s"
4
+ "method": "GET"
6
5
  }
7
6
  }
@@ -1 +1 @@
1
- "418c668a669c5938f2e6bbb3cb4f27e8"
1
+ "66d57d208dcb111deda5a64486804c13"
@@ -1 +1 @@
1
- "71bd3079c532a9c7d0b98195b058a2d2"
1
+ "81a92754210def5df23cdc2022db40ce"
@@ -20,7 +20,6 @@
20
20
  "value": "application/json"
21
21
  }
22
22
  ],
23
- "method": "POST",
24
- "timeout": "30s"
23
+ "method": "POST"
25
24
  }
26
25
  }
@@ -1 +1 @@
1
- "de6197328b95123718adb8a026afd3e1"
1
+ "52ba7ee5e1ce82db06a5c7f1808e6247"
@@ -1 +1 @@
1
- "179cef51dcbe86757d9a0476df228088"
1
+ "281e3836a204aa09c35f8ef973b9f394"
@@ -21,8 +21,7 @@
21
21
  "value": "Bearer $$API_KEY$$"
22
22
  }
23
23
  ],
24
- "method": "POST",
25
- "timeout": "30s"
24
+ "method": "POST"
26
25
  },
27
26
  "eventSpecific": {
28
27
  "identify": {
@@ -37,8 +36,7 @@
37
36
  "value": "Bearer $$API_KEY$$"
38
37
  }
39
38
  ],
40
- "method": "POST",
41
- "timeout": "30s"
39
+ "method": "POST"
42
40
  }
43
41
  }
44
42
  }
@@ -1 +1 @@
1
- "eb269ebdc3ca45057c53b77a9148a5bc"
1
+ "75d4717b552496800cd6dbd2dbeceb26"
@@ -1 +1 @@
1
- "ec68f7343c19ff937fd946981fbe9ca6"
1
+ "0c471d1504392504e2bfca3a657124c9"
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "default": {
3
3
  "endpoint": "http://widget.criteo.com/m/event?version=s2s_v0",
4
- "method": "POST",
5
- "timeout": "30s"
4
+ "method": "POST"
6
5
  }
7
6
  }
@@ -1 +1 @@
1
- "f7b1db5c287c9d8390b13ef48d1d92e7"
1
+ "4d4d2a5e779487bcbbeda31115889d78"
@@ -1 +1 @@
1
- "0e132f311fea25142d255666d41fe5cd"
1
+ "faafbcea9f2f14ddc0b58172b0f1164f"
@@ -15,7 +15,6 @@
15
15
  ],
16
16
  "default": {
17
17
  "endpoint": "https://graph.facebook.com/$$API_VERSION$$/$$PIXEL_ID$$/events?access_token=$$ACCESS_TOKEN$$",
18
- "method": "POST",
19
- "timeout": "30s"
18
+ "method": "POST"
20
19
  }
21
20
  }
@@ -1 +1 @@
1
- "b0659634b8c5191bcb9609b992d7d339"
1
+ "03bde8abbcde1e6741051053217526ca"
@@ -1 +1 @@
1
- "1549dc724fd64320c253f316c6d40a08"
1
+ "6b43ed086a94df1146973713df5a9313"
@@ -7,7 +7,6 @@
7
7
  ],
8
8
  "default": {
9
9
  "endpoint": "https://www.googleadservices.com/pagead/conversion/$$CONVERSION_ID$$/",
10
- "method": "GET",
11
- "timeout": "30s"
10
+ "method": "GET"
12
11
  }
13
12
  }
@@ -1 +1 @@
1
- "09f4f1796b68bebeaef220b9d0fc5a34"
1
+ "fe4df70b5b9331db7009d96e3ab8a66d"
@@ -1 +1 @@
1
- "9d5b154727e37ddb95f048cb3f4d46cb"
1
+ "fe661136b97429236cab9617b39b1930"
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "default": {
3
3
  "endpoint": "https://www.google-analytics.com/collect",
4
- "method": "GET",
5
- "timeout": "30s"
4
+ "method": "GET"
6
5
  }
7
6
  }
@@ -1 +1 @@
1
- "e71977666b0c7f77cad64408ba7007ae"
1
+ "8df13fb27e6e880029db92afec41b893"
@@ -1 +1 @@
1
- "292c69b0ad838d1c4509863f62fb5c08"
1
+ "d57939f1af32b8bab3de9a469358e7c0"
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "default": {
3
3
  "endpoint": "https://fls.doubleclick.net/activityj",
4
- "method": "GET",
5
- "timeout": "30s"
4
+ "method": "GET"
6
5
  }
7
6
  }
@@ -1 +1 @@
1
- "a4e12d2527ceb90de9f096c1a89bf3bf"
1
+ "f0813b1d73fd39d33ad4d269b9687dcf"
@@ -1 +1 @@
1
- "629b812b8ee788d4a73f2e9270fe1646"
1
+ "14e009ff28748036c7de3c157646d964"
@@ -25,8 +25,7 @@
25
25
  "value": "application/json"
26
26
  }
27
27
  ],
28
- "method": "POST",
29
- "timeout": "30s"
28
+ "method": "POST"
30
29
  },
31
30
  "eventSpecific": {
32
31
  "page": {
@@ -45,8 +44,7 @@
45
44
  "value": "application/json"
46
45
  }
47
46
  ],
48
- "method": "POST",
49
- "timeout": "30s"
47
+ "method": "POST"
50
48
  }
51
49
  }
52
50
  }
@@ -1 +1 @@
1
- "a7f9fc4e895ce12ba2b9b000394b7fad"
1
+ "20e35ac5e5c6aeb14cb1cf93618d3d43"
@@ -1 +1 @@
1
- "e7aea9d282711734d48759c055bbb61d"
1
+ "d23fa41aaa44fc3eefeecd7dcbfa305e"