@metarouter/ajs-starter-kit 1.0.39 → 1.0.42

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 (139) hide show
  1. package/.dist/actioniq/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  2. package/.dist/actioniq/{endpoint_schema.json → connection.json} +0 -0
  3. package/.dist/actioniq/kit.etag.json +1 -1
  4. package/.dist/acuity-ads/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  5. package/.dist/acuity-ads/{endpoint_schema.json → connection.json} +0 -0
  6. package/.dist/acuity-ads/kit.etag.json +1 -1
  7. package/.dist/adobe/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  8. package/.dist/adobe/{endpoint_schema.json → connection.json} +0 -0
  9. package/.dist/adobe/kit.etag.json +1 -1
  10. package/.dist/amazon-redshift-v2/connection.etag.json +1 -0
  11. package/.dist/amazon-redshift-v2/connection.json +17 -0
  12. package/.dist/amazon-redshift-v2/kit.etag.json +1 -1
  13. package/.dist/amnet/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  14. package/.dist/amnet/{endpoint_schema.json → connection.json} +0 -0
  15. package/.dist/amnet/kit.etag.json +1 -1
  16. package/.dist/amobee/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  17. package/.dist/amobee/{endpoint_schema.json → connection.json} +0 -0
  18. package/.dist/amobee/kit.etag.json +1 -1
  19. package/.dist/amplitude/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  20. package/.dist/amplitude/{endpoint_schema.json → connection.json} +0 -0
  21. package/.dist/amplitude/kit.etag.json +1 -1
  22. package/.dist/apps-flyer-android/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  23. package/.dist/apps-flyer-android/{endpoint_schema.json → connection.json} +0 -0
  24. package/.dist/apps-flyer-android/kit.etag.json +1 -1
  25. package/.dist/apps-flyer-ios/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  26. package/.dist/apps-flyer-ios/{endpoint_schema.json → connection.json} +0 -0
  27. package/.dist/apps-flyer-ios/kit.etag.json +1 -1
  28. package/.dist/bing-ads/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  29. package/.dist/bing-ads/{endpoint_schema.json → connection.json} +0 -0
  30. package/.dist/bing-ads/kit.etag.json +1 -1
  31. package/.dist/blob/connection.etag.json +1 -0
  32. package/.dist/blob/connection.json +8 -0
  33. package/.dist/blob/kit.etag.json +1 -1
  34. package/.dist/blueshift/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  35. package/.dist/blueshift/{endpoint_schema.json → connection.json} +0 -0
  36. package/.dist/blueshift/kit.etag.json +1 -1
  37. package/.dist/braze/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  38. package/.dist/braze/{endpoint_schema.json → connection.json} +0 -0
  39. package/.dist/braze/kit.etag.json +1 -1
  40. package/.dist/criteo/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  41. package/.dist/criteo/{endpoint_schema.json → connection.json} +0 -0
  42. package/.dist/criteo/kit.etag.json +1 -1
  43. package/.dist/facebook-pixel/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  44. package/.dist/facebook-pixel/{endpoint_schema.json → connection.json} +0 -0
  45. package/.dist/facebook-pixel/kit.etag.json +1 -1
  46. package/.dist/gcs/connection.etag.json +1 -0
  47. package/.dist/gcs/connection.json +7 -0
  48. package/.dist/gcs/kit.etag.json +1 -1
  49. package/.dist/google-ad-words/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  50. package/.dist/google-ad-words/{endpoint_schema.json → connection.json} +0 -0
  51. package/.dist/google-ad-words/kit.etag.json +1 -1
  52. package/.dist/google-analytics/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  53. package/.dist/google-analytics/{endpoint_schema.json → connection.json} +0 -0
  54. package/.dist/google-analytics/kit.etag.json +1 -1
  55. package/.dist/google-analytics-4/connection.etag.json +1 -0
  56. package/.dist/google-analytics-4/connection.json +26 -0
  57. package/.dist/google-analytics-4/kit.etag.json +1 -0
  58. package/.dist/google-analytics-4/metadata.json +19 -0
  59. package/.dist/google-analytics-4/playbook.etag.json +1 -0
  60. package/.dist/google-analytics-4/playbook.json +229 -0
  61. package/.dist/google-bigquery-streaming/connection.etag.json +1 -0
  62. package/.dist/google-bigquery-streaming/connection.json +8 -0
  63. package/.dist/google-bigquery-streaming/kit.etag.json +1 -1
  64. package/.dist/google-cm360/connection.etag.json +1 -0
  65. package/.dist/google-cm360/connection.json +6 -0
  66. package/.dist/google-cm360/kit.etag.json +1 -1
  67. package/.dist/google-double-click/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  68. package/.dist/google-double-click/{endpoint_schema.json → connection.json} +0 -0
  69. package/.dist/google-double-click/kit.etag.json +1 -1
  70. package/.dist/google-pubsub/connection.etag.json +1 -0
  71. package/.dist/google-pubsub/connection.json +7 -0
  72. package/.dist/google-pubsub/kit.etag.json +1 -1
  73. package/.dist/impact-radius/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  74. package/.dist/impact-radius/{endpoint_schema.json → connection.json} +0 -0
  75. package/.dist/impact-radius/kit.etag.json +1 -1
  76. package/.dist/in-market/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  77. package/.dist/in-market/{endpoint_schema.json → connection.json} +0 -0
  78. package/.dist/in-market/kit.etag.json +1 -1
  79. package/.dist/kafka/connection.etag.json +1 -0
  80. package/.dist/kafka/connection.json +16 -0
  81. package/.dist/kafka/kit.etag.json +1 -1
  82. package/.dist/kinesis/connection.etag.json +1 -0
  83. package/.dist/kinesis/connection.json +9 -0
  84. package/.dist/kinesis/kit.etag.json +1 -1
  85. package/.dist/lytics/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  86. package/.dist/lytics/{endpoint_schema.json → connection.json} +0 -0
  87. package/.dist/lytics/kit.etag.json +1 -1
  88. package/.dist/media-math/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  89. package/.dist/media-math/{endpoint_schema.json → connection.json} +0 -0
  90. package/.dist/media-math/kit.etag.json +1 -1
  91. package/.dist/merkle/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  92. package/.dist/merkle/{endpoint_schema.json → connection.json} +0 -0
  93. package/.dist/merkle/kit.etag.json +1 -1
  94. package/.dist/mixpanel/connection.etag.json +1 -0
  95. package/.dist/mixpanel/{endpoint_schema.json → connection.json} +21 -0
  96. package/.dist/mixpanel/kit.etag.json +1 -1
  97. package/.dist/mixpanel/playbook.etag.json +1 -1
  98. package/.dist/mixpanel/playbook.json +43 -32
  99. package/.dist/movable-ink/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  100. package/.dist/movable-ink/{endpoint_schema.json → connection.json} +0 -0
  101. package/.dist/movable-ink/kit.etag.json +1 -1
  102. package/.dist/pinterest/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  103. package/.dist/pinterest/{endpoint_schema.json → connection.json} +0 -0
  104. package/.dist/pinterest/kit.etag.json +1 -1
  105. package/.dist/rev-jet/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  106. package/.dist/rev-jet/{endpoint_schema.json → connection.json} +0 -0
  107. package/.dist/rev-jet/kit.etag.json +1 -1
  108. package/.dist/roomvo/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  109. package/.dist/roomvo/{endpoint_schema.json → connection.json} +0 -0
  110. package/.dist/roomvo/kit.etag.json +1 -1
  111. package/.dist/s3/connection.etag.json +1 -0
  112. package/.dist/s3/connection.json +8 -0
  113. package/.dist/s3/kit.etag.json +1 -1
  114. package/.dist/salesforce-cdp/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  115. package/.dist/salesforce-cdp/{endpoint_schema.json → connection.json} +0 -0
  116. package/.dist/salesforce-cdp/kit.etag.json +1 -1
  117. package/.dist/snapchat/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  118. package/.dist/snapchat/{endpoint_schema.json → connection.json} +0 -0
  119. package/.dist/snapchat/kit.etag.json +1 -1
  120. package/.dist/snowflake/connection.etag.json +1 -0
  121. package/.dist/snowflake/connection.json +16 -0
  122. package/.dist/snowflake/kit.etag.json +1 -1
  123. package/.dist/twitter-conversions/connection.etag.json +1 -0
  124. package/.dist/twitter-conversions/connection.json +48 -0
  125. package/.dist/twitter-conversions/kit.etag.json +1 -0
  126. package/.dist/twitter-conversions/metadata.json +19 -0
  127. package/.dist/twitter-conversions/playbook.etag.json +1 -0
  128. package/.dist/twitter-conversions/playbook.json +261 -0
  129. package/.dist/verizon-media/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  130. package/.dist/verizon-media/{endpoint_schema.json → connection.json} +0 -0
  131. package/.dist/verizon-media/kit.etag.json +1 -1
  132. package/.dist/xandr/{endpoint_schema.etag.json → connection.etag.json} +0 -0
  133. package/.dist/xandr/{endpoint_schema.json → connection.json} +0 -0
  134. package/.dist/xandr/kit.etag.json +1 -1
  135. package/index.js +83 -60
  136. package/package.json +1 -1
  137. package/.dist/mixpanel/endpoint_schema.etag.json +0 -1
  138. package/.dist/snowflake/endpoint_schema.etag.json +0 -1
  139. package/.dist/snowflake/endpoint_schema.json +0 -6
