@metarouter/ajs-starter-kit 1.0.137 → 1.0.138

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "d7e53a0f91882f40fb16567a2529f5cf"
1
+ "aad74f62245d125e040dd16dcaaa0790"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "isDraft": false,
3
3
  "isDeprecated": false,
4
- "isBeta": true,
4
+ "isBeta": false,
5
5
  "friendlyName": "Amazon DSP CAPI",
6
6
  "description": "Amazon DSP is a programmatic advertising solution that allows advertisers to purchase video, audio, and display ad placements both on Amazon-owned properties and across a network of third-party sites and apps.",
7
7
  "logo": "https://cdn.metarouter.io/amazon-dsp-capi.png",
@@ -24,6 +24,10 @@
24
24
  {
25
25
  "date": "2025-07-30T00:00:00.000Z",
26
26
  "note": "Version: 0.3.0\nRely on traits.email or userId for getting user\\'s email\nKeep the value and currencyCode mappings only for order_completed events."
27
+ },
28
+ {
29
+ "date": "2025-08-13T21:00:00.000Z",
30
+ "note": "Version: 1.0.0\nStable Release"
27
31
  }
28
32
  ]
29
33
  }
@@ -1 +1 @@
1
- "3b2e2443fd6f530b191b5df34934bdca"
1
+ "e9d5bdeffd8acb0cf49fa6014838d3b4"
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.3.0",
2
+ "version": "1.0.0",
3
3
  "global": {
4
4
  "filters": [
5
5
  {
@@ -1 +1 @@
1
- "d6f6b7b8fca30f62d7a226ddc870705b"
1
+ "619ec2b58f0719be26031a692a1d12bc"
@@ -68,6 +68,10 @@
68
68
  {
69
69
  "date": "2025-07-30T00:00:00.000Z",
70
70
  "note": "Version: 1.6.0\nReplaced context.traits with traits."
71
+ },
72
+ {
73
+ "date": "2025-08-06T00:00:00.000Z",
74
+ "note": "Version: 1.7.0\nUpdated event_time key mapping"
71
75
  }
72
76
  ]
73
77
  }
@@ -1 +1 @@
1
- "961a86cb2606dab7cf6981a944d84a47"
1
+ "dd864246e70be5a1140cc862ab0c9a40"
@@ -1,12 +1,6 @@
1
1
  {
2
- "version": "1.6.0",
2
+ "version": "1.7.0",
3
3
  "global": {
4
- "enrichments": [
5
- {
6
- "timestamp": "seconds",
7
- "outputKey": "event_time"
8
- }
9
- ],
10
4
  "mappings": [
11
5
  {
12
6
  "inputKey": "input",
@@ -20,6 +14,18 @@
20
14
  }
21
15
  ]
22
16
  },
17
+ {
18
+ "inputKey": "input",
19
+ "outputKey": "event_time",
20
+ "transforms": [
21
+ {
22
+ "expression": {
23
+ "body": "return SECONDS_SINCE_EPOCH_FROM_RFC3999(TO_DATE_TIME(input.timestamp or input.originalTimestamp or input.sentAt))",
24
+ "lang": "lua"
25
+ }
26
+ }
27
+ ]
28
+ },
23
29
  {
24
30
  "inputKey": "context.device.adTrackingEnabled",
25
31
  "outputKey": "app_data.advertiser_tracking_enabled"
@@ -1 +1 @@
1
- "a8fa714b7e476eca7287ce1d5ac45420"
1
+ "37449feac351ed1f06a38a8ca0213f8a"
@@ -1 +1 @@
1
- "47422464f5e346c63c1407114e0940a0"
1
+ "8005eee559b182561192d51f160b09be"
@@ -12,7 +12,7 @@
12
12
  {
13
13
  "name": "LINKEDIN_VERSION",
14
14
  "exampleValue": "my-linkedin-version",
15
- "defaultValue": "202506"
15
+ "defaultValue": "202507"
16
16
  }
17
17
  ],
18
18
  "default": {
@@ -1 +1 @@
1
- "ffdccfc008c0b62616dca56ad0b20abe"
1
+ "a61afd69a0c1387f2bd92d286467984d"
@@ -20,6 +20,10 @@
20
20
  {
21
21
  "date": "2025-07-30T00:00:00.000Z",
22
22
  "note": "Version: 0.2.0\nReplaced context.traits with traits."
23
+ },
24
+ {
25
+ "date": "2025-08-13T00:00:00.000Z",
26
+ "note": "Version: 0.3.0\nReplaced enrichment with Lua mapping, defaulted currency to 'USD'."
23
27
  }
24
28
  ]
25
29
  }
@@ -1 +1 @@
1
- "d7a3c8403f33e3967b10dbe2b8cd8860"
1
+ "e8d652e89e98a774b038de7c7d0212e8"
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.2.0",
2
+ "version": "0.3.0",
3
3
  "default": {
4
4
  "filters": [
5
5
  {
@@ -78,29 +78,51 @@
78
78
  },
79
79
  "eventSpecific": {
80
80
  "identify": {
81
- "enrichments": [
81
+ "mappings": [
82
82
  {
83
- "staticString": "ADD_CONVERSION_URN_HERE",
84
- "outputKey": "conversion"
83
+ "inputKey": "input",
84
+ "outputKey": "conversion",
85
+ "transforms": [
86
+ {
87
+ "expression": {
88
+ "lang": "lua",
89
+ "body": "local conversionId = 'ADD_CONVERSION_ID_HERE'\nreturn 'urn:lla:llaPartnerConversion:' .. conversionId"
90
+ }
91
+ }
92
+ ]
85
93
  }
86
94
  ]
87
95
  },
88
96
  "page": {
89
- "enrichments": [
97
+ "mappings": [
90
98
  {
91
- "staticString": "ADD_CONVERSION_URN_HERE",
92
- "outputKey": "conversion"
99
+ "inputKey": "input",
100
+ "outputKey": "conversion",
101
+ "transforms": [
102
+ {
103
+ "expression": {
104
+ "lang": "lua",
105
+ "body": "local conversionId = 'ADD_CONVERSION_ID_HERE'\nreturn 'urn:lla:llaPartnerConversion:' .. conversionId"
106
+ }
107
+ }
108
+ ]
93
109
  }
94
110
  ]
95
111
  },
96
112
  "checkout_started": {
97
- "enrichments": [
98
- {
99
- "staticString": "ADD_CONVERSION_URN_HERE",
100
- "outputKey": "conversion"
101
- }
102
- ],
103
113
  "mappings": [
114
+ {
115
+ "inputKey": "input",
116
+ "outputKey": "conversion",
117
+ "transforms": [
118
+ {
119
+ "expression": {
120
+ "lang": "lua",
121
+ "body": "local conversionId = 'ADD_CONVERSION_ID_HERE'\nreturn 'urn:lla:llaPartnerConversion:' .. conversionId"
122
+ }
123
+ }
124
+ ]
125
+ },
104
126
  {
105
127
  "inputKey": "input",
106
128
  "outputKey": "conversionValue",
@@ -108,7 +130,7 @@
108
130
  {
109
131
  "expression": {
110
132
  "lang": "lua",
111
- "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"
133
+ "body": "return { currencyCode = UPPER(input.properties.currency) or 'USD',\n amount = TO_STRING(TOTAL_VALUE(input.properties.products))\n}"
112
134
  }
113
135
  }
114
136
  ]
@@ -116,13 +138,19 @@
116
138
  ]
117
139
  },
118
140
  "order_completed": {
119
- "enrichments": [
120
- {
121
- "staticString": "ADD_CONVERSION_URN_HERE",
122
- "outputKey": "conversion"
123
- }
124
- ],
125
141
  "mappings": [
142
+ {
143
+ "inputKey": "input",
144
+ "outputKey": "conversion",
145
+ "transforms": [
146
+ {
147
+ "expression": {
148
+ "lang": "lua",
149
+ "body": "local conversionId = 'ADD_CONVERSION_ID_HERE'\nreturn 'urn:lla:llaPartnerConversion:' .. conversionId"
150
+ }
151
+ }
152
+ ]
153
+ },
126
154
  {
127
155
  "inputKey": "input",
128
156
  "outputKey": "conversionValue",
@@ -130,7 +158,7 @@
130
158
  {
131
159
  "expression": {
132
160
  "lang": "lua",
133
- "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"
161
+ "body": "return { currencyCode = UPPER(input.properties.currency) or 'USD',\n amount = TO_STRING(TOTAL_VALUE(input.properties.products))\n}"
134
162
  }
135
163
  }
136
164
  ]
@@ -138,21 +166,35 @@
138
166
  ]
139
167
  },
140
168
  "payment_info_entered": {
141
- "enrichments": [
169
+ "mappings": [
142
170
  {
143
- "staticString": "ADD_CONVERSION_URN_HERE",
144
- "outputKey": "conversion"
171
+ "inputKey": "input",
172
+ "outputKey": "conversion",
173
+ "transforms": [
174
+ {
175
+ "expression": {
176
+ "lang": "lua",
177
+ "body": "local conversionId = 'ADD_CONVERSION_ID_HERE'\nreturn 'urn:lla:llaPartnerConversion:' .. conversionId"
178
+ }
179
+ }
180
+ ]
145
181
  }
146
182
  ]
147
183
  },
148
184
  "product_added": {
149
- "enrichments": [
150
- {
151
- "staticString": "ADD_CONVERSION_URN_HERE",
152
- "outputKey": "conversion"
153
- }
154
- ],
155
185
  "mappings": [
186
+ {
187
+ "inputKey": "input",
188
+ "outputKey": "conversion",
189
+ "transforms": [
190
+ {
191
+ "expression": {
192
+ "lang": "lua",
193
+ "body": "local conversionId = 'ADD_CONVERSION_ID_HERE'\nreturn 'urn:lla:llaPartnerConversion:' .. conversionId"
194
+ }
195
+ }
196
+ ]
197
+ },
156
198
  {
157
199
  "inputKey": "input",
158
200
  "outputKey": "conversionValue",
@@ -160,7 +202,7 @@
160
202
  {
161
203
  "expression": {
162
204
  "lang": "lua",
163
- "body": "return { currencyCode = UPPER(input.properties.currency),\n amount = TO_STRING(TOTAL_VALUE(input.properties))\n}"
205
+ "body": "return { currencyCode = UPPER(input.properties.currency) or 'USD',\n amount = TO_STRING(TOTAL_VALUE(input.properties))\n}"
164
206
  }
165
207
  }
166
208
  ]
@@ -168,13 +210,19 @@
168
210
  ]
169
211
  },
170
212
  "product_viewed": {
171
- "enrichments": [
172
- {
173
- "staticString": "ADD_CONVERSION_URN_HERE",
174
- "outputKey": "conversion"
175
- }
176
- ],
177
213
  "mappings": [
214
+ {
215
+ "inputKey": "input",
216
+ "outputKey": "conversion",
217
+ "transforms": [
218
+ {
219
+ "expression": {
220
+ "lang": "lua",
221
+ "body": "local conversionId = 'ADD_CONVERSION_ID_HERE'\nreturn 'urn:lla:llaPartnerConversion:' .. conversionId"
222
+ }
223
+ }
224
+ ]
225
+ },
178
226
  {
179
227
  "inputKey": "input",
180
228
  "outputKey": "conversionValue",
@@ -182,7 +230,7 @@
182
230
  {
183
231
  "expression": {
184
232
  "lang": "lua",
185
- "body": "return { currencyCode = UPPER(input.properties.currency),\n amount = TO_STRING(TOTAL_VALUE(input.properties))\n}"
233
+ "body": "return { currencyCode = UPPER(input.properties.currency) or 'USD',\n amount = TO_STRING(TOTAL_VALUE(input.properties))\n}"
186
234
  }
187
235
  }
188
236
  ]
@@ -190,18 +238,34 @@
190
238
  ]
191
239
  },
192
240
  "products_searched": {
193
- "enrichments": [
241
+ "mappings": [
194
242
  {
195
- "staticString": "ADD_CONVERSION_URN_HERE",
196
- "outputKey": "conversion"
243
+ "inputKey": "input",
244
+ "outputKey": "conversion",
245
+ "transforms": [
246
+ {
247
+ "expression": {
248
+ "lang": "lua",
249
+ "body": "local conversionId = 'ADD_CONVERSION_ID_HERE'\nreturn 'urn:lla:llaPartnerConversion:' .. conversionId"
250
+ }
251
+ }
252
+ ]
197
253
  }
198
254
  ]
199
255
  },
200
256
  "promotion_clicked": {
201
- "enrichments": [
257
+ "mappings": [
202
258
  {
203
- "staticString": "ADD_CONVERSION_URN_HERE",
204
- "outputKey": "conversion"
259
+ "inputKey": "input",
260
+ "outputKey": "conversion",
261
+ "transforms": [
262
+ {
263
+ "expression": {
264
+ "lang": "lua",
265
+ "body": "local conversionId = 'ADD_CONVERSION_ID_HERE'\nreturn 'urn:lla:llaPartnerConversion:' .. conversionId"
266
+ }
267
+ }
268
+ ]
205
269
  }
206
270
  ]
207
271
  }
@@ -1 +1 @@
1
- "98491ef4042eecbc4503c1e4fdb466a3"
1
+ "9ec2080f812483d192d62630f99ee0cd"
@@ -1 +1 @@
1
- "e2df7bedb7400b081ab39d8363796ac9"
1
+ "e75f56621369952587c7a59369360e6b"
package/README.md CHANGED
@@ -5,19 +5,21 @@ 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-08
9
+ - Amazon DSP CAPI
10
+ - Meta CAPI
11
+ - Linkedin Ads - Conversions (BETA)
12
+
8
13
  ## 2025-07
9
14
  - ActionIQ
10
15
  - Adobe Experience Platform - Interact (BETA)
11
- - Amazon DSP CAPI (BETA)
12
16
  - Microsoft Advertising (BETA)
13
17
  - Blueshift
14
18
  - Button
15
19
  - Clinch
16
20
  - Commission Junction
17
21
  - Criteo
18
- - Meta CAPI
19
22
  - HubSpot (BETA)
20
- - Linkedin Ads - Conversions (BETA)
21
23
  - Magellan AI
22
24
  - Merkle
23
25
  - Microsoft Ads
@@ -128,18 +130,18 @@ previously.
128
130
 
129
131
  | Kit Name | Date | Latest Note |
130
132
  |----------|------|-------------|
133
+ | Amazon DSP CAPI | 2025-08 | Version: 1.0.0 Stable Release |
134
+ | Meta CAPI | 2025-08 | Version: 1.7.0 Updated event_time key mapping |
135
+ | Linkedin Ads - Conversions (BETA) | 2025-08 | Version: 0.3.0 Replaced enrichment with Lua mapping, defaulted currency to 'USD'. |
131
136
  | ActionIQ | 2025-07 | Version: 1.3.0 Updated Lua timestamp fallback logic to use input.timestamp |
132
137
  | Adobe Experience Platform - Interact (BETA) | 2025-07 | Version: 0.8.0 Replaced context.traits with traits. |
133
- | Amazon DSP CAPI (BETA) | 2025-07 | Version: 0.3.0 Rely on traits.email or userId for getting user\'s email Keep the value and currencyCode mappings only for order_completed events. |
134
138
  | Microsoft Advertising (BETA) | 2025-07 | Version: 0.3.0 TABLE_SLICE custom function usage. |
135
139
  | Blueshift | 2025-07 | Version: 1.1.0 Replaced context.traits with traits. |
136
140
  | Button | 2025-07 | Version: 1.1.0 Replaced context.traits with traits. |
137
141
  | Clinch | 2025-07 | Version: 1.3.0 Replaced context.traits with traits. |
138
142
  | Commission Junction | 2025-07 | Version: 1.3.0 Replaced originalTimestamp with timestamp |
139
143
  | Criteo | 2025-07 | Endpoint updated to `https://sslwidget.criteo.com/s2s/v2/event` |
140
- | Meta CAPI | 2025-07 | Version: 1.6.0 Replaced context.traits with traits. |
141
144
  | HubSpot (BETA) | 2025-07 | Version: 0.4.0 Replaced context.traits with traits. |
142
- | Linkedin Ads - Conversions (BETA) | 2025-07 | Version: 0.2.0 Replaced context.traits with traits. |
143
145
  | Magellan AI | 2025-07 | Version: 1.2.0 Replaced context.traits with traits. |
144
146
  | Merkle | 2025-07 | Version: 1.3.0 Replaced context.traits with traits. |
145
147
  | Microsoft Ads | 2025-07 | Version: 1.1.0 Replaced context.traits with traits. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metarouter/ajs-starter-kit",
3
- "version": "1.0.137",
3
+ "version": "1.0.138",
4
4
  "description": "MetaRouter analytics.js starter kit",
5
5
  "main": "index.js",
6
6
  "scripts": {