@metarouter/ajs-starter-kit 1.0.130 → 1.0.132

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
+ "9b4b6d4a47f4a376ab410c29f33d5bd7"
@@ -0,0 +1,12 @@
1
+ {
2
+ "default": {
3
+ "endpoint": "http://control.kochava.com/v1/cpi/identityLink.php",
4
+ "headers": [
5
+ {
6
+ "key": "Accept-Encoding",
7
+ "value": "application/json"
8
+ }
9
+ ],
10
+ "method": "POST"
11
+ }
12
+ }
@@ -0,0 +1 @@
1
+ "0a0a8e28c5265b6e21950435d7a04012"
@@ -0,0 +1,21 @@
1
+ {
2
+ "isDraft": false,
3
+ "isDeprecated": false,
4
+ "isBeta": true,
5
+ "friendlyName": "Kochava IdentityLink",
6
+ "description": "IdentityLink setup allows Kochava customers to manage their audience by associating an internal customer identifier with a Kochava device ID.",
7
+ "logo": "https://cdn.metarouter.io/kochava-identitylink.png",
8
+ "color": "#E6002B",
9
+ "eventSource": {
10
+ "isAndroidApp": true,
11
+ "isIosApp": true,
12
+ "isWebApp": true
13
+ },
14
+ "inputSchema": "analytics_js",
15
+ "releaseNotes": [
16
+ {
17
+ "date": "2025-06-25T21:00:00.000Z",
18
+ "note": "Version: 0.1.0\nBeta Version\nKochava IdentityLink initial release"
19
+ }
20
+ ]
21
+ }
@@ -0,0 +1 @@
1
+ "749be6a8f7c11c15483aa721aea82bf0"
@@ -0,0 +1,80 @@
1
+ {
2
+ "version": "0.1.0",
3
+ "params": [
4
+ {
5
+ "name": "KOCHAVA_APP_ID",
6
+ "exampleValue": "my-kochava-app-id"
7
+ }
8
+ ],
9
+ "default": {
10
+ "filters": [
11
+ {
12
+ "byEventNames": {
13
+ "action": "allow",
14
+ "events": [
15
+ ""
16
+ ]
17
+ }
18
+ }
19
+ ]
20
+ },
21
+ "global": {
22
+ "enrichments": [
23
+ {
24
+ "staticString": "$$KOCHAVA_APP_ID$$",
25
+ "outputKey": "kochava_app_id"
26
+ }
27
+ ],
28
+ "mappings": [
29
+ {
30
+ "inputKey": "anonymousId",
31
+ "outputKey": "kochava_device_id"
32
+ }
33
+ ]
34
+ },
35
+ "eventSpecific": {
36
+ "identify": {
37
+ "filters": [
38
+ {
39
+ "byConditions": {
40
+ "action": "allow",
41
+ "when": {
42
+ "matchesAll": {
43
+ "conditions": [
44
+ {
45
+ "inputPathExists": {
46
+ "inputPath": "userId"
47
+ }
48
+ },
49
+ {
50
+ "inputPathExists": {
51
+ "inputPath": "context.device.advertisingId"
52
+ }
53
+ }
54
+ ]
55
+ }
56
+ }
57
+ }
58
+ }
59
+ ],
60
+ "mappings": [
61
+ {
62
+ "inputKey": "userId",
63
+ "outputKey": "data.app_userid"
64
+ },
65
+ {
66
+ "inputKey": "input",
67
+ "outputKey": "device_id",
68
+ "transforms": [
69
+ {
70
+ "expression": {
71
+ "lang": "lua",
72
+ "body": "local deviceType = input.context.device.type\nif deviceType == 'ios' then\n return { idfa = input.context.device.advertisingId }\nelseif deviceType == 'android' then\n return { adid = input.context.device.advertisingId }\nend"
73
+ }
74
+ }
75
+ ]
76
+ }
77
+ ]
78
+ }
79
+ }
80
+ }
@@ -1 +1 @@
1
- "1761f606655ae5484360bd92902ed7ca"
1
+ "e832618c52a9b7a2507c48d696ffcfe9"
@@ -16,6 +16,10 @@
16
16
  {
17
17
  "date": "2025-05-21T21:00:00.000Z",
18
18
  "note": "Version: 0.1.0\nBeta Version\nPerion initial release"
19
+ },
20
+ {
21
+ "date": "2025-06-11T21:00:00.000Z",
22
+ "note": "Version: 0.2.0\nFixing product_viewed's products field"
19
23
  }
