@metarouter/ajs-starter-kit 1.0.121 → 1.0.123

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.
@@ -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
+ }
@@ -0,0 +1 @@
1
+ "1d8e804adaf69151538805df03c57a5a"
@@ -0,0 +1,53 @@
1
+ {
2
+ "params": [
3
+ {
4
+ "name": "ACCESS_TOKEN",
5
+ "exampleValue": "my-access-token"
6
+ },
7
+ {
8
+ "name": "PROTOCOL_VERSION",
9
+ "exampleValue": "my-protocol-version",
10
+ "defaultValue": "2.0.0"
11
+ },
12
+ {
13
+ "name": "LINKEDIN_VERSION",
14
+ "exampleValue": "my-linkedin-version",
15
+ "defaultValue": "202408"
16
+ }
17
+ ],
18
+ "default": {
19
+ "endpoint": "https://api.linkedin.com/rest/conversionEvents",
20
+ "batchSize": 500,
21
+ "transform": {
22
+ "lang": "lua",
23
+ "body": "request.body = { elements = batch }\nreturn request"
24
+ },
25
+ "method": "POST",
26
+ "headers": [
27
+ {
28
+ "key": "Content-Type",
29
+ "value": "application/json"
30
+ },
31
+ {
32
+ "key": "Accept",
33
+ "value": "*/*"
34
+ },
35
+ {
36
+ "key": "Authorization",
37
+ "value": "Bearer $$ACCESS_TOKEN$$"
38
+ },
39
+ {
40
+ "key": "X-Restli-Protocol-Version",
41
+ "value": "$$PROTOCOL_VERSION$$"
42
+ },
43
+ {
44
+ "key": "LinkedIn-Version",
45
+ "value": "$$LINKEDIN_VERSION$$"
46
+ },
47
+ {
48
+ "key": "X-RestLi-Method",
49
+ "value": "BATCH_CREATE"
50
+ }
51
+ ]
52
+ }
53
+ }
@@ -0,0 +1 @@
1
+ "abdfaee3178df4d875e07e3540742330"
@@ -0,0 +1,20 @@
1
+ {
2
+ "isDraft": true,
3
+ "isBeta": false,
4
+ "friendlyName": "Linkedin Ads",
5
+ "description": "LinkedIn Ads is a powerful advertising platform designed for professional networking and B2B marketing.",
6
+ "logo": "https://cdn.metarouter.io/linkedin-ads.png",
7
+ "color": "#0077B5",
8
+ "eventSource": {
9
+ "isAndroidApp": true,
10
+ "isIosApp": true,
11
+ "isWebApp": true
12
+ },
13
+ "inputSchema": "analytics_js",
14
+ "releaseNotes": [
15
+ {
16
+ "date": "2025-02-26T21:00:00.000Z",
17
+ "note": "Version: 0.1.0\nDraft Mode\nLinkedIn Ads draft release"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1 @@
1
+ "feea203eea05f2b2b1576f5d440febf4"
@@ -0,0 +1,267 @@
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": "input",
19
+ "outputKey": "conversionHappenedAt",
20
+ "transforms": [
21
+ {
22
+ "expression": {
23
+ "body": "return MILLISECONDS_SINCE_EPOCH_FROM_RFC3999(TO_DATE_TIME(input.timestamp, { inputFormat = \"2006-01-02T15:04:05Z07:00\" }))",
24
+ "lang": "lua"
25
+ }
26
+ }
27
+ ]
28
+ },
29
+ {
30
+ "inputKey": "traits.firstName",
31
+ "outputKey": "user.userInfo.firstName"
32
+ },
33
+ {
34
+ "inputKey": "traits.lastName",
35
+ "outputKey": "user.userInfo.lastName"
36
+ },
37
+ {
38
+ "inputKey": "traits.company",
39
+ "outputKey": "user.userInfo.companyName"
40
+ },
41
+ {
42
+ "inputKey": "traits.title",
43
+ "outputKey": "user.userInfo.title"
44
+ },
45
+ {
46
+ "inputKey": "traits.countryCode",
47
+ "outputKey": "user.userInfo.countryCode"
48
+ },
49
+ {
50
+ "inputKey": "input",
51
+ "outputKey": "user.userIds",
52
+ "transforms": [
53
+ {
54
+ "expression": {
55
+ "lang": "lua",
56
+ "body": "local function is_empty(str)\n return not str or str == ''\nend\n\nlocal user_ids = {}\n\nlocal email = input.traits.email or input.context.traits.email\nif email then\n table.insert(user_ids, {\n idType = 'SHA256_EMAIL',\n idValue = TO_SHA256_HASH(LOWER(TRIM(email)))\n })\nend\n\nlocal li_fat_id = input.context.providers.linkedIn.li_fat_id\nif li_fat_id then\n table.insert(user_ids, {\n idType = 'LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID',\n idValue = li_fat_id\n })\nend\nreturn user_ids"
57
+ }
58
+ }
59
+ ]
60
+ },
61
+ {
62
+ "inputKey": "messageId",
63
+ "outputKey": "eventId"
64
+ }
65
+ ]
66
+ },
67
+ "eventSpecific": {
68
+ "identify": {
69
+ "enrichments": [
70
+ {
71
+ "staticString": "ADD_CONVERSION_URN_HERE",
72
+ "outputKey": "conversion"
73
+ }
74
+ ],
75
+ "mappings": [
76
+ {
77
+ "inputKey": "input",
78
+ "outputKey": "conversionValue",
79
+ "transforms": [
80
+ {
81
+ "expression": {
82
+ "lang": "lua",
83
+ "body": "local currency = input.properties.currency local revenue = input.properties.revenue\nif currency and revenue then return {\n currencyCode = UPPER(currency),\n amount = TO_STRING(TO_FLOAT(revenue))\n }\nend"
84
+ }
85
+ }
86
+ ]
87
+ }
88
+ ]
89
+ },
90
+ "page": {
91
+ "enrichments": [
92
+ {
93
+ "staticString": "ADD_CONVERSION_URN_HERE",
94
+ "outputKey": "conversion"
95
+ }
96
+ ],
97
+ "mappings": [
98
+ {
99
+ "inputKey": "input",
100
+ "outputKey": "conversionValue",
101
+ "transforms": [
102
+ {
103
+ "expression": {
104
+ "lang": "lua",
105
+ "body": "local currency = input.properties.currency local revenue = input.properties.revenue\nif currency and revenue then return {\n currencyCode = UPPER(currency),\n amount = TO_STRING(TO_FLOAT(revenue))\n }\nend"
106
+ }
107
+ }
108
+ ]
109
+ }
110
+ ]
111
+ },
112
+ "checkout_started": {
113
+ "enrichments": [
114
+ {
115
+ "staticString": "ADD_CONVERSION_URN_HERE",
116
+ "outputKey": "conversion"
117
+ }
118
+ ],
119
+ "mappings": [
120
+ {
121
+ "inputKey": "input",
122
+ "outputKey": "conversionValue",
123
+ "transforms": [
124
+ {
125
+ "expression": {
126
+ "lang": "lua",
127
+ "body": "local currency = input.properties.currency local revenue = input.properties.revenue\nif currency and revenue then return {\n currencyCode = UPPER(currency),\n amount = TO_STRING(TO_FLOAT(revenue))\n }\nend"
128
+ }
129
+ }
130
+ ]
131
+ }
132
+ ]
133
+ },
134
+ "order_completed": {
135
+ "enrichments": [
136
+ {
137
+ "staticString": "ADD_CONVERSION_URN_HERE",
138
+ "outputKey": "conversion"
139
+ }
140
+ ],
141
+ "mappings": [
142
+ {
143
+ "inputKey": "input",
144
+ "outputKey": "conversionValue",
145
+ "transforms": [
146
+ {
147
+ "expression": {
148
+ "lang": "lua",
149
+ "body": "local currency = input.properties.currency local revenue = input.properties.revenue\nif currency and revenue then return {\n currencyCode = UPPER(currency),\n amount = TO_STRING(TO_FLOAT(revenue))\n }\nend"
150
+ }
151
+ }
152
+ ]
153
+ }
154
+ ]
155
+ },
156
+ "payment_info_entered": {
157
+ "enrichments": [
158
+ {
159
+ "staticString": "ADD_CONVERSION_URN_HERE",
160
+ "outputKey": "conversion"
161
+ }
162
+ ],
163
+ "mappings": [
164
+ {
165
+ "inputKey": "input",
166
+ "outputKey": "conversionValue",
167
+ "transforms": [
168
+ {
169
+ "expression": {
170
+ "lang": "lua",
171
+ "body": "local currency = input.properties.currency local revenue = input.properties.revenue\nif currency and revenue then return {\n currencyCode = UPPER(currency),\n amount = TO_STRING(TO_FLOAT(revenue))\n }\nend"
172
+ }
173
+ }
174
+ ]
175
+ }
176
+ ]
177
+ },
178
+ "product_added": {
179
+ "enrichments": [
180
+ {
181
+ "staticString": "ADD_CONVERSION_URN_HERE",
182
+ "outputKey": "conversion"
183
+ }
184
+ ],
185
+ "mappings": [
186
+ {
187
+ "inputKey": "input",
188
+ "outputKey": "conversionValue",
189
+ "transforms": [
190
+ {
191
+ "expression": {
192
+ "lang": "lua",
193
+ "body": "local currency = input.properties.currency local revenue = input.properties.revenue\nif currency and revenue then return {\n currencyCode = UPPER(currency),\n amount = TO_STRING(TO_FLOAT(revenue))\n }\nend"
194
+ }
195
+ }
196
+ ]
197
+ }
198
+ ]
199
+ },
200
+ "product_viewed": {
201
+ "enrichments": [
202
+ {
203
+ "staticString": "ADD_CONVERSION_URN_HERE",
204
+ "outputKey": "conversion"
205
+ }
206
+ ],
207
+ "mappings": [
208
+ {
209
+ "inputKey": "input",
210
+ "outputKey": "conversionValue",
211
+ "transforms": [
212
+ {
213
+ "expression": {
214
+ "lang": "lua",
215
+ "body": "local currency = input.properties.currency local revenue = input.properties.revenue\nif currency and revenue then return {\n currencyCode = UPPER(currency),\n amount = TO_STRING(TO_FLOAT(revenue))\n }\nend"
216
+ }
217
+ }
218
+ ]
219
+ }
220
+ ]
221
+ },
222
+ "products_searched": {
223
+ "enrichments": [
224
+ {
225
+ "staticString": "ADD_CONVERSION_URN_HERE",
226
+ "outputKey": "conversion"
227
+ }
228
+ ],
229
+ "mappings": [
230
+ {
231
+ "inputKey": "input",
232
+ "outputKey": "conversionValue",
233
+ "transforms": [
234
+ {
235
+ "expression": {
236
+ "lang": "lua",
237
+ "body": "local currency = input.properties.currency local revenue = input.properties.revenue\nif currency and revenue then return {\n currencyCode = UPPER(currency),\n amount = TO_STRING(TO_FLOAT(revenue))\n }\nend"
238
+ }
239
+ }
240
+ ]
241
+ }
242
+ ]
243
+ },
244
+ "promotion_clicked": {
245
+ "enrichments": [
246
+ {
247
+ "staticString": "ADD_CONVERSION_URN_HERE",
248
+ "outputKey": "conversion"
249
+ }
250
+ ],
251
+ "mappings": [
252
+ {
253
+ "inputKey": "input",
254
+ "outputKey": "conversionValue",
255
+ "transforms": [
256
+ {
257
+ "expression": {
258
+ "lang": "lua",
259
+ "body": "local currency = input.properties.currency local revenue = input.properties.revenue\nif currency and revenue then return {\n currencyCode = UPPER(currency),\n amount = TO_STRING(TO_FLOAT(revenue))\n }\nend"
260
+ }
261
+ }
262
+ ]
263
+ }
264
+ ]
265
+ }
266
+ }
267
+ }
@@ -0,0 +1 @@
1
+ "f7ba21c9d32bd7c5a9219a45191a1523"
@@ -0,0 +1,31 @@
1
+ {
2
+ "params": [
3
+ {
4
+ "name": "NETWORK",
5
+ "exampleValue": "my-network"
6
+ }
7
+ ],
8
+ "default": {
9
+ "endpoint": "https://csr.onet.pl/$$NETWORK$$/activity",
10
+ "headers": [
11
+ {
12
+ "key": "Accept-Encoding",
13
+ "value": "application/json"
14
+ },
15
+ {
16
+ "key": "Referer",
17
+ "fromEventKey": "context.page.url"
18
+ },
19
+ {
20
+ "key": "User-Agent",
21
+ "fromEventKey": "context.userAgent"
22
+ }
23
+ ],
24
+ "method": "GET",
25
+ "batchSize": 1,
26
+ "transform": {
27
+ "lang": "lua",
28
+ "body": "if batch[1].adp_session then\n request.headers[\"Cookie\"] = \"adp_session=\\\"\" .. batch[1].adp_session .. \"\\\"\"\n request.url = REPLACE(request.url, '&adp_session=' .. batch[1].adp_session, '')\nend\nreturn request"
29
+ }
30
+ }
31
+ }
@@ -0,0 +1 @@
1
+ "a7833745bcb2a928104b1cbd86aa646c"
@@ -0,0 +1,21 @@
1
+ {
2
+ "isDraft": false,
3
+ "isDeprecated": false,
4
+ "isBeta": true,
5
+ "friendlyName": "Ringier Axel Springer Poland",
6
+ "description": "Ringier Axel Springer Poland (RASP) is a leading digital media and technology company that provides advertising services such as programmatic ads, branded content, display advertising, and audience targeting, leveraging its large digital reach.",
7
+ "logo": "https://cdn.metarouter.io/ringier-axel-springer-poland.png",
8
+ "color": "#000000",
9
+ "eventSource": {
10
+ "isAndroidApp": true,
11
+ "isIosApp": true,
12
+ "isWebApp": true
13
+ },
14
+ "inputSchema": "analytics_js",
15
+ "releaseNotes": [
16
+ {
17
+ "date": "2025-03-05T22:00:00.000Z",
18
+ "note": "Version: 0.1.0\nBeta Version\nRingier Axel Springer Poland initial release"
19
+ }
20
+ ]
21
+ }
@@ -0,0 +1 @@
1
+ "bbf45d438ba19a7bd53b2cddc6433b56"
@@ -0,0 +1,369 @@
1
+ {
2
+ "version": "0.1.0",
3
+ "params": [
4
+ {
5
+ "name": "PIXEL_ID",
6
+ "exampleValue": "my-pixel-id"
7
+ }
8
+ ],
9
+ "global": {
10
+ "enrichments": [
11
+ {
12
+ "staticString": "$$PIXEL_ID$$",
13
+ "outputKey": "actgid"
14
+ },
15
+ {
16
+ "staticInt": "1",
17
+ "outputKey": "npa"
18
+ }
19
+ ],
20
+ "mappings": [
21
+ {
22
+ "inputKey": "anonymousId",
23
+ "outputKey": "anonymousId"
24
+ },
25
+ {
26
+ "inputKey": "messageId",
27
+ "outputKey": "message_id"
28
+ },
29
+ {
30
+ "inputKey": "context.providers.ringierAxelSpringerPoland.dlapi_lu",
31
+ "outputKey": "lu"
32
+ },
33
+ {
34
+ "inputKey": "context.providers.ringierAxelSpringerPoland.dlapi_aid",
35
+ "outputKey": "aid"
36
+ },
37
+ {
38
+ "inputKey": "context.providers.ringierAxelSpringerPoland.sessionID",
39
+ "outputKey": "adp_session"
40
+ },
41
+ {
42
+ "inputKey": "input",
43
+ "outputKey": "eid",
44
+ "transforms": [
45
+ {
46
+ "expression": {
47
+ "body": "local email = input.traits.email or input.context.traits.email\nif email then return TO_MD5_HASH(LOWER(TRIM(email))) end\nreturn",
48
+ "lang": "lua"
49
+ }
50
+ }
51
+ ]
52
+ },
53
+ {
54
+ "inputKey": "input",
55
+ "outputKey": "src",
56
+ "transforms": [
57
+ {
58
+ "expression": {
59
+ "body": "if input.context.app.name or input.context.device.type or input.context.os.name then return 'app' end\nreturn 's2s'",
60
+ "lang": "lua"
61
+ }
62
+ }
63
+ ]
64
+ }
65
+ ]
66
+ },
67
+ "default": {
68
+ "enrichments": [
69
+ {
70
+ "staticString": "custom",
71
+ "outputKey": "event"
72
+ }
73
+ ],
74
+ "mappings": [
75
+ {
76
+ "inputKey": "input",
77
+ "outputKey": "custom_event",
78
+ "transforms": [
79
+ {
80
+ "expression": {
81
+ "body": "if input.type == 'track' then return LOWER(REPLACE(input.event, ' ', '_')) end\nreturn input.type",
82
+ "lang": "lua"
83
+ }
84
+ }
85
+ ]
86
+ }
87
+ ]
88
+ },
89
+ "eventSpecific": {
90
+ "page": {
91
+ "enrichments": [
92
+ {
93
+ "staticString": "page_view",
94
+ "outputKey": "event"
95
+ }
96
+ ]
97
+ },
98
+ "products_searched": {
99
+ "enrichments": [
100
+ {
101
+ "staticString": "search_query",
102
+ "outputKey": "event"
103
+ }
104
+ ],
105
+ "mappings": [
106
+ {
107
+ "inputKey": "properties.query",
108
+ "outputKey": "query"
109
+ }
110
+ ]
111
+ },
112
+ "product_list_viewed": {
113
+ "enrichments": [
114
+ {
115
+ "staticString": "custom",
116
+ "outputKey": "event"
117
+ },
118
+ {
119
+ "staticString": "product_list_viewed",
120
+ "outputKey": "custom_event"
121
+ }
122
+ ],
123
+ "mappings": [
124
+ {
125
+ "inputKey": "input",
126
+ "outputKey": "products",
127
+ "transforms": [
128
+ {
129
+ "expression": {
130
+ "body": "return MAP(\n input.properties.products,\n function (p)\n return {\n id = p.product_id or p.sku or '',\n name = p.name,\n price = p.price,\n qty = p.quantity,\n category = p.category,\n brand = p.brand,\n variant = p.variant\n }\n end\n)",
131
+ "lang": "lua"
132
+ }
133
+ }
134
+ ]
135
+ }
136
+ ]
137
+ },
138
+ "product_clicked": {
139
+ "enrichments": [
140
+ {
141
+ "staticString": "custom",
142
+ "outputKey": "event"
143
+ },
144
+ {
145
+ "staticString": "product_clicked",
146
+ "outputKey": "custom_event"
147
+ }
148
+ ],
149
+ "mappings": [
150
+ {
151
+ "inputKey": "input",
152
+ "outputKey": "products",
153
+ "transforms": [
154
+ {
155
+ "expression": {
156
+ "body": "return {{\n id = input.properties.product_id or input.properties.sku or '',\n name = input.properties.name,\n price = input.properties.price,\n qty = input.properties.quantity,\n category = input.properties.category,\n brand = input.properties.brand,\n variant = input.properties.variant\n}}",
157
+ "lang": "lua"
158
+ }
159
+ }
160
+ ]
161
+ }
162
+ ]
163
+ },
164
+ "product_viewed": {
165
+ "enrichments": [
166
+ {
167
+ "staticString": "product_detail",
168
+ "outputKey": "event"
169
+ },
170
+ {
171
+ "staticString": "product",
172
+ "outputKey": "sitetype"
173
+ }
174
+ ],
175
+ "mappings": [
176
+ {
177
+ "inputKey": "input",
178
+ "outputKey": "products",
179
+ "transforms": [
180
+ {
181
+ "expression": {
182
+ "body": "return {{\n id = input.properties.product_id or input.properties.sku or '',\n name = input.properties.name,\n price = input.properties.price,\n qty = input.properties.quantity,\n category = input.properties.category,\n brand = input.properties.brand,\n variant = input.properties.variant\n}}",
183
+ "lang": "lua"
184
+ }
185
+ }
186
+ ]
187
+ }
188
+ ]
189
+ },
190
+ "product_added": {
191
+ "enrichments": [
192
+ {
193
+ "staticString": "add_to_cart",
194
+ "outputKey": "event"
195
+ }
196
+ ],
197
+ "mappings": [
198
+ {
199
+ "inputKey": "input",
200
+ "outputKey": "products",
201
+ "transforms": [
202
+ {
203
+ "expression": {
204
+ "body": "return {{\n id = input.properties.product_id or input.properties.sku or '',\n name = input.properties.name,\n price = input.properties.price,\n qty = input.properties.quantity,\n category = input.properties.category,\n brand = input.properties.brand,\n variant = input.properties.variant\n}}",
205
+ "lang": "lua"
206
+ }
207
+ }
208
+ ]
209
+ }
210
+ ]
211
+ },
212
+ "product_removed": {
213
+ "enrichments": [
214
+ {
215
+ "staticString": "remove_from_cart",
216
+ "outputKey": "event"
217
+ }
218
+ ],
219
+ "mappings": [
220
+ {
221
+ "inputKey": "input",
222
+ "outputKey": "products",
223
+ "transforms": [
224
+ {
225
+ "expression": {
226
+ "body": "return {{\n id = input.properties.product_id or input.properties.sku or '',\n name = input.properties.name,\n price = input.properties.price,\n qty = input.properties.quantity,\n category = input.properties.category,\n brand = input.properties.brand,\n variant = input.properties.variant\n}}",
227
+ "lang": "lua"
228
+ }
229
+ }
230
+ ]
231
+ }
232
+ ]
233
+ },
234
+ "cart_viewed": {
235
+ "enrichments": [
236
+ {
237
+ "staticString": "view_cart",
238
+ "outputKey": "event"
239
+ },
240
+ {
241
+ "staticString": "cart",
242
+ "outputKey": "sitetype"
243
+ }
244
+ ],
245
+ "mappings": [
246
+ {
247
+ "inputKey": "input",
248
+ "outputKey": "cost",
249
+ "transforms": [
250
+ {
251
+ "expression": {
252
+ "lang": "lua",
253
+ "body": "return SUM(MAP(input.properties.products, function (p) return p.price * (p.quantity or 1) end))"
254
+ }
255
+ }
256
+ ]
257
+ },
258
+ {
259
+ "inputKey": "input",
260
+ "outputKey": "qty",
261
+ "transforms": [
262
+ {
263
+ "expression": {
264
+ "lang": "lua",
265
+ "body": "return SUM(MAP(input.properties.products, function (p) return p.quantity or 1 end))"
266
+ }
267
+ }
268
+ ]
269
+ },
270
+ {
271
+ "inputKey": "input",
272
+ "outputKey": "products",
273
+ "transforms": [
274
+ {
275
+ "expression": {
276
+ "body": "return MAP(\n input.properties.products,\n function (p)\n return {\n id = p.product_id or p.sku or '',\n name = p.name,\n price = p.price,\n qty = p.quantity,\n category = p.category,\n brand = p.brand,\n variant = p.variant\n }\n end\n)",
277
+ "lang": "lua"
278
+ }
279
+ }
280
+ ]
281
+ }
282
+ ]
283
+ },
284
+ "checkout_started": {
285
+ "enrichments": [
286
+ {
287
+ "staticString": "checkout",
288
+ "outputKey": "event"
289
+ },
290
+ {
291
+ "staticString": "cart",
292
+ "outputKey": "sitetype"
293
+ }
294
+ ],
295
+ "mappings": [
296
+ {
297
+ "inputKey": "input",
298
+ "outputKey": "products",
299
+ "transforms": [
300
+ {
301
+ "expression": {
302
+ "body": "return MAP(\n input.properties.products,\n function (p)\n return {\n id = p.product_id or p.sku or '',\n name = p.name,\n price = p.price,\n qty = p.quantity,\n category = p.category,\n brand = p.brand,\n variant = p.variant\n }\n end\n)",
303
+ "lang": "lua"
304
+ }
305
+ }
306
+ ]
307
+ }
308
+ ]
309
+ },
310
+ "order_completed": {
311
+ "enrichments": [
312
+ {
313
+ "staticString": "purchased",
314
+ "outputKey": "event"
315
+ },
316
+ {
317
+ "staticString": "cart",
318
+ "outputKey": "sitetype"
319
+ }
320
+ ],
321
+ "mappings": [
322
+ {
323
+ "inputKey": "properties.order_id",
324
+ "outputKey": "ord"
325
+ },
326
+ {
327
+ "inputKey": "input",
328
+ "outputKey": "cost",
329
+ "transforms": [
330
+ {
331
+ "expression": {
332
+ "lang": "lua",
333
+ "body": "return SUM(MAP(input.properties.products, function (p) return p.price * (p.quantity or 1) end))"
334
+ }
335
+ }
336
+ ]
337
+ },
338
+ {
339
+ "inputKey": "input",
340
+ "outputKey": "qty",
341
+ "transforms": [
342
+ {
343
+ "expression": {
344
+ "lang": "lua",
345
+ "body": "return SUM(MAP(input.properties.products, function (p) return p.quantity or 1 end))"
346
+ }
347
+ }
348
+ ]
349
+ },
350
+ {
351
+ "inputKey": "properties.tax",
352
+ "outputKey": "tax"
353
+ },
354
+ {
355
+ "inputKey": "input",
356
+ "outputKey": "products",
357
+ "transforms": [
358
+ {
359
+ "expression": {
360
+ "body": "return MAP(\n input.properties.products,\n function (p)\n return {\n id = p.product_id or p.sku or '',\n name = p.name,\n price = p.price,\n qty = p.quantity,\n category = p.category,\n brand = p.brand,\n variant = p.variant\n }\n end\n)",
361
+ "lang": "lua"
362
+ }
363
+ }
364
+ ]
365
+ }
366
+ ]
367
+ }
368
+ }
369
+ }
package/README.md CHANGED
@@ -5,9 +5,13 @@ event methods, you will create a rich, actionable data set from your website, mo
5
5
  server, and other sources. It is particularly useful for tracking the pages or screens your
