@metarouter/ajs-starter-kit 1.0.130 → 1.0.131

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
- "7819ac44a9d64153d0fd61a2c915b561"
1
+ "578fea3d5d4f007c35921c81147ca109"
@@ -31,7 +31,7 @@
31
31
  },
32
32
  {
33
33
  "date": "2024-08-21T00:00:00.000Z",
34
- "note": "Version: 1.0.0\nAdding option to set datase creation mode to BIG_QUERY_OPTIONS_DISABLE_DATASET_CREATION\nThis will allow users to create save events without having the bigquery.datasets.create permission in their IAM role"
34
+ "note": "Version: 1.0.0\nAdding option to set dataset creation mode to BIG_QUERY_OPTIONS_DISABLE_DATASET_CREATION\nThis will allow users to create save events without having the bigquery.datasets.create permission in their IAM role"
35
35
  },
36
36
  {
37
37
  "date": "2025-01-16T00:00:00.000Z",
@@ -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,6 +5,9 @@ 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
+ - The Trade Desk - Conversions (BETA)
10
+
8
11
  ## 2025-05
9
12
  - Amazon DSP CAPI (BETA)
10
13
  - Amazon Kinesis (BETA)
@@ -119,6 +122,7 @@ previously.
119
122
 
120
123
  | Kit Name | Date | Latest Note |
121
124
  |----------|------|-------------|
125
+ | The Trade Desk - Conversions (BETA) | 2025-06 | Version: 0.1.0 Beta Version The Trade Desk - Conversions initial release |
122
126
  | Amazon DSP CAPI (BETA) | 2025-05 | Version: 0.1.0 Beta Version Amazon DSP CAPI initial release. |
123
127
  | Amazon Kinesis (BETA) | 2025-05 | Version: 0.1.0 Beta Version Amazon Kinesis initial release. |
124
128
  | Perion (BETA) | 2025-05 | Version: 0.1.0 Beta Version Perion initial release |
package/index.js CHANGED
@@ -471,6 +471,12 @@ exports['treasure-data'] = {
471
471
  metadata: require('./.dist/treasure-data/metadata.json')
472
472
  }
473
473
 
474
+ exports['ttd-conversions'] = {
475
+ endpointSchema: require('./.dist/ttd-conversions/connection.json'),
476
+ playbook: require('./.dist/ttd-conversions/playbook.json'),
477
+ metadata: require('./.dist/ttd-conversions/metadata.json')
478
+ }
479
+
474
480
  exports['twitter-conversions'] = {
475
481
  endpointSchema: require('./.dist/twitter-conversions/connection.json'),
476
482
  playbook: require('./.dist/twitter-conversions/playbook.json'),
@@ -900,6 +906,11 @@ exports.etags = {
900
906
  playbook: require('./.dist/treasure-data/playbook.etag.json'),
901
907
  kit: require('./.dist/treasure-data/kit.etag.json')
902
908
  },
909
+ 'ttd-conversions': {
910
+ endpointSchema: require('./.dist/ttd-conversions/connection.etag.json'),
911
+ playbook: require('./.dist/ttd-conversions/playbook.etag.json'),
912
+ kit: require('./.dist/ttd-conversions/kit.etag.json')
913
+ },
903
914
  'twitter-conversions': {
904
915
  endpointSchema: require('./.dist/twitter-conversions/connection.etag.json'),
905
916
  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.131",
4
4
  "description": "MetaRouter analytics.js starter kit",
5
5
  "main": "index.js",
6
6
  "scripts": {