20
24
  ]
21
25
  }
@@ -1 +1 @@
1
- "ec1aa1f8a06cda6ccdcc5953ddc3bfbd"
1
+ "bda96be461602b71752f572fe4210a7b"
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.0",
2
+ "version": "0.2.0",
3
3
  "params": [
4
4
  {
5
5
  "name": "ADVERTISER_ID",
@@ -180,7 +180,7 @@
180
180
  {
181
181
  "expression": {
182
182
  "lang": "lua",
183
- "body": "local p = input.properties\nreturn {\n upc_id = p.product_id,\n sku_id = p.sku,\n product_name = p.name,\n product_category = p.category,\n quantity = p.quantity or 1,\n price = p.price,\n}"
183
+ "body": "local p = input.properties\nreturn {\n{\n upc_id = p.product_id,\n sku_id = p.sku,\n product_name = p.name,\n product_category = p.category,\n quantity = p.quantity or 1,\n price = p.price,\n }\n}"
184
184
  }
185
185
  }
186
186
  ]
@@ -0,0 +1 @@
1
+ "c4ac4a3e61c6627205813494ee2e53c3"
@@ -0,0 +1,21 @@
1
+ {
2
+ "default": {
3
+ "endpoint": "https://insight.adsrvr.org/track/realtimeconversion",
4
+ "method": "POST",
5
+ "headers": [
6
+ {
7
+ "key": "Accept-Encoding",
8
+ "value": "application/json"
9
+ },
10
+ {
11
+ "key": "Content-Type",
12
+ "value": "application/json"
13
+ }
14
+ ],
15
+ "batchSize": 1,
16
+ "transform": {
17
+ "lang": "lua",
18
+ "body": "request.body = { data = batch }\nreturn request"
19
+ }
20
+ }
21
+ }
@@ -0,0 +1 @@
1
+ "3bc9b55f90e53425fd9ea6877858768d"
@@ -0,0 +1,21 @@
1
+ {
2
+ "isDraft": false,
3
+ "isDeprecated": false,
4
+ "isBeta": true,
5
+ "friendlyName": "The Trade Desk - Conversions",
6
+ "description": "The Trade Desk is a demand-side platform (DSP) that enables advertisers to purchase and manage digital advertising campaigns across various channels, including display, video, audio, native, and connected TV.",
7
+ "logo": "https://cdn.metarouter.io/ttd-conversions.png",
8
+ "color": "#00B1E1",
9
+ "eventSource": {
10
+ "isAndroidApp": true,
11
+ "isIosApp": true,
12
+ "isWebApp": true
13
+ },
14
+ "inputSchema": "analytics_js",
15
+ "releaseNotes": [
16
+ {
17
+ "date": "2025-06-04T21:00:00.000Z",
18
+ "note": "Version: 0.1.0\nBeta Version\nThe Trade Desk - Conversions initial release"
19
+ }
20
+ ]
21
+ }
@@ -0,0 +1 @@
1
+ "37dfc341f9dd88b38ea2a20235f77132"
@@ -0,0 +1,322 @@
1
+ {
2
+ "version": "0.1.0",
3
+ "params": [
4
+ {
5
+ "name": "PIXEL_ID",
6
+ "exampleValue": "my-pixel-id"
7
+ },
8
+ {
9
+ "name": "MERCHANT_ID",
10
+ "exampleValue": "my-merchant-id",
11
+ "isOptional": true
12
+ },
13
+ {
14
+ "name": "ADVERTISER_ID",
15
+ "exampleValue": "my-advertiser-id",
16
+ "isOptional": true
17
+ }
18
+ ],
19
+ "global": {
20
+ "enrichments": [
21
+ {
22
+ "staticString": "$$MERCHANT_ID$$",
23
+ "outputKey": "merchant_id"
24
+ },
25
+ {
26
+ "staticString": "$$ADVERTISER_ID$$",
27
+ "outputKey": "adv"
28
+ },
29
+ {
30
+ "staticString": "$$PIXEL_ID$$",
31
+ "outputKey": "pixel_id"
32
+ }
33
+ ],
34
+ "mappings": [
35
+ {
36
+ "inputKey": "input",
37
+ "outputKey": "data_processing_option",
38
+ "transforms": [
39
+ {
40
+ "expression": {
41
+ "lang": "lua",
42
+ "body": "return { policies = { \"\" }, region = \"\" }"
43
+ }
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "inputKey": "context.providers.unifiedId2.uid2_id",
49
+ "outputKey": "uid2"
50
+ },
51
+ {
52
+ "inputKey": "context.providers.theTradeDesk.ttd_id",
53
+ "outputKey": "tdid"
54
+ },
55
+ {
56
+ "inputKey": "context.device.advertisingId",
57
+ "outputKey": "daid"
58
+ },
59
+ {
60
+ "inputKey": "context.ip",
61
+ "outputKey": "client_ip"
62
+ },
63
+ {
64
+ "inputKey": "context.page.url",
65
+ "outputKey": "referrer_url"
66
+ },
67
+ {
68
+ "inputKey": "input",
69
+ "outputKey": "city",
70
+ "transforms": [
71
+ {
72
+ "expression": {
73
+ "lang": "lua",
74
+ "body": "local city = input.traits.address.city or input.context.traits.address.city\nif (city) then return city end"
75
+ }
76
+ }
77
+ ]
78
+ },
79
+ {
80
+ "inputKey": "input",
81
+ "outputKey": "region",
82
+ "transforms": [
83
+ {
84
+ "expression": {
85
+ "lang": "lua",
86
+ "body": "local state = input.traits.address.state or input.context.traits.address.state\nif (state) then return state end"
87
+ }
88
+ }
89
+ ]
90
+ },
91
+ {
92
+ "inputKey": "input",
93
+ "outputKey": "zip",
94
+ "transforms": [
95
+ {
96
+ "expression": {
97
+ "lang": "lua",
98
+ "body": "local postalCode = input.traits.address.postalCode or input.context.traits.address.postalCode\nif (postalCode) then return postalCode end"
99
+ }
100
+ }
101
+ ]
102
+ },
103
+ {
104
+ "inputKey": "input",
105
+ "outputKey": "country",
106
+ "transforms": [
107
+ {
108
+ "expression": {
109
+ "lang": "lua",
110
+ "body": "local country = input.traits.address.country or input.context.traits.address.country\nif (country) then return country end"
111
+ }
112
+ }
113
+ ]
114
+ }
115
+ ],
116
+ "expressions": [
117
+ {
118
+ "lang": "lua",
119
+ "body": "local result = {}\n\n-- advertisindId\nif input.context.device.type == 'android' then\n result.idfa = input.context.device.advertisingId\nelseif input.context.device.type == 'ios' then\n result.aaid = input.context.device.advertisingId\nend\n\n-- adid\nif input.context.providers.unifiedId2.uid2_id then\n result.adid = input.context.providers.unifiedId2.uid2_id\n result.adid_type = \"UID2\"\nelseif input.context.providers.theTradeDesk.ttd_id then\n result.adid = input.context.providers.theTradeDesk.ttd_id\n result.adid_type = \"TDID\"\nend\n\nreturn result"
120
+ }
121
+ ]
122
+ },
123
+ "default": {
124
+ "filters": [
125
+ {
126
+ "byEventNames": {
127
+ "action": "allow",
128
+ "events": [
129
+ ""
130
+ ]
131
+ }
132
+ }
133
+ ]
134
+ },
135
+ "eventSpecific": {
136
+ "screen": {
137
+ "enrichments": [
138
+ {
139
+ "staticString": "sitevisit",
140
+ "outputKey": "event_name"
141
+ }
142
+ ]
143
+ },
144
+ "page": {
145
+ "enrichments": [
146
+ {
147
+ "staticString": "sitevisit",
148
+ "outputKey": "event_name"
149
+ }
150
+ ]
151
+ },
152
+ "products_searched": {
153
+ "enrichments": [
154
+ {
155
+ "staticString": "searchcategory",
156
+ "outputKey": "event_name"
157
+ }
158
+ ]
159
+ },
160
+ "product_viewed": {
161
+ "enrichments": [
162
+ {
163
+ "staticString": "viewitem",
164
+ "outputKey": "event_name"
165
+ }
166
+ ],
167
+ "mappings": [
168
+ {
169
+ "inputKey": "input",
170
+ "outputKey": "items",
171
+ "transforms": [
172
+ {
173
+ "expression": {
174
+ "lang": "lua",
175
+ "body": "local p = input.properties\nreturn {\n{\n item_code = p.product_id or p.sku,\n name = p.name,\n qty = p.quantity or 1,\n price = p.price,\n cat = p.category,\n}\n}"
176
+ }
177
+ }
178
+ ]
179
+ }
180
+ ]
181
+ },
182
+ "product_added": {
183
+ "enrichments": [
184
+ {
185
+ "staticString": "addtocart",
186
+ "outputKey": "event_name"
187
+ }
188
+ ],
189
+ "mappings": [
190
+ {
191
+ "inputKey": "input",
192
+ "outputKey": "items",
193
+ "transforms": [
194
+ {
195
+ "expression": {
196
+ "lang": "lua",
197
+ "body": "local p = input.properties\nreturn {\n{\n item_code = p.product_id or p.sku,\n name = p.name,\n qty = p.quantity or 1,\n price = p.price,\n cat = p.category,\n}\n}"
198
+ }
199
+ }
200
+ ]
201
+ }
202
+ ]
203
+ },
204
+ "cart_viewed": {
205
+ "enrichments": [
206
+ {
207
+ "staticString": "viewcart",
208
+ "outputKey": "event_name"
209
+ }
210
+ ],
211
+ "mappings": [
212
+ {
213
+ "inputKey": "input",
214
+ "outputKey": "items",
215
+ "transforms": [
216
+ {
217
+ "expression": {
218
+ "lang": "lua",
219
+ "body": "return MAP(input.properties.products, function(p)\n return {\n item_code = p.product_id or p.sku,\n name = p.name,\n qty = p.quantity or 1,\n price = p.price,\n cat = p.category,\n }\nend)"
220
+ }
221
+ }
222
+ ]
223
+ }
224
+ ]
225
+ },
226
+ "checkout_started": {
227
+ "enrichments": [
228
+ {
229
+ "staticString": "startcheckout",
230
+ "outputKey": "event_name"
231
+ }
232
+ ],
233
+ "mappings": [
234
+ {
235
+ "inputKey": "properties.order_id",
236
+ "outputKey": "order_id"
237
+ },
238
+ {
239
+ "inputKey": "input",
240
+ "outputKey": "items",
241
+ "transforms": [
242
+ {
243
+ "expression": {
244
+ "lang": "lua",
245
+ "body": "return MAP(input.properties.products, function(p)\n return {\n item_code = p.product_id or p.sku,\n name = p.name,\n qty = p.quantity or 1,\n price = p.price,\n cat = p.category,\n }\nend)"
246
+ }
247
+ }
248
+ ]
249
+ }
250
+ ]
251
+ },
252
+ "order_completed": {
253
+ "enrichments": [
254
+ {
255
+ "staticString": "purchase",
256
+ "outputKey": "event_name"
257
+ }
258
+ ],
259
+ "mappings": [
260
+ {
261
+ "inputKey": "properties.order_id",
262
+ "outputKey": "order_id"
263
+ },
264
+ {
265
+ "inputKey": "properties.currency",
266
+ "outputKey": "currency",
267
+ "transforms": [
268
+ {
269
+ "modifyString": "uppercase"
270
+ }
271
+ ]
272
+ },
273
+ {
274
+ "inputKey": "input",
275
+ "outputKey": "value",
276
+ "transforms": [
277
+ {
278
+ "expression": {
279
+ "lang": "lua",
280
+ "body": "local value = input.properties.revenue or input.properties.total\nreturn TO_TRUNCATED_FLOAT(value, 2)"
281
+ }
282
+ }
283
+ ]
284
+ },
285
+ {
286
+ "inputKey": "input",
287
+ "outputKey": "items",
288
+ "transforms": [
289
+ {
290
+ "expression": {
291
+ "lang": "lua",
292
+ "body": "return MAP(input.properties.products, function(p)\n return {\n item_code = p.product_id or p.sku,\n name = p.name,\n qty = p.quantity or 1,\n price = p.price,\n cat = p.category,\n }\nend)"
293
+ }
294
+ }
295
+ ]
296
+ }
297
+ ]
298
+ },
299
+ "product_added_to_wishlist": {
300
+ "enrichments": [
301
+ {
302
+ "staticString": "wishlistitem",
303
+ "outputKey": "event_name"
304
+ }
305
+ ],
306
+ "mappings": [
307
+ {
308
+ "inputKey": "input",
309
+ "outputKey": "items",
310
+ "transforms": [
311
+ {
312
+ "expression": {
313
+ "lang": "lua",
314
+ "body": "local p = input.properties\nreturn {\n{\n item_code = p.product_id or p.sku,\n name = p.name,\n qty = p.quantity or 1,\n price = p.price,\n cat = p.category,\n}\n}"
315
+ }
316
+ }
317
+ ]
318
+ }
319
+ ]
320
+ }
321
+ }
322
+ }
package/README.md CHANGED
@@ -5,10 +5,15 @@ 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-06
9
+ - Kochava (BETA)
10
+ - Kochava IdentityLink (BETA)
11
+ - Perion (BETA)
12
+ - The Trade Desk - Conversions (BETA)
13
+
8
14
  ## 2025-05
9
15
  - Amazon DSP CAPI (BETA)
10
16
  - Amazon Kinesis (BETA)
11
- - Perion (BETA)
12
17
  - TheTradeDesk Conversion Events
13
18
 
14
19
  ## 2025-04
@@ -68,7 +73,6 @@ previously.
68
73
  - HubSpot (BETA)
69
74
  - Impact Radius
70
75
  - InMarket (BETA)
71
- - Kochava (BETA)
72
76
  - Lytics
73
77
  - Magellan AI
74
78
  - MIQ (Xandr) (BETA)
@@ -119,9 +123,12 @@ previously.
119
123
 
120
124
  | Kit Name | Date | Latest Note |
121
125
  |----------|------|-------------|
126
+ | Kochava (BETA) | 2025-06 | Version: 0.1.0 Beta Version Kochava non-identify initial release Moved the identify event to its dedicated starter-kit: kochava-identitylink |
127
+ | Kochava IdentityLink (BETA) | 2025-06 | Version: 0.1.0 Beta Version Kochava IdentityLink initial release |
128
+ | Perion (BETA) | 2025-06 | Version: 0.2.0 Fixing product_viewed's products field |
129
+ | The Trade Desk - Conversions (BETA) | 2025-06 | Version: 0.1.0 Beta Version The Trade Desk - Conversions initial release |
122
130
  | Amazon DSP CAPI (BETA) | 2025-05 | Version: 0.1.0 Beta Version Amazon DSP CAPI initial release. |
123
131
  | Amazon Kinesis (BETA) | 2025-05 | Version: 0.1.0 Beta Version Amazon Kinesis initial release. |
124
- | Perion (BETA) | 2025-05 | Version: 0.1.0 Beta Version Perion initial release |
125
132
  | TheTradeDesk Conversion Events | 2025-05 | Version: 1.2.0 Deprecated |
126
133
  | Amazon Data Firehose | 2025-04 | Version: 1.0.0 Stable release |
127
134
  | Meta CAPI | 2025-04 | Version: 1.5.0 Friendly name updated |
@@ -167,7 +174,6 @@ previously.
167
174
  | HubSpot (BETA) | 2024-10 | Version: 0.3.0 Added header `Accept-Encoding: application/json` |
168
175
  | Impact Radius | 2024-10 | Version: 1.2.0 Added header `Accept-Encoding: application/json` |
169
176
  | InMarket (BETA) | 2024-10 | Version: 0.2.0 Added header `Accept-Encoding: application/json` |
170
- | Kochava (BETA) | 2024-10 | Version: 0.3.0 Added header `Accept-Encoding: application/json` |
171
177
  | Lytics | 2024-10 | Version: 1.1.0 Added header `Accept-Encoding: application/json` |
172
178
  | Magellan AI | 2024-10 | Version: 1.1.0 Added header `Accept-Encoding: application/json` |
173
179
  | MIQ (Xandr) (BETA) | 2024-10 | Version: 0.2.0 Added header `Accept-Encoding: application/json` |
package/index.js CHANGED
@@ -291,6 +291,12 @@ exports.kochava = {
291
291
  metadata: require('./.dist/kochava/metadata.json')
292
292
  }
293
293
 
294
+ exports['kochava-identitylink'] = {
295
+ endpointSchema: require('./.dist/kochava-identitylink/connection.json'),
296
+ playbook: require('./.dist/kochava-identitylink/playbook.json'),
297
+ metadata: require('./.dist/kochava-identitylink/metadata.json')
298
+ }
299
+
294
300
  exports.lytics = {
295
301
  endpointSchema: require('./.dist/lytics/connection.json'),
296
302
  playbook: require('./.dist/lytics/playbook.json'),
@@ -471,6 +477,12 @@ exports['treasure-data'] = {
471
477
  metadata: require('./.dist/treasure-data/metadata.json')
472
478
  }
473
479
 
480
+ exports['ttd-conversions'] = {
481
+ endpointSchema: require('./.dist/ttd-conversions/connection.json'),
482
+ playbook: require('./.dist/ttd-conversions/playbook.json'),
483
+ metadata: require('./.dist/ttd-conversions/metadata.json')
484
+ }
485
+
474
486
  exports['twitter-conversions'] = {
475
487
  endpointSchema: require('./.dist/twitter-conversions/connection.json'),
476
488
  playbook: require('./.dist/twitter-conversions/playbook.json'),
@@ -747,9 +759,15 @@ exports.etags = {
747
759
  kit: require('./.dist/in-market/kit.etag.json')
748
760
  },
749
761
  kochava: {
762
+ endpointSchema: require('./.dist/kochava/connection.etag.json'),
750
763
  playbook: require('./.dist/kochava/playbook.etag.json'),
751
764
  kit: require('./.dist/kochava/kit.etag.json')
752
765
  },
766
+ 'kochava-identitylink': {
767
+ endpointSchema: require('./.dist/kochava-identitylink/connection.etag.json'),
768
+ playbook: require('./.dist/kochava-identitylink/playbook.etag.json'),
769
+ kit: require('./.dist/kochava-identitylink/kit.etag.json')
770
+ },
753
771
  lytics: {
754
772
  endpointSchema: require('./.dist/lytics/connection.etag.json'),
755
773
  playbook: require('./.dist/lytics/playbook.etag.json'),
@@ -900,6 +918,11 @@ exports.etags = {
900
918
  playbook: require('./.dist/treasure-data/playbook.etag.json'),
901
919
  kit: require('./.dist/treasure-data/kit.etag.json')
902
920
  },
921
+ 'ttd-conversions': {
922
+ endpointSchema: require('./.dist/ttd-conversions/connection.etag.json'),
923
+ playbook: require('./.dist/ttd-conversions/playbook.etag.json'),
924
+ kit: require('./.dist/ttd-conversions/kit.etag.json')
925
+ },
903
926
  'twitter-conversions': {
904
927
  endpointSchema: require('./.dist/twitter-conversions/connection.etag.json'),
905
928
  playbook: require('./.dist/twitter-conversions/playbook.etag.json'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metarouter/ajs-starter-kit",
3
- "version": "1.0.130",
3
+ "version": "1.0.132",
4
4
  "description": "MetaRouter analytics.js starter kit",
5
5
  "main": "index.js",
6
6
  "scripts": {