6
6
  users visit, the actions they take on your property, and whether the user has been identified
7
7
  previously.
8
+ ## 2025-03
9
+ - Ringier Axel Springer Poland (BETA)
10
+
8
11
  ## 2025-02
9
12
  - Amazon Data Firehose (BETA)
10
13
  - AWIN
14
+ - Button (BETA)
11
15
  - Merkle
12
16
  - Moloco Commerce Media
13
17
 
@@ -107,8 +111,10 @@ previously.
107
111
 
108
112
  | Kit Name | Date | Latest Note |
109
113
  |----------|------|-------------|
114
+ | Ringier Axel Springer Poland (BETA) | 2025-03 | Version: 0.1.0 Beta Version Ringier Axel Springer Poland initial release |
110
115
  | Amazon Data Firehose (BETA) | 2025-02 | Version: 0.1.0 Beta Version Amazon Data Firehose initial release. |
111
116
  | AWIN | 2025-02 | Version: 1.0.0 Stable release |
117
+ | Button (BETA) | 2025-02 | Version: 0.1.0 Beta Version Button initial release |
112
118
  | 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 |
113
119
  | 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 |
114
120
  | Blueshift | 2025-01 | Version: 1.0.0 Stable release |
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'),
@@ -375,6 +381,12 @@ exports['rev-jet'] = {
375
381
  metadata: require('./.dist/rev-jet/metadata.json')
376
382
  }
