@walkeros/server-destination-datamanager 2.0.0 → 2.1.0

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,7 +1,7 @@
1
1
  {
2
2
  "$meta": {
3
3
  "package": "@walkeros/server-destination-datamanager",
4
- "version": "2.0.0",
4
+ "version": "2.0.1",
5
5
  "type": "destination",
6
6
  "platform": "server"
7
7
  },
@@ -215,417 +215,214 @@
215
215
  }
216
216
  },
217
217
  "examples": {
218
- "auth": {
219
- "awsLambda": {
220
- "settings": {
221
- "credentials": {
222
- "client_email": "",
223
- "private_key": ""
218
+ "step": {
219
+ "lead": {
220
+ "in": {
221
+ "name": "form submit",
222
+ "data": {
223
+ "type": "demo-request"
224
224
  },
225
- "destinations": [
225
+ "context": {
226
+ "dev": [
227
+ "test",
228
+ 1
229
+ ]
230
+ },
231
+ "globals": {
232
+ "lang": "elb"
233
+ },
234
+ "custom": {
235
+ "completely": "random"
236
+ },
237
+ "user": {
238
+ "email": "prospect@example.com"
239
+ },
240
+ "nested": [
226
241
  {
227
- "operatingAccount": {
228
- "accountId": "123-456-7890",
229
- "accountType": "GOOGLE_ADS"
242
+ "entity": "child",
243
+ "data": {
244
+ "is": "subordinated"
230
245
  },
231
- "productDestinationId": "AW-CONVERSION-123"
246
+ "nested": [],
247
+ "context": {
248
+ "element": [
249
+ "child",
250
+ 0
251
+ ]
252
+ }
232
253
  }
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
254
  ],
245
- "destinations": [
246
- {
247
- "operatingAccount": {
248
- "accountId": "123-456-7890",
249
- "accountType": "GOOGLE_ADS"
255
+ "consent": {
256
+ "functional": true
257
+ },
258
+ "id": "1700001201-gr0up-1",
259
+ "trigger": "test",
260
+ "entity": "form",
261
+ "action": "submit",
262
+ "timestamp": 1700001201,
263
+ "timing": 3.14,
264
+ "group": "gr0up",
265
+ "count": 1,
266
+ "version": {
267
+ "source": "2.0.1",
268
+ "tagging": 1
269
+ },
270
+ "source": {
271
+ "type": "server",
272
+ "id": "",
273
+ "previous_id": ""
274
+ }
275
+ },
276
+ "mapping": {
277
+ "name": "generate_lead",
278
+ "data": {
279
+ "map": {
280
+ "eventName": {
281
+ "value": "generate_lead"
250
282
  },
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"
283
+ "conversionValue": {
284
+ "value": 10
263
285
  },
264
- "productDestinationId": "AW-CONVERSION-123"
286
+ "currency": {
287
+ "value": "USD"
288
+ }
265
289
  }
266
- ]
267
- }
268
- },
269
- "gcpCloudFunctions": {
270
- "settings": {
271
- "destinations": [
290
+ }
291
+ },
292
+ "out": {
293
+ "events": [
272
294
  {
273
- "operatingAccount": {
274
- "accountId": "123-456-7890",
275
- "accountType": "GOOGLE_ADS"
276
- },
277
- "productDestinationId": "AW-CONVERSION-123"
295
+ "transactionId": "1700001201-gr0up-1",
296
+ "eventName": "generate_lead",
297
+ "eventSource": "WEB",
298
+ "email": "prospect@example.com"
278
299
  }
279
300
  ]
280
301
  }
281
302
  },
282
- "localDevelopment": {
283
- "settings": {
284
- "keyFilename": "./service-account.json",
285
- "destinations": [
303
+ "purchase": {
304
+ "in": {
305
+ "name": "order complete",
306
+ "data": {
307
+ "id": "ORD-600",
308
+ "total": 149.99,
309
+ "currency": "EUR"
310
+ },
311
+ "context": {
312
+ "shopping": [
313
+ "complete",
314
+ 0
315
+ ]
316
+ },
317
+ "globals": {
318
+ "pagegroup": "shop"
319
+ },
320
+ "custom": {
321
+ "completely": "random"
322
+ },
323
+ "user": {
324
+ "id": "user-abc",
325
+ "email": "buyer@example.com"
326
+ },
327
+ "nested": [
286
328
  {
287
- "operatingAccount": {
288
- "accountId": "123-456-7890",
289
- "accountType": "GOOGLE_ADS"
329
+ "entity": "product",
330
+ "data": {
331
+ "id": "ers",
332
+ "name": "Everyday Ruck Snack",
333
+ "color": "black",
334
+ "size": "l",
335
+ "price": 420
290
336
  },
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": [
337
+ "context": {
338
+ "shopping": [
339
+ "complete",
340
+ 0
341
+ ]
342
+ },
343
+ "nested": []
344
+ },
305
345
  {
306
- "operatingAccount": {
307
- "accountId": "123-456-7890",
308
- "accountType": "GOOGLE_ADS"
346
+ "entity": "product",
347
+ "data": {
348
+ "id": "cc",
349
+ "name": "Cool Cap",
350
+ "size": "one size",
351
+ "price": 42
309
352
  },
310
- "productDestinationId": "AW-CONVERSION-123"
353
+ "context": {
354
+ "shopping": [
355
+ "complete",
356
+ 0
357
+ ]
358
+ },
359
+ "nested": []
311
360
  },
312
361
  {
313
- "operatingAccount": {
314
- "accountId": "987654321",
315
- "accountType": "GOOGLE_ANALYTICS_PROPERTY"
362
+ "entity": "gift",
363
+ "data": {
364
+ "name": "Surprise"
365
+ },
366
+ "context": {
367
+ "shopping": [
368
+ "complete",
369
+ 0
370
+ ]
316
371
  },
317
- "productDestinationId": "G-XXXXXXXXXX"
372
+ "nested": []
318
373
  }
319
374
  ],
320
- "batchSize": 100,
321
- "batchInterval": 5000,
322
- "validateOnly": false,
323
375
  "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"
376
+ "functional": true
332
377
  },
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"
378
+ "id": "1700001200-gr0up-1",
379
+ "trigger": "load",
380
+ "entity": "order",
381
+ "action": "complete",
382
+ "timestamp": 1700001200,
383
+ "timing": 3.14,
384
+ "group": "gr0up",
385
+ "count": 1,
386
+ "version": {
387
+ "source": "2.0.1",
388
+ "tagging": 1
370
389
  },
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
- }
390
+ "source": {
391
+ "type": "server",
392
+ "id": "",
393
+ "previous_id": ""
497
394
  }
498
395
  },
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
- }
396
+ "mapping": {
397
+ "name": "purchase",
398
+ "data": {
399
+ "map": {
400
+ "transactionId": "data.id",
401
+ "conversionValue": "data.total",
402
+ "currency": {
403
+ "key": "data.currency",
404
+ "value": "USD"
405
+ },
406
+ "eventName": {
407
+ "value": "purchase"
408
+ },
409
+ "userId": "user.id",
410
+ "email": "user.id"
514
411
  }
515
412
  }
516
413
  },
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": [
414
+ "out": {
415
+ "events": [
534
416
  {
535
- "operatingAccount": {
536
- "accountId": "123-456-7890",
537
- "accountType": "GOOGLE_ADS"
538
- },
539
- "productDestinationId": "AW-CONVERSION-123"
417
+ "transactionId": "ORD-600",
418
+ "eventName": "purchase",
419
+ "eventSource": "WEB",
420
+ "conversionValue": 149.99,
421
+ "currency": "EUR",
422
+ "userId": "user-abc",
423
+ "email": "buyer@example.com"
540
424
  }
541
425
  ]
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
426
  }
630
427
  }
631
428
  }
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": "2.0.0",
4
+ "version": "2.1.0",
5
5
  "license": "MIT",
6
6
  "exports": {
7
7
  ".": {
@@ -33,12 +33,12 @@
33
33
  "update": "npx npm-check-updates -u && npm update"
34
34
  },
35
35
  "dependencies": {
36
- "@walkeros/core": "^2.0.0",
37
- "@walkeros/server-core": "^2.0.0",
36
+ "@walkeros/core": "^2.1.0",
37
+ "@walkeros/server-core": "^2.1.0",
38
38
  "google-auth-library": "^10.5.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@walkeros/collector": "^2.0.0"
41
+ "@walkeros/collector": "^2.1.0"
42
42
  },
43
43
  "repository": {
44
44
  "url": "git+https://github.com/elbwalker/walkerOS.git",