@walkeros/server-destination-datamanager 1.0.4 → 1.0.6-next-1771252576264

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.
Files changed (2) hide show
  1. package/dist/walkerOS.json +633 -0
  2. package/package.json +16 -7
@@ -0,0 +1,633 @@
1
+ {
2
+ "$meta": {
3
+ "package": "@walkeros/server-destination-datamanager",
4
+ "version": "1.0.5",
5
+ "type": "destination",
6
+ "platform": "server"
7
+ },
8
+ "schemas": {
9
+ "mapping": {
10
+ "$schema": "http://json-schema.org/draft-07/schema#",
11
+ "type": "object",
12
+ "properties": {},
13
+ "additionalProperties": false
14
+ },
15
+ "settings": {
16
+ "$schema": "http://json-schema.org/draft-07/schema#",
17
+ "type": "object",
18
+ "properties": {
19
+ "credentials": {
20
+ "description": "Service account credentials (client_email + private_key). Recommended for serverless environments.",
21
+ "type": "object",
22
+ "properties": {
23
+ "client_email": {
24
+ "type": "string",
25
+ "format": "email",
26
+ "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
27
+ "description": "Service account email"
28
+ },
29
+ "private_key": {
30
+ "type": "string",
31
+ "minLength": 1,
32
+ "description": "Service account private key (PEM format)"
33
+ }
34
+ },
35
+ "required": [
36
+ "client_email",
37
+ "private_key"
38
+ ],
39
+ "additionalProperties": false
40
+ },
41
+ "keyFilename": {
42
+ "description": "Path to service account JSON file. For local development or environments with filesystem access.",
43
+ "type": "string"
44
+ },
45
+ "scopes": {
46
+ "description": "OAuth scopes for Data Manager API. Defaults to datamanager scope.",
47
+ "type": "array",
48
+ "items": {
49
+ "type": "string"
50
+ }
51
+ },
52
+ "destinations": {
53
+ "minItems": 1,
54
+ "maxItems": 10,
55
+ "type": "array",
56
+ "items": {
57
+ "type": "object",
58
+ "properties": {
59
+ "operatingAccount": {
60
+ "type": "object",
61
+ "properties": {
62
+ "accountId": {
63
+ "type": "string",
64
+ "minLength": 1,
65
+ "description": "Account ID (e.g., \"123-456-7890\" for Google Ads)"
66
+ },
67
+ "accountType": {
68
+ "type": "string",
69
+ "enum": [
70
+ "GOOGLE_ADS",
71
+ "DISPLAY_VIDEO_ADVERTISER",
72
+ "DISPLAY_VIDEO_PARTNER",
73
+ "GOOGLE_ANALYTICS_PROPERTY"
74
+ ],
75
+ "description": "Type of account"
76
+ }
77
+ },
78
+ "required": [
79
+ "accountId",
80
+ "accountType"
81
+ ],
82
+ "additionalProperties": false,
83
+ "description": "Operating account details"
84
+ },
85
+ "productDestinationId": {
86
+ "type": "string",
87
+ "minLength": 1,
88
+ "description": "Product-specific destination ID (conversion action or user list)"
89
+ }
90
+ },
91
+ "required": [
92
+ "operatingAccount",
93
+ "productDestinationId"
94
+ ],
95
+ "additionalProperties": false
96
+ },
97
+ "description": "Array of destination accounts and conversion actions/user lists (max 10)"
98
+ },
99
+ "eventSource": {
100
+ "default": "WEB",
101
+ "description": "Event source for all events. Defaults to WEB. Values: WEB, APP, IN_STORE, PHONE, OTHER",
102
+ "type": "string",
103
+ "enum": [
104
+ "WEB",
105
+ "APP",
106
+ "IN_STORE",
107
+ "PHONE",
108
+ "OTHER"
109
+ ]
110
+ },
111
+ "batchSize": {
112
+ "type": "integer",
113
+ "minimum": 1,
114
+ "maximum": 2000,
115
+ "description": "Maximum number of events to batch before sending (max 2000, like 100)"
116
+ },
117
+ "batchInterval": {
118
+ "type": "integer",
119
+ "minimum": 0,
120
+ "maximum": 9007199254740991,
121
+ "description": "Time in milliseconds to wait before auto-flushing batch (like 5000)"
122
+ },
123
+ "validateOnly": {
124
+ "type": "boolean",
125
+ "description": "If true, validate request without ingestion (testing mode)"
126
+ },
127
+ "url": {
128
+ "type": "string",
129
+ "format": "uri",
130
+ "description": "Override API endpoint for testing (like https://datamanager.googleapis.com/v1)"
131
+ },
132
+ "consent": {
133
+ "type": "object",
134
+ "properties": {
135
+ "adUserData": {
136
+ "type": "string",
137
+ "enum": [
138
+ "CONSENT_GRANTED",
139
+ "CONSENT_DENIED"
140
+ ],
141
+ "description": "Consent for data collection and use"
142
+ },
143
+ "adPersonalization": {
144
+ "type": "string",
145
+ "enum": [
146
+ "CONSENT_GRANTED",
147
+ "CONSENT_DENIED"
148
+ ],
149
+ "description": "Consent for ad personalization"
150
+ }
151
+ },
152
+ "additionalProperties": false,
153
+ "description": "Request-level consent for all events"
154
+ },
155
+ "testEventCode": {
156
+ "type": "string",
157
+ "description": "Test event code for debugging (like TEST12345)"
158
+ },
159
+ "logLevel": {
160
+ "type": "string",
161
+ "enum": [
162
+ "debug",
163
+ "info",
164
+ "warn",
165
+ "error",
166
+ "none"
167
+ ],
168
+ "description": "Log level for debugging (debug shows all API calls)"
169
+ },
170
+ "userData": {
171
+ "type": "object",
172
+ "propertyNames": {
173
+ "type": "string"
174
+ },
175
+ "additionalProperties": {},
176
+ "description": "Guided helper: User data mapping for all events (like { email: 'user.id', phone: 'data.phone' })"
177
+ },
178
+ "userId": {
179
+ "description": "Guided helper: First-party user ID for all events (like 'user.id')"
180
+ },
181
+ "clientId": {
182
+ "description": "Guided helper: GA4 client ID for all events (like 'user.device')"
183
+ },
184
+ "sessionAttributes": {
185
+ "description": "Guided helper: Privacy-safe attribution for all events (like 'context.sessionAttributes')"
186
+ },
187
+ "consentAdUserData": {
188
+ "anyOf": [
189
+ {
190
+ "type": "string"
191
+ },
192
+ {
193
+ "type": "boolean"
194
+ }
195
+ ],
196
+ "description": "Consent mapping: Field name from event.consent (like 'marketing') or static boolean value"
197
+ },
198
+ "consentAdPersonalization": {
199
+ "anyOf": [
200
+ {
201
+ "type": "string"
202
+ },
203
+ {
204
+ "type": "boolean"
205
+ }
206
+ ],
207
+ "description": "Consent mapping: Field name from event.consent (like 'targeting') or static boolean value"
208
+ }
209
+ },
210
+ "required": [
211
+ "destinations",
212
+ "eventSource"
213
+ ],
214
+ "additionalProperties": false
215
+ }
216
+ },
217
+ "examples": {
218
+ "auth": {
219
+ "awsLambda": {
220
+ "settings": {
221
+ "credentials": {
222
+ "client_email": "",
223
+ "private_key": ""
224
+ },
225
+ "destinations": [
226
+ {
227
+ "operatingAccount": {
228
+ "accountId": "123-456-7890",
229
+ "accountType": "GOOGLE_ADS"
230
+ },
231
+ "productDestinationId": "AW-CONVERSION-123"
232
+ }
233
+ ]
234
+ }
235
+ },
236
+ "customScopes": {
237
+ "settings": {
238
+ "credentials": {
239
+ "client_email": "",
240
+ "private_key": ""
241
+ },
242
+ "scopes": [
243
+ "https://www.googleapis.com/auth/datamanager"
244
+ ],
245
+ "destinations": [
246
+ {
247
+ "operatingAccount": {
248
+ "accountId": "123-456-7890",
249
+ "accountType": "GOOGLE_ADS"
250
+ },
251
+ "productDestinationId": "AW-CONVERSION-123"
252
+ }
253
+ ]
254
+ }
255
+ },
256
+ "dockerKubernetes": {
257
+ "settings": {
258
+ "destinations": [
259
+ {
260
+ "operatingAccount": {
261
+ "accountId": "123-456-7890",
262
+ "accountType": "GOOGLE_ADS"
263
+ },
264
+ "productDestinationId": "AW-CONVERSION-123"
265
+ }
266
+ ]
267
+ }
268
+ },
269
+ "gcpCloudFunctions": {
270
+ "settings": {
271
+ "destinations": [
272
+ {
273
+ "operatingAccount": {
274
+ "accountId": "123-456-7890",
275
+ "accountType": "GOOGLE_ADS"
276
+ },
277
+ "productDestinationId": "AW-CONVERSION-123"
278
+ }
279
+ ]
280
+ }
281
+ },
282
+ "localDevelopment": {
283
+ "settings": {
284
+ "keyFilename": "./service-account.json",
285
+ "destinations": [
286
+ {
287
+ "operatingAccount": {
288
+ "accountId": "123-456-7890",
289
+ "accountType": "GOOGLE_ADS"
290
+ },
291
+ "productDestinationId": "AW-CONVERSION-123"
292
+ }
293
+ ]
294
+ }
295
+ }
296
+ },
297
+ "basic": {
298
+ "complete": {
299
+ "settings": {
300
+ "credentials": {
301
+ "client_email": "service-account@project.iam.gserviceaccount.com",
302
+ "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
303
+ },
304
+ "destinations": [
305
+ {
306
+ "operatingAccount": {
307
+ "accountId": "123-456-7890",
308
+ "accountType": "GOOGLE_ADS"
309
+ },
310
+ "productDestinationId": "AW-CONVERSION-123"
311
+ },
312
+ {
313
+ "operatingAccount": {
314
+ "accountId": "987654321",
315
+ "accountType": "GOOGLE_ANALYTICS_PROPERTY"
316
+ },
317
+ "productDestinationId": "G-XXXXXXXXXX"
318
+ }
319
+ ],
320
+ "batchSize": 100,
321
+ "batchInterval": 5000,
322
+ "validateOnly": false,
323
+ "consent": {
324
+ "adUserData": "CONSENT_GRANTED",
325
+ "adPersonalization": "CONSENT_GRANTED"
326
+ },
327
+ "userData": {
328
+ "email": "user.id",
329
+ "phone": "data.phone",
330
+ "firstName": "data.firstName",
331
+ "lastName": "data.lastName"
332
+ },
333
+ "userId": "user.id",
334
+ "clientId": "user.device",
335
+ "sessionAttributes": "context.sessionAttributes"
336
+ }
337
+ },
338
+ "debug": {
339
+ "settings": {
340
+ "keyFilename": "./service-account.json",
341
+ "destinations": [
342
+ {
343
+ "operatingAccount": {
344
+ "accountId": "123-456-7890",
345
+ "accountType": "GOOGLE_ADS"
346
+ },
347
+ "productDestinationId": "AW-CONVERSION-123"
348
+ }
349
+ ]
350
+ }
351
+ },
352
+ "ga4": {
353
+ "settings": {
354
+ "destinations": [
355
+ {
356
+ "operatingAccount": {
357
+ "accountId": "123456789",
358
+ "accountType": "GOOGLE_ANALYTICS_PROPERTY"
359
+ },
360
+ "productDestinationId": "G-XXXXXXXXXX"
361
+ }
362
+ ]
363
+ }
364
+ },
365
+ "minimal": {
366
+ "settings": {
367
+ "credentials": {
368
+ "client_email": "service-account@project.iam.gserviceaccount.com",
369
+ "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
370
+ },
371
+ "destinations": [
372
+ {
373
+ "operatingAccount": {
374
+ "accountId": "123-456-7890",
375
+ "accountType": "GOOGLE_ADS"
376
+ },
377
+ "productDestinationId": "AW-CONVERSION-123"
378
+ }
379
+ ]
380
+ }
381
+ }
382
+ },
383
+ "mapping": {
384
+ "Lead": {
385
+ "name": "generate_lead",
386
+ "data": {
387
+ "map": {
388
+ "eventName": {
389
+ "value": "generate_lead"
390
+ },
391
+ "conversionValue": {
392
+ "value": 10
393
+ },
394
+ "currency": {
395
+ "value": "USD"
396
+ }
397
+ }
398
+ }
399
+ },
400
+ "PageView": {
401
+ "name": "page_view",
402
+ "data": {
403
+ "map": {
404
+ "eventName": {
405
+ "value": "page_view"
406
+ }
407
+ }
408
+ }
409
+ },
410
+ "Purchase": {
411
+ "name": "purchase",
412
+ "data": {
413
+ "map": {
414
+ "transactionId": "data.id",
415
+ "conversionValue": "data.total",
416
+ "currency": {
417
+ "key": "data.currency",
418
+ "value": "USD"
419
+ },
420
+ "eventName": {
421
+ "value": "purchase"
422
+ },
423
+ "userId": "user.id",
424
+ "email": "user.id",
425
+ "gclid": "context.gclid",
426
+ "gbraid": "context.gbraid",
427
+ "wbraid": "context.wbraid",
428
+ "cartData": {
429
+ "map": {
430
+ "items": {
431
+ "loop": [
432
+ "nested",
433
+ {
434
+ "condition": {
435
+ "$code": "e=>h(e)&&\"product\"===e.entity"
436
+ },
437
+ "map": {
438
+ "merchantProductId": "data.id",
439
+ "price": "data.price",
440
+ "quantity": {
441
+ "key": "data.quantity",
442
+ "value": 1
443
+ }
444
+ }
445
+ }
446
+ ]
447
+ }
448
+ }
449
+ }
450
+ }
451
+ }
452
+ },
453
+ "mapping": {
454
+ "order": {
455
+ "complete": {
456
+ "name": "purchase",
457
+ "data": {
458
+ "map": {
459
+ "transactionId": "data.id",
460
+ "conversionValue": "data.total",
461
+ "currency": {
462
+ "key": "data.currency",
463
+ "value": "USD"
464
+ },
465
+ "eventName": {
466
+ "value": "purchase"
467
+ },
468
+ "userId": "user.id",
469
+ "email": "user.id",
470
+ "gclid": "context.gclid",
471
+ "gbraid": "context.gbraid",
472
+ "wbraid": "context.wbraid",
473
+ "cartData": {
474
+ "map": {
475
+ "items": {
476
+ "loop": [
477
+ "nested",
478
+ {
479
+ "condition": {
480
+ "$code": "e=>h(e)&&\"product\"===e.entity"
481
+ },
482
+ "map": {
483
+ "merchantProductId": "data.id",
484
+ "price": "data.price",
485
+ "quantity": {
486
+ "key": "data.quantity",
487
+ "value": 1
488
+ }
489
+ }
490
+ }
491
+ ]
492
+ }
493
+ }
494
+ }
495
+ }
496
+ }
497
+ }
498
+ },
499
+ "lead": {
500
+ "submit": {
501
+ "name": "generate_lead",
502
+ "data": {
503
+ "map": {
504
+ "eventName": {
505
+ "value": "generate_lead"
506
+ },
507
+ "conversionValue": {
508
+ "value": 10
509
+ },
510
+ "currency": {
511
+ "value": "USD"
512
+ }
513
+ }
514
+ }
515
+ }
516
+ },
517
+ "page": {
518
+ "view": {
519
+ "name": "page_view",
520
+ "data": {
521
+ "map": {
522
+ "eventName": {
523
+ "value": "page_view"
524
+ }
525
+ }
526
+ }
527
+ }
528
+ }
529
+ },
530
+ "userDataMapping": {
531
+ "settings": {
532
+ "keyFilename": "./service-account.json",
533
+ "destinations": [
534
+ {
535
+ "operatingAccount": {
536
+ "accountId": "123-456-7890",
537
+ "accountType": "GOOGLE_ADS"
538
+ },
539
+ "productDestinationId": "AW-CONVERSION-123"
540
+ }
541
+ ]
542
+ },
543
+ "data": {
544
+ "map": {
545
+ "email": "user.id",
546
+ "phone": "data.phone",
547
+ "firstName": "data.firstName",
548
+ "lastName": "data.lastName",
549
+ "regionCode": "data.country",
550
+ "postalCode": "data.zip"
551
+ }
552
+ },
553
+ "mapping": {
554
+ "order": {
555
+ "complete": {
556
+ "name": "purchase",
557
+ "data": {
558
+ "map": {
559
+ "transactionId": "data.id",
560
+ "conversionValue": "data.total",
561
+ "currency": {
562
+ "key": "data.currency",
563
+ "value": "USD"
564
+ },
565
+ "eventName": {
566
+ "value": "purchase"
567
+ },
568
+ "userId": "user.id",
569
+ "email": "user.id",
570
+ "gclid": "context.gclid",
571
+ "gbraid": "context.gbraid",
572
+ "wbraid": "context.wbraid",
573
+ "cartData": {
574
+ "map": {
575
+ "items": {
576
+ "loop": [
577
+ "nested",
578
+ {
579
+ "condition": {
580
+ "$code": "e=>h(e)&&\"product\"===e.entity"
581
+ },
582
+ "map": {
583
+ "merchantProductId": "data.id",
584
+ "price": "data.price",
585
+ "quantity": {
586
+ "key": "data.quantity",
587
+ "value": 1
588
+ }
589
+ }
590
+ }
591
+ ]
592
+ }
593
+ }
594
+ }
595
+ }
596
+ }
597
+ }
598
+ },
599
+ "lead": {
600
+ "submit": {
601
+ "name": "generate_lead",
602
+ "data": {
603
+ "map": {
604
+ "eventName": {
605
+ "value": "generate_lead"
606
+ },
607
+ "conversionValue": {
608
+ "value": 10
609
+ },
610
+ "currency": {
611
+ "value": "USD"
612
+ }
613
+ }
614
+ }
615
+ }
616
+ },
617
+ "page": {
618
+ "view": {
619
+ "name": "page_view",
620
+ "data": {
621
+ "map": {
622
+ "eventName": {
623
+ "value": "page_view"
624
+ }
625
+ }
626
+ }
627
+ }
628
+ }
629
+ }
630
+ }
631
+ }
632
+ }
633
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@walkeros/server-destination-datamanager",
3
3
  "description": "Google Data Manager server destination for walkerOS",
4
- "version": "1.0.4",
4
+ "version": "1.0.6-next-1771252576264",
5
5
  "license": "MIT",
6
6
  "exports": {
7
7
  ".": {
@@ -27,16 +27,19 @@
27
27
  "build": "tsup --silent",
28
28
  "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
29
29
  "dev": "jest --watchAll --colors",
30
- "lint": "tsc && eslint \"**/*.ts*\"",
30
+ "typecheck": "tsc --noEmit",
31
+ "lint": "eslint \"**/*.ts*\"",
31
32
  "test": "jest",
32
33
  "update": "npx npm-check-updates -u && npm update"
33
34
  },
34
35
  "dependencies": {
35
- "@walkeros/core": "1.2.2",
36
- "@walkeros/server-core": "1.0.4",
36
+ "@walkeros/core": "1.4.0-next-1771252576264",
37
+ "@walkeros/server-core": "1.0.6-next-1771252576264",
37
38
  "google-auth-library": "^10.5.0"
38
39
  },
39
- "devDependencies": {},
40
+ "devDependencies": {
41
+ "@walkeros/collector": "1.3.0-next-1771252576264"
42
+ },
40
43
  "repository": {
41
44
  "url": "git+https://github.com/elbwalker/walkerOS.git",
42
45
  "directory": "packages/server/destinations/datamanager"
@@ -46,16 +49,22 @@
46
49
  "bugs": {
47
50
  "url": "https://github.com/elbwalker/walkerOS/issues"
48
51
  },
52
+ "walkerOS": {
53
+ "type": "destination",
54
+ "platform": "server"
55
+ },
49
56
  "keywords": [
50
- "walker",
51
57
  "walkerOS",
58
+ "walkerOS-destination",
52
59
  "destination",
53
60
  "server",
54
61
  "google",
55
62
  "data-manager",
63
+ "datamanager",
56
64
  "google-ads",
57
65
  "dv360",
58
- "ga4"
66
+ "ga4",
67
+ "analytics"
59
68
  ],
60
69
  "funding": [
61
70
  {