377
383
 
384
+ exports['ringier-axel-springer-poland'] = {
385
+ endpointSchema: require('./.dist/ringier-axel-springer-poland/connection.json'),
386
+ playbook: require('./.dist/ringier-axel-springer-poland/playbook.json'),
387
+ metadata: require('./.dist/ringier-axel-springer-poland/metadata.json')
388
+ }
389
+
378
390
  exports.roku = {
379
391
  endpointSchema: require('./.dist/roku/connection.json'),
380
392
  playbook: require('./.dist/roku/playbook.json'),
@@ -616,6 +628,11 @@ exports.etags = {
616
628
  playbook: require('./.dist/build-your-own/playbook.etag.json'),
617
629
  kit: require('./.dist/build-your-own/kit.etag.json')
618
630
  },
631
+ button: {
632
+ endpointSchema: require('./.dist/button/connection.etag.json'),
633
+ playbook: require('./.dist/button/playbook.etag.json'),
634
+ kit: require('./.dist/button/kit.etag.json')
635
+ },
619
636
  clinch: {
620
637
  endpointSchema: require('./.dist/clinch/connection.etag.json'),
621
638
  playbook: require('./.dist/clinch/playbook.etag.json'),
@@ -784,6 +801,11 @@ exports.etags = {
784
801
  playbook: require('./.dist/rev-jet/playbook.etag.json'),
785
802
  kit: require('./.dist/rev-jet/kit.etag.json')
786
803
  },
804
+ 'ringier-axel-springer-poland': {
805
+ endpointSchema: require('./.dist/ringier-axel-springer-poland/connection.etag.json'),
806
+ playbook: require('./.dist/ringier-axel-springer-poland/playbook.etag.json'),
807
+ kit: require('./.dist/ringier-axel-springer-poland/kit.etag.json')
808
+ },
787
809
  roku: {
788
810
  endpointSchema: require('./.dist/roku/connection.etag.json'),
789
811
  playbook: require('./.dist/roku/playbook.etag.json'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metarouter/ajs-starter-kit",
3
- "version": "1.0.121",
3
+ "version": "1.0.123",
4
4
  "description": "MetaRouter analytics.js starter kit",
5
5
  "main": "index.js",
6
6
  "scripts": {