@@ -1 +1 @@
1
- "adac5f81fc8e2d9c6a0b7cd271d078b6"
1
+ "5a29cdedd1dd0be82593b88b69f07fb2"
@@ -1 +1 @@
1
- "df8f9cc1d15cfc15dd37806e055407e0"
1
+ "68f85f69eda17b52035fb3012eb6959a"
@@ -0,0 +1 @@
1
+ "562aa434b676a5b963fb0a68962d5817"
@@ -35,5 +35,26 @@
35
35
  "lang": "lua",
36
36
  "body": "request.body = batch\nreturn request"
37
37
  }
38
+ },
39
+ "eventSpecific": {
40
+ "identify": {
41
+ "endpoint": "https://api.mixpanel.com/engage#profile-set",
42
+ "headers": [
43
+ {
44
+ "key": "Content-Type",
45
+ "value": "application/json"
46
+ },
47
+ {
48
+ "key": "Accept",
49
+ "value": "text/plain"
50
+ }
51
+ ],
52
+ "method": "POST",
53
+ "batchSize": 1,
54
+ "transform": {
55
+ "lang": "lua",
56
+ "body": "request.body = batch\nreturn request"
57
+ }
58
+ }
38
59
  }
39
60
  }
@@ -1 +1 @@
1
- "eb79dcce8230e965a2b1ac42cfde1f73"
1
+ "12c0d1d6adadcb823248820414d2747a"
@@ -1 +1 @@
1
- "14de59c0146548355e75404cad9f3c9c"
1
+ "511f676b6cb2174bbe3fb9d4baa6d672"
@@ -1,7 +1,46 @@
1
1
  {
2
2
  "version": "1.0.0",
3
- "global": {
3
+ "params": [
4
+ {
5
+ "name": "TOKEN",
6
+ "exampleValue": "my-project-token"
7
+ }
8
+ ],
9
+ "global": {},
10
+ "eventSpecific": {
11
+ "identify": {
12
+ "enrichments": [
13
+ {
14
+ "staticString": "$$TOKEN$$",
15
+ "outputKey": "$token"
16
+ }
17
+ ],
18
+ "mappings": [
19
+ {
20
+ "inputKey": "anonymousId",
21
+ "outputKey": "$distinct_id"
22
+ },
23
+ {
24
+ "inputKey": "traits",
25
+ "outputKey": "$set"
26
+ }
27
+ ]
28
+ }
29
+ },
30
+ "default": {
4
31
  "mappings": [
32
+ {
33
+ "inputKey": "input",
34
+ "outputKey": "event",
35
+ "transforms": [
36
+ {
37
+ "expression": {
38
+ "lang": "lua",
39
+ "body": "if input.type == \"track\" then\n return input.event\nend\nreturn input.type"
40
+ }
41
+ }
42
+ ]
43
+ },
5
44
  {
6
45
  "inputKey": "properties",
7
46
  "outputKey": "properties"
@@ -33,38 +72,10 @@
33
72
  {
34
73
  "inputKey": "messageId",
35
74
  "outputKey": "properties.$insert_id"
36
- }
37
- ]
38
- },
39
- "eventSpecific": {
40
- "identify": {
41
- "mappings": [
42
- {
43
- "inputKey": "userId",
44
- "outputKey": "properties.$identified_id"
45
- }
46
- ],
47
- "enrichments": [
48
- {
49
- "staticString": "$identify",
50
- "outputKey": "event"
51
- }
52
- ]
53
- },
54
- "page": {
55
- "mappings": [
56
- {
57
- "inputKey": "type",
58
- "outputKey": "event"
59
- }
60
- ]
61
- }
62
- },
63
- "default": {
64
- "mappings": [
75
+ },
65
76
  {
66
- "inputKey": "event",
67
- "outputKey": "event"
77
+ "inputKey": "userId",
78
+ "outputKey": "properties.$identified_id"
68
79
  }
69
80
  ]
70
81
  }
@@ -1 +1 @@
1
- "5c3a8f10e9b1d414c5aa740e70e54f25"
1
+ "9aeaae1532ff924d44e9c8c4346ea4fd"
@@ -1 +1 @@
1
- "b7e66a4b1e4987c34dd116c69f1b4421"
1
+ "5d42f4c8427eb0ffc6e1ed8a65fd1570"
@@ -1 +1 @@
1
- "8c5baa542641f459e7635311addb63b0"
1
+ "54fcaa6a30b216f9e47ddfd979e78fb2"
@@ -1 +1 @@
1
- "4ab47e329f4f1c4a073cad569a9d16c9"
1
+ "223074ed50776bb52bb3b37417725024"
@@ -0,0 +1 @@
1
+ "0b2837fe65eff18e1effb6b09fab18f8"
@@ -0,0 +1,8 @@
1
+ {
2
+ "s3": {
3
+ "region": "us-east-1",
4
+ "bucket": "my-bucket",
5
+ "accessKey": "my-access-key",
6
+ "secretKey": "my-access-secret"
7
+ }
8
+ }
@@ -1 +1 @@
1
- "f12405f95b6d18ad3616bb4dfbfd3deb"
1
+ "931a96dd20617e4368e79b694e3c4bc6"
@@ -1 +1 @@
1
- "6dc1746511395b6e1f356b07e1d27647"
1
+ "aa06c39541cf2fb76bc9f901068e9d5c"
@@ -1 +1 @@
1
- "e59ddb2074c3578938118508f348a09c"
1
+ "a677d1a94558935b9f576e44ca0c3da7"
@@ -0,0 +1 @@
1
+ "22ebc0d235967435421c801b901ee9bc"
@@ -0,0 +1,16 @@
1
+ {
2
+ "snowflake": {
3
+ "user": "my-user",
4
+ "password": "my-password",
5
+ "account": "my-account",
6
+ "database": "my-database",
7
+ "warehouse": "my-warehouse",
8
+ "privateKey": "my-private-key",
9
+ "s3": {
10
+ "region": "us-east-1",
11
+ "bucket": "my-bucket",
12
+ "access_key": "my-access-key",
13
+ "secret_key": "my-access-secret"
14
+ }
15
+ }
16
+ }
@@ -1 +1 @@
1
- "116e902862a393fc013ba067b5a0352f"
1
+ "976cc977a0394dd4058a15e33325963c"
@@ -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
+ "5c43204d72582fafd2b376d4af1b7f52"
@@ -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
+ }
@@ -1 +1 @@
1
- "a5c93826d45221389b9e73868ef920c9"
1
+ "fbe511e6d5474985c9a0d37ab93422b6"
@@ -1 +1 @@
1
- "30b83f7c9b4526a23ea9aed073c62a5f"
1
+ "2c90cb445101e6d5b9ede84d9b878953"