@metarouter/ajs-starter-kit 1.0.120 → 1.0.122
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.
- package/.dist/button/connection.etag.json +1 -0
- package/.dist/button/connection.json +26 -0
- package/.dist/button/kit.etag.json +1 -0
- package/.dist/button/metadata.json +21 -0
- package/.dist/button/playbook.etag.json +1 -0
- package/.dist/button/playbook.json +141 -0
- package/.dist/moloco-commerce-media/kit.etag.json +1 -1
- package/.dist/moloco-commerce-media/metadata.json +5 -1
- package/.dist/moloco-commerce-media/playbook.etag.json +1 -1
- package/.dist/moloco-commerce-media/playbook.json +46 -10
- package/README.md +4 -2
- package/index.js +11 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"2fb442d098325d4ac2d4cf93871b5a1d"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"params": [
|
|
3
|
+
{
|
|
4
|
+
"name": "API_KEY",
|
|
5
|
+
"exampleValue": "my-api-key"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"default": {
|
|
9
|
+
"endpoint": "https://api.usebutton.com/v1/order",
|
|
10
|
+
"method": "POST",
|
|
11
|
+
"headers": [
|
|
12
|
+
{
|
|
13
|
+
"key": "Accept-Encoding",
|
|
14
|
+
"value": "application/json"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"key": "Content-Type",
|
|
18
|
+
"value": "application/json"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"transform": {
|
|
22
|
+
"lang": "lua",
|
|
23
|
+
"body": "local auth = BASE64_ENCODE(\"$$API_KEY$$:\")\nrequest.headers[\"Authorization\"] = \"Basic \" .. auth\nreturn request"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"d877f39358279e01f0127d56eb00907a"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"isDraft": false,
|
|
3
|
+
"isDeprecated": false,
|
|
4
|
+
"isBeta": true,
|
|
5
|
+
"friendlyName": "Button",
|
|
6
|
+
"description": "Button is a commerce optimization platform that enhances affiliate, creator, and social traffic through AI-driven solutions.",
|
|
7
|
+
"logo": "https://cdn.metarouter.io/button.png",
|
|
8
|
+
"color": "#0076FF",
|
|
9
|
+
"eventSource": {
|
|
10
|
+
"isAndroidApp": false,
|
|
11
|
+
"isIosApp": false,
|
|
12
|
+
"isWebApp": true
|
|
13
|
+
},
|
|
14
|
+
"inputSchema": "analytics_js",
|
|
15
|
+
"releaseNotes": [
|
|
16
|
+
{
|
|
17
|
+
"date": "2025-02-19T22:00:00.000Z",
|
|
18
|
+
"note": "Version: 0.1.0\nBeta Version\nButton initial release"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"64e7cfb0aedd617a5abb97559137ff29"
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.1.0",
|
|
3
|
+
"default": {
|
|
4
|
+
"filters": [
|
|
5
|
+
{
|
|
6
|
+
"byEventNames": {
|
|
7
|
+
"action": "allow",
|
|
8
|
+
"events": [
|
|
9
|
+
""
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"global": {
|
|
16
|
+
"mappings": [
|
|
17
|
+
{
|
|
18
|
+
"inputKey": "context.providers.button.btn_ref",
|
|
19
|
+
"outputKey": "btn_ref"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"inputKey": "anonymousId",
|
|
23
|
+
"outputKey": "customer.id"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"inputKey": "input",
|
|
27
|
+
"outputKey": "customer.email_sha256",
|
|
28
|
+
"transforms": [
|
|
29
|
+
{
|
|
30
|
+
"expression": {
|
|
31
|
+
"body": "local email = input.traits.email or input.context.traits.email\nif email then return TO_SHA256_HASH(LOWER(TRIM(email))) end",
|
|
32
|
+
"lang": "lua"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"inputKey": "input",
|
|
39
|
+
"outputKey": "customer.device_id",
|
|
40
|
+
"transforms": [
|
|
41
|
+
{
|
|
42
|
+
"expression": {
|
|
43
|
+
"body": "if (input.context.device and input.context.device.adTrackingEnabled) then\n local id = input.context.device.advertisingId or input.context.device.id\n if id and #id > 0 then return id end\nend",
|
|
44
|
+
"lang": "lua"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"inputKey": "input",
|
|
51
|
+
"outputKey": "purchase_date",
|
|
52
|
+
"transforms": [
|
|
53
|
+
{
|
|
54
|
+
"expression": {
|
|
55
|
+
"body": "return input.timestamp or input.originalTimestamp or input.sentAt",
|
|
56
|
+
"lang": "lua"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"inputKey": "input",
|
|
63
|
+
"outputKey": "partner_order_channel",
|
|
64
|
+
"transforms": [
|
|
65
|
+
{
|
|
66
|
+
"expression": {
|
|
67
|
+
"body": "if input.context.app.name or input.context.device.type or input.context.os.name then return 'app' end\nreturn 'webview'",
|
|
68
|
+
"lang": "lua"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
"event_specific": {
|
|
76
|
+
"order_completed": {
|
|
77
|
+
"enrichments": [
|
|
78
|
+
{
|
|
79
|
+
"outputKey": "total_as_decimal",
|
|
80
|
+
"staticBool": false
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"mappings": [
|
|
84
|
+
{
|
|
85
|
+
"inputKey": "input",
|
|
86
|
+
"outputKey": "total",
|
|
87
|
+
"transforms": [
|
|
88
|
+
{
|
|
89
|
+
"expression": {
|
|
90
|
+
"lang": "lua",
|
|
91
|
+
"body": "return SUM(MAP(input.properties.products, function (p) return (p.price or 0) * 100 * (p.quantity or 1) end))"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"inputKey": "properties.currency",
|
|
98
|
+
"outputKey": "currency",
|
|
99
|
+
"transforms": [
|
|
100
|
+
{
|
|
101
|
+
"modifyString": "uppercase"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"defaultString": "USD"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"inputKey": "properties.order_id",
|
|
108
|
+
"outputKey": "order_id",
|
|
109
|
+
"defaultString": "",
|
|
110
|
+
"transforms": [
|
|
111
|
+
{
|
|
112
|
+
"toScalar": "string"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"inputKey": "properties.order_id",
|
|
118
|
+
"outputKey": "customer_order_id",
|
|
119
|
+
"defaultString": "",
|
|
120
|
+
"transforms": [
|
|
121
|
+
{
|
|
122
|
+
"toScalar": "string"
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"inputKey": "input",
|
|
128
|
+
"outputKey": "line_items",
|
|
129
|
+
"transforms": [
|
|
130
|
+
{
|
|
131
|
+
"expression": {
|
|
132
|
+
"lang": "lua",
|
|
133
|
+
"body": "return MAP(\n input.properties.products,\n function (p)\n local item = {\n identifer = p.product_id or p.sku or '',\n total = (p.price or 0) * 100 * (p.quantity or 1),\n quantity = p.quantity or 1,\n sku = p.sku or '',\n category = { p.category or '' },\n description = p.name or '',\n attributes = attributes\n }\n local attributes = {}\n if (p.brand) then attributes.brand = p.brand end\n if (p.name) then attributes.name = p.name end\n if (p.variant) then attributes.variant = p.variant end\n if (p.coupon) then attributes.coupon = p.coupon end\n if (p.position) then attributes.position = p.position end\n if (p.url) then attributes.url = p.url end\n if (p.image_url) then attributes.image_url = p.image_url end\n if (next(attributes)) then item.attributes = attributes end\n return item\n end\n)"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"
|
|
1
|
+
"0e4bcc9e88eef77caf8ba78352cc873d"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"isDraft": false,
|
|
3
3
|
"isDeprecated": false,
|
|
4
|
-
"isBeta":
|
|
4
|
+
"isBeta": false,
|
|
5
5
|
"friendlyName": "Moloco Commerce Media",
|
|
6
6
|
"description": "Moloco Commerce Media is a machine learning-driven advertising platform that helps businesses optimize their advertising campaigns.",
|
|
7
7
|
"logo": "https://cdn.metarouter.io/moloco.png",
|
|
@@ -28,6 +28,10 @@
|
|
|
28
28
|
{
|
|
29
29
|
"date": "2025-01-15T22:00:00.000Z",
|
|
30
30
|
"note": "Version: 0.4.0\nUpdated friendlyName\nUpdated kit name"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"date": "2025-02-12T22:00:00.000Z",
|
|
34
|
+
"note": "Version: 1.0.0\nNew Event: session_started -> Mapped to Moloco's LAND event (web)\nNew Event: application_open -> Mapped to Moloco's LAND event (mobile)\nUpdated Event: screen -> Mapped to Moloco's PAGE_VIEW or HOME event based on input.name and/or input.properties.name (mobile)\nUpdated Event: order_completed -> Added mapping for Moloco's shipping_charge field using MetaRouter's properties.shipping (web & mobile)\nStable release"
|
|
31
35
|
}
|
|
32
36
|
]
|
|
33
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"
|
|
1
|
+
"54ebfff68f490705fa552893bfa6f76e"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "1.0.0",
|
|
3
3
|
"default": {
|
|
4
4
|
"filters": [
|
|
5
5
|
{
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"transforms": [
|
|
89
89
|
{
|
|
90
90
|
"expression": {
|
|
91
|
-
"body": "return SPLIT(input.context.locale, \"-\", 2)[1]",
|
|
91
|
+
"body": "if (input.context.locale) then return SPLIT(input.context.locale, \"-\", 2)[1] end",
|
|
92
92
|
"lang": "lua"
|
|
93
93
|
}
|
|
94
94
|
}
|
|
@@ -97,6 +97,14 @@
|
|
|
97
97
|
]
|
|
98
98
|
},
|
|
99
99
|
"eventSpecific": {
|
|
100
|
+
"session_started": {
|
|
101
|
+
"enrichments": [
|
|
102
|
+
{
|
|
103
|
+
"outputKey": "event_type",
|
|
104
|
+
"staticString": "LAND"
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
},
|
|
100
108
|
"page": {
|
|
101
109
|
"mappings": [
|
|
102
110
|
{
|
|
@@ -113,14 +121,6 @@
|
|
|
113
121
|
}
|
|
114
122
|
]
|
|
115
123
|
},
|
|
116
|
-
"screen": {
|
|
117
|
-
"enrichments": [
|
|
118
|
-
{
|
|
119
|
-
"outputKey": "event_type",
|
|
120
|
-
"staticString": "PAGE_VIEW"
|
|
121
|
-
}
|
|
122
|
-
]
|
|
123
|
-
},
|
|
124
124
|
"products_searched": {
|
|
125
125
|
"enrichments": [
|
|
126
126
|
{
|
|
@@ -256,6 +256,42 @@
|
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
]
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"inputKey": "properties.shipping",
|
|
262
|
+
"outputKey": "shipping_charge",
|
|
263
|
+
"transforms": [
|
|
264
|
+
{
|
|
265
|
+
"expression": {
|
|
266
|
+
"lang": "lua",
|
|
267
|
+
"body": "return {\n currency = UPPER(input.properties.currency or 'USD'),\n amount = input.properties.shipping\n}"
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
}
|
|
272
|
+
]
|
|
273
|
+
},
|
|
274
|
+
"screen": {
|
|
275
|
+
"mappings": [
|
|
276
|
+
{
|
|
277
|
+
"inputKey": "input",
|
|
278
|
+
"outputKey": "event_type",
|
|
279
|
+
"transforms": [
|
|
280
|
+
{
|
|
281
|
+
"expression": {
|
|
282
|
+
"lang": "lua",
|
|
283
|
+
"body": "local screenName = input.name or input.properties.name\nif (screenName and LOWER(screenName) == 'home') then return \"HOME\" end\nreturn \"PAGE_VIEW\""
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
]
|
|
287
|
+
}
|
|
288
|
+
]
|
|
289
|
+
},
|
|
290
|
+
"application_open": {
|
|
291
|
+
"enrichments": [
|
|
292
|
+
{
|
|
293
|
+
"outputKey": "event_type",
|
|
294
|
+
"staticString": "LAND"
|
|
259
295
|
}
|
|
260
296
|
]
|
|
261
297
|
}
|
package/README.md
CHANGED
|
@@ -8,14 +8,15 @@ previously.
|
|
|
8
8
|
## 2025-02
|
|
9
9
|
- Amazon Data Firehose (BETA)
|
|
10
10
|
- AWIN
|
|
11
|
+
- Button (BETA)
|
|
11
12
|
- Merkle
|
|
13
|
+
- Moloco Commerce Media
|
|
12
14
|
|
|
13
15
|
## 2025-01
|
|
14
16
|
- Blueshift
|
|
15
17
|
- Google BigQuery
|
|
16
18
|
- Iterable (BETA)
|
|
17
19
|
- Microsoft Ads (BETA)
|
|
18
|
-
- Moloco Commerce Media (BETA)
|
|
19
20
|
|
|
20
21
|
## 2024-12
|
|
21
22
|
- Google Analytics 4 (Collect) (BETA)
|
|
@@ -109,12 +110,13 @@ previously.
|
|
|
109
110
|
|----------|------|-------------|
|
|
110
111
|
| Amazon Data Firehose (BETA) | 2025-02 | Version: 0.1.0 Beta Version Amazon Data Firehose initial release. |
|
|
111
112
|
| AWIN | 2025-02 | Version: 1.0.0 Stable release |
|
|
113
|
+
| Button (BETA) | 2025-02 | Version: 0.1.0 Beta Version Button initial release |
|
|
112
114
|
| Merkle | 2025-02 | Version: 1.2.0 Updated mappings to comply with Merkle's requirements Added required fields: ipAddress, userAgent, pageUrl Added optional fields: rawEmail Updated type field of page event to viewpage |
|
|
115
|
+
| Moloco Commerce Media | 2025-02 | Version: 1.0.0 New Event: session_started -> Mapped to Moloco's LAND event (web) New Event: application_open -> Mapped to Moloco's LAND event (mobile) Updated Event: screen -> Mapped to Moloco's PAGE_VIEW or HOME event based on input.name and/or input.properties.name (mobile) Updated Event: order_completed -> Added mapping for Moloco's shipping_charge field using MetaRouter's properties.shipping (web & mobile) Stable release |
|
|
113
116
|
| Blueshift | 2025-01 | Version: 1.0.0 Stable release |
|
|
114
117
|
| Google BigQuery | 2025-01 | Version: 1.1.0 Adding support for table overrides |
|
|
115
118
|
| Iterable (BETA) | 2025-01 | Version: 0.4.0 Add user agent and ip to default and order_completed stanzas Remove redundant properties-dataFields mapping from identify events |
|
|
116
119
|
| Microsoft Ads (BETA) | 2025-01 | Version: 0.1.0 Beta Version Microsoft Ads initial release |
|
|
117
|
-
| Moloco Commerce Media (BETA) | 2025-01 | Version: 0.4.0 Updated friendlyName Updated kit name |
|
|
118
120
|
| Google Analytics 4 (Collect) (BETA) | 2024-12 | Version: 0.4.0 Added user property expression for anonymousId. |
|
|
119
121
|
| 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 |
|
|
120
122
|
| Adobe Analytics - Experience (BETA) | 2024-11 | Version: 0.6.0 Adding checkout event Updating inputKey for siteSection |
|
package/index.js
CHANGED
|
@@ -172,6 +172,12 @@ exports['build-your-own'] = {
|
|
|
172
172
|
metadata: require('./.dist/build-your-own/metadata.json')
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
+
exports.button = {
|
|
176
|
+
endpointSchema: require('./.dist/button/connection.json'),
|
|
177
|
+
playbook: require('./.dist/button/playbook.json'),
|
|
178
|
+
metadata: require('./.dist/button/metadata.json')
|
|
179
|
+
}
|
|
180
|
+
|
|
175
181
|
exports.clinch = {
|
|
176
182
|
endpointSchema: require('./.dist/clinch/connection.json'),
|
|
177
183
|
playbook: require('./.dist/clinch/playbook.json'),
|
|
@@ -616,6 +622,11 @@ exports.etags = {
|
|
|
616
622
|
playbook: require('./.dist/build-your-own/playbook.etag.json'),
|
|
617
623
|
kit: require('./.dist/build-your-own/kit.etag.json')
|
|
618
624
|
},
|
|
625
|
+
button: {
|
|
626
|
+
endpointSchema: require('./.dist/button/connection.etag.json'),
|
|
627
|
+
playbook: require('./.dist/button/playbook.etag.json'),
|
|
628
|
+
kit: require('./.dist/button/kit.etag.json')
|
|
629
|
+
},
|
|
619
630
|
clinch: {
|
|
620
631
|
endpointSchema: require('./.dist/clinch/connection.etag.json'),
|
|
621
632
|
playbook: require('./.dist/clinch/playbook.etag.json'),
|