@walkeros/web-destination-gtag 3.4.0 → 3.4.1

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.
@@ -78,9 +78,12 @@ declare const gtmDataLayerPush: Flow.StepExample;
78
78
  */
79
79
  declare const consentModeV2: Flow.StepExample;
80
80
  /**
81
- * GA4 event with include: ['all'] — flattens all event sections as prefixed params.
82
- * Each section (data, context, globals, user, source, event, version)
83
- * is flattened into params like data_*, context_*, user_*, etc.
81
+ * GA4 event flattening selected event sections into prefixed params.
82
+ * Each listed section (data, context, globals, user, source, event) is
83
+ * flattened into params like data_*, context_*, user_*, etc.
84
+ * The `version` section is intentionally omitted — version_source is baked
85
+ * in at build time from @walkeros/core's package.json, so asserting on it
86
+ * would couple the fixture to the release version.
84
87
  */
85
88
  declare const ga4WithIncludeAll: Flow.StepExample;
86
89
  /**
@@ -78,9 +78,12 @@ declare const gtmDataLayerPush: Flow.StepExample;
78
78
  */
79
79
  declare const consentModeV2: Flow.StepExample;
80
80
  /**
81
- * GA4 event with include: ['all'] — flattens all event sections as prefixed params.
82
- * Each section (data, context, globals, user, source, event, version)
83
- * is flattened into params like data_*, context_*, user_*, etc.
81
+ * GA4 event flattening selected event sections into prefixed params.
82
+ * Each listed section (data, context, globals, user, source, event) is
83
+ * flattened into params like data_*, context_*, user_*, etc.
84
+ * The `version` section is intentionally omitted — version_source is baked
85
+ * in at build time from @walkeros/core's package.json, so asserting on it
86
+ * would couple the fixture to the release version.
84
87
  */
85
88
  declare const ga4WithIncludeAll: Flow.StepExample;
86
89
  /**
@@ -115,7 +115,7 @@ function Q(e2) {
115
115
  }
116
116
  function fe(e2 = {}) {
117
117
  var _a;
118
- const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = e2.group || "gr0up", o = e2.count || 1, r = L({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${t}-${n}-${o}`, trigger: "test", entity: "entity", action: "action", timestamp: t, timing: 3.14, group: n, count: o, version: { source: "3.4.0", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
118
+ const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = e2.group || "gr0up", o = e2.count || 1, r = L({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${t}-${n}-${o}`, trigger: "test", entity: "entity", action: "action", timestamp: t, timing: 3.14, group: n, count: o, version: { source: "3.4.1", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
119
119
  if (e2.name) {
120
120
  const [t2, n2] = (_a = e2.name.split(" ")) != null ? _a : [];
121
121
  t2 && n2 && (r.entity = t2, r.action = n2);
@@ -131,6 +131,8 @@ function le(e2 = "entity action", t = {}) {
131
131
  var INIT_DATE_MS = 17e11;
132
132
  var INIT_DATE = new Date(INIT_DATE_MS);
133
133
  var ga4Init = {
134
+ title: "GA4 init",
135
+ description: "The destination bootstraps gtag and configures a GA4 property via its measurementId.",
134
136
  in: {
135
137
  settings: {
136
138
  ga4: { measurementId: "G-XXXXXX-1" }
@@ -142,6 +144,8 @@ var ga4Init = {
142
144
  ]
143
145
  };
144
146
  var adsInit = {
147
+ title: "Google Ads init",
148
+ description: "The destination bootstraps gtag and configures a Google Ads account via its conversionId.",
145
149
  in: {
146
150
  settings: {
147
151
  ads: { conversionId: "AW-123456789", currency: "EUR" }
@@ -153,6 +157,8 @@ var adsInit = {
153
157
  ]
154
158
  };
155
159
  var gtmInit = {
160
+ title: "GTM init",
161
+ description: "The destination initializes the dataLayer and pushes the gtm.js start event for a GTM container.",
156
162
  in: {
157
163
  settings: {
158
164
  gtm: { containerId: "GTM-XXXXXXX" }
@@ -169,6 +175,8 @@ var gtmInit = {
169
175
  ]
170
176
  };
171
177
  var purchase = {
178
+ title: "Purchase",
179
+ description: "An order complete event is mapped to the GA4 purchase event with transaction details and nested product items.",
172
180
  in: le("order complete", { timestamp: 1700000100 }),
173
181
  mapping: {
174
182
  name: "purchase",
@@ -224,6 +232,8 @@ var purchase = {
224
232
  ]
225
233
  };
226
234
  var addToCart = {
235
+ title: "Add to cart",
236
+ description: "A product add event is mapped to the GA4 add_to_cart event with item details and value.",
227
237
  in: le("product add", { timestamp: 1700000101 }),
228
238
  mapping: {
229
239
  name: "add_to_cart",
@@ -268,11 +278,15 @@ var addToCart = {
268
278
  ]
269
279
  };
270
280
  var pageView = {
281
+ title: "Page view",
282
+ description: "A page view event is forwarded as a GA4 page_view event with no additional mapping.",
271
283
  in: le("page view", { timestamp: 1700000102 }),
272
284
  mapping: void 0,
273
285
  out: [["gtag", "event", "page_view", { send_to: "G-XXXXXX-1" }]]
274
286
  };
275
287
  var googleAdsConversion = {
288
+ title: "Ads conversion",
289
+ description: "An order complete event is sent as a Google Ads conversion with a configured label and transaction value.",
276
290
  in: le("order complete", { timestamp: 1700000103 }),
277
291
  mapping: {
278
292
  name: "PURCHASE_CONV",
@@ -299,6 +313,8 @@ var googleAdsConversion = {
299
313
  ]
300
314
  };
301
315
  var gtmDataLayerPush = {
316
+ title: "GTM dataLayer push",
317
+ description: "A page view event is pushed to window.dataLayer for GTM with the mapped event name and parameters.",
302
318
  in: le("page view", { timestamp: 1700000104 }),
303
319
  mapping: {
304
320
  name: "page_view",
@@ -324,6 +340,8 @@ var gtmDataLayerPush = {
324
340
  ]
325
341
  };
326
342
  var consentModeV2 = {
343
+ title: "Consent Mode v2",
344
+ description: "A walker consent command with marketing and functional granted updates gtag Consent Mode v2 parameters.",
327
345
  command: "consent",
328
346
  in: { marketing: true, functional: true },
329
347
  out: [
@@ -353,9 +371,11 @@ var consentModeV2 = {
353
371
  ]
354
372
  };
355
373
  var ga4WithIncludeAll = {
374
+ title: "GA4 include all",
375
+ description: "Include flattens every event section into prefixed GA4 params, exposing data, context, user, source, and event fields.",
356
376
  in: le("page view", { timestamp: 1700000106 }),
357
377
  mapping: {
358
- include: ["all"]
378
+ include: ["data", "context", "globals", "user", "source", "event"]
359
379
  },
360
380
  out: [
361
381
  [
@@ -392,9 +412,6 @@ var ga4WithIncludeAll = {
392
412
  event_name: "page view",
393
413
  event_timestamp: 1700000106,
394
414
  event_timing: 3.14,
395
- // version_* params from event.version
396
- version_source: "3.3.1",
397
- version_tagging: 1,
398
415
  // send_to is always set for GA4
399
416
  send_to: "G-XXXXXX-1"
400
417
  }
@@ -402,6 +419,8 @@ var ga4WithIncludeAll = {
402
419
  ]
403
420
  };
404
421
  var multipleToolsSimultaneous = {
422
+ title: "Multi-tool push",
423
+ description: "A single order event fans out to GA4, Google Ads, and GTM from one mapping rule with per-tool settings.",
405
424
  in: le("order complete", { timestamp: 1700000107 }),
406
425
  mapping: {
407
426
  name: "purchase",
@@ -94,7 +94,7 @@ function Q(e2) {
94
94
  }
95
95
  function fe(e2 = {}) {
96
96
  var _a;
97
- const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = e2.group || "gr0up", o = e2.count || 1, r = L({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${t}-${n}-${o}`, trigger: "test", entity: "entity", action: "action", timestamp: t, timing: 3.14, group: n, count: o, version: { source: "3.4.0", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
97
+ const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = e2.group || "gr0up", o = e2.count || 1, r = L({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${t}-${n}-${o}`, trigger: "test", entity: "entity", action: "action", timestamp: t, timing: 3.14, group: n, count: o, version: { source: "3.4.1", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
98
98
  if (e2.name) {
99
99
  const [t2, n2] = (_a = e2.name.split(" ")) != null ? _a : [];
100
100
  t2 && n2 && (r.entity = t2, r.action = n2);
@@ -110,6 +110,8 @@ function le(e2 = "entity action", t = {}) {
110
110
  var INIT_DATE_MS = 17e11;
111
111
  var INIT_DATE = new Date(INIT_DATE_MS);
112
112
  var ga4Init = {
113
+ title: "GA4 init",
114
+ description: "The destination bootstraps gtag and configures a GA4 property via its measurementId.",
113
115
  in: {
114
116
  settings: {
115
117
  ga4: { measurementId: "G-XXXXXX-1" }
@@ -121,6 +123,8 @@ var ga4Init = {
121
123
  ]
122
124
  };
123
125
  var adsInit = {
126
+ title: "Google Ads init",
127
+ description: "The destination bootstraps gtag and configures a Google Ads account via its conversionId.",
124
128
  in: {
125
129
  settings: {
126
130
  ads: { conversionId: "AW-123456789", currency: "EUR" }
@@ -132,6 +136,8 @@ var adsInit = {
132
136
  ]
133
137
  };
134
138
  var gtmInit = {
139
+ title: "GTM init",
140
+ description: "The destination initializes the dataLayer and pushes the gtm.js start event for a GTM container.",
135
141
  in: {
136
142
  settings: {
137
143
  gtm: { containerId: "GTM-XXXXXXX" }
@@ -148,6 +154,8 @@ var gtmInit = {
148
154
  ]
149
155
  };
150
156
  var purchase = {
157
+ title: "Purchase",
158
+ description: "An order complete event is mapped to the GA4 purchase event with transaction details and nested product items.",
151
159
  in: le("order complete", { timestamp: 1700000100 }),
152
160
  mapping: {
153
161
  name: "purchase",
@@ -203,6 +211,8 @@ var purchase = {
203
211
  ]
204
212
  };
205
213
  var addToCart = {
214
+ title: "Add to cart",
215
+ description: "A product add event is mapped to the GA4 add_to_cart event with item details and value.",
206
216
  in: le("product add", { timestamp: 1700000101 }),
207
217
  mapping: {
208
218
  name: "add_to_cart",
@@ -247,11 +257,15 @@ var addToCart = {
247
257
  ]
248
258
  };
249
259
  var pageView = {
260
+ title: "Page view",
261
+ description: "A page view event is forwarded as a GA4 page_view event with no additional mapping.",
250
262
  in: le("page view", { timestamp: 1700000102 }),
251
263
  mapping: void 0,
252
264
  out: [["gtag", "event", "page_view", { send_to: "G-XXXXXX-1" }]]
253
265
  };
254
266
  var googleAdsConversion = {
267
+ title: "Ads conversion",
268
+ description: "An order complete event is sent as a Google Ads conversion with a configured label and transaction value.",
255
269
  in: le("order complete", { timestamp: 1700000103 }),
256
270
  mapping: {
257
271
  name: "PURCHASE_CONV",
@@ -278,6 +292,8 @@ var googleAdsConversion = {
278
292
  ]
279
293
  };
280
294
  var gtmDataLayerPush = {
295
+ title: "GTM dataLayer push",
296
+ description: "A page view event is pushed to window.dataLayer for GTM with the mapped event name and parameters.",
281
297
  in: le("page view", { timestamp: 1700000104 }),
282
298
  mapping: {
283
299
  name: "page_view",
@@ -303,6 +319,8 @@ var gtmDataLayerPush = {
303
319
  ]
304
320
  };
305
321
  var consentModeV2 = {
322
+ title: "Consent Mode v2",
323
+ description: "A walker consent command with marketing and functional granted updates gtag Consent Mode v2 parameters.",
306
324
  command: "consent",
307
325
  in: { marketing: true, functional: true },
308
326
  out: [
@@ -332,9 +350,11 @@ var consentModeV2 = {
332
350
  ]
333
351
  };
334
352
  var ga4WithIncludeAll = {
353
+ title: "GA4 include all",
354
+ description: "Include flattens every event section into prefixed GA4 params, exposing data, context, user, source, and event fields.",
335
355
  in: le("page view", { timestamp: 1700000106 }),
336
356
  mapping: {
337
- include: ["all"]
357
+ include: ["data", "context", "globals", "user", "source", "event"]
338
358
  },
339
359
  out: [
340
360
  [
@@ -371,9 +391,6 @@ var ga4WithIncludeAll = {
371
391
  event_name: "page view",
372
392
  event_timestamp: 1700000106,
373
393
  event_timing: 3.14,
374
- // version_* params from event.version
375
- version_source: "3.3.1",
376
- version_tagging: 1,
377
394
  // send_to is always set for GA4
378
395
  send_to: "G-XXXXXX-1"
379
396
  }
@@ -381,6 +398,8 @@ var ga4WithIncludeAll = {
381
398
  ]
382
399
  };
383
400
  var multipleToolsSimultaneous = {
401
+ title: "Multi-tool push",
402
+ description: "A single order event fans out to GA4, Google Ads, and GTM from one mapping rule with per-tool settings.",
384
403
  in: le("order complete", { timestamp: 1700000107 }),
385
404
  mapping: {
386
405
  name: "purchase",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$meta": {
3
3
  "package": "@walkeros/web-destination-gtag",
4
- "version": "3.4.0",
4
+ "version": "3.4.1",
5
5
  "type": "destination",
6
6
  "platform": [
7
7
  "web"
@@ -296,6 +296,8 @@
296
296
  },
297
297
  "step": {
298
298
  "addToCart": {
299
+ "title": "Add to cart",
300
+ "description": "A product add event is mapped to the GA4 add_to_cart event with item details and value.",
299
301
  "in": {
300
302
  "name": "product add",
301
303
  "data": {
@@ -335,7 +337,7 @@
335
337
  "group": "gr0up",
336
338
  "count": 1,
337
339
  "version": {
338
- "source": "3.4.0",
340
+ "source": "3.4.1",
339
341
  "tagging": 1
340
342
  },
341
343
  "source": {
@@ -400,6 +402,8 @@
400
402
  ]
401
403
  },
402
404
  "adsInit": {
405
+ "title": "Google Ads init",
406
+ "description": "The destination bootstraps gtag and configures a Google Ads account via its conversionId.",
403
407
  "in": {
404
408
  "settings": {
405
409
  "ads": {
@@ -422,6 +426,8 @@
422
426
  ]
423
427
  },
424
428
  "consentModeV2": {
429
+ "title": "Consent Mode v2",
430
+ "description": "A walker consent command with marketing and functional granted updates gtag Consent Mode v2 parameters.",
425
431
  "command": "consent",
426
432
  "in": {
427
433
  "marketing": true,
@@ -453,6 +459,8 @@
453
459
  ]
454
460
  },
455
461
  "ga4Init": {
462
+ "title": "GA4 init",
463
+ "description": "The destination bootstraps gtag and configures a GA4 property via its measurementId.",
456
464
  "in": {
457
465
  "settings": {
458
466
  "ga4": {
@@ -475,6 +483,8 @@
475
483
  ]
476
484
  },
477
485
  "ga4WithIncludeAll": {
486
+ "title": "GA4 include all",
487
+ "description": "Include flattens every event section into prefixed GA4 params, exposing data, context, user, source, and event fields.",
478
488
  "in": {
479
489
  "name": "page view",
480
490
  "data": {
@@ -529,7 +539,7 @@
529
539
  "group": "gr0up",
530
540
  "count": 1,
531
541
  "version": {
532
- "source": "3.4.0",
542
+ "source": "3.4.1",
533
543
  "tagging": 1
534
544
  },
535
545
  "source": {
@@ -540,7 +550,12 @@
540
550
  },
541
551
  "mapping": {
542
552
  "include": [
543
- "all"
553
+ "data",
554
+ "context",
555
+ "globals",
556
+ "user",
557
+ "source",
558
+ "event"
544
559
  ]
545
560
  },
546
561
  "out": [
@@ -572,14 +587,14 @@
572
587
  "event_name": "page view",
573
588
  "event_timestamp": 1700000106,
574
589
  "event_timing": 3.14,
575
- "version_source": "3.3.1",
576
- "version_tagging": 1,
577
590
  "send_to": "G-XXXXXX-1"
578
591
  }
579
592
  ]
580
593
  ]
581
594
  },
582
595
  "googleAdsConversion": {
596
+ "title": "Ads conversion",
597
+ "description": "An order complete event is sent as a Google Ads conversion with a configured label and transaction value.",
583
598
  "in": {
584
599
  "name": "order complete",
585
600
  "data": {
@@ -666,7 +681,7 @@
666
681
  "group": "gr0up",
667
682
  "count": 1,
668
683
  "version": {
669
- "source": "3.4.0",
684
+ "source": "3.4.1",
670
685
  "tagging": 1
671
686
  },
672
687
  "source": {
@@ -702,6 +717,8 @@
702
717
  ]
703
718
  },
704
719
  "gtmDataLayerPush": {
720
+ "title": "GTM dataLayer push",
721
+ "description": "A page view event is pushed to window.dataLayer for GTM with the mapped event name and parameters.",
705
722
  "in": {
706
723
  "name": "page view",
707
724
  "data": {
@@ -756,7 +773,7 @@
756
773
  "group": "gr0up",
757
774
  "count": 1,
758
775
  "version": {
759
- "source": "3.4.0",
776
+ "source": "3.4.1",
760
777
  "tagging": 1
761
778
  },
762
779
  "source": {
@@ -789,6 +806,8 @@
789
806
  ]
790
807
  },
791
808
  "gtmInit": {
809
+ "title": "GTM init",
810
+ "description": "The destination initializes the dataLayer and pushes the gtm.js start event for a GTM container.",
792
811
  "in": {
793
812
  "settings": {
794
813
  "gtm": {
@@ -807,6 +826,8 @@
807
826
  ]
808
827
  },
809
828
  "multipleToolsSimultaneous": {
829
+ "title": "Multi-tool push",
830
+ "description": "A single order event fans out to GA4, Google Ads, and GTM from one mapping rule with per-tool settings.",
810
831
  "in": {
811
832
  "name": "order complete",
812
833
  "data": {
@@ -893,7 +914,7 @@
893
914
  "group": "gr0up",
894
915
  "count": 1,
895
916
  "version": {
896
- "source": "3.4.0",
917
+ "source": "3.4.1",
897
918
  "tagging": 1
898
919
  },
899
920
  "source": {
@@ -971,6 +992,8 @@
971
992
  ]
972
993
  },
973
994
  "pageView": {
995
+ "title": "Page view",
996
+ "description": "A page view event is forwarded as a GA4 page_view event with no additional mapping.",
974
997
  "in": {
975
998
  "name": "page view",
976
999
  "data": {
@@ -1025,7 +1048,7 @@
1025
1048
  "group": "gr0up",
1026
1049
  "count": 1,
1027
1050
  "version": {
1028
- "source": "3.4.0",
1051
+ "source": "3.4.1",
1029
1052
  "tagging": 1
1030
1053
  },
1031
1054
  "source": {
@@ -1046,6 +1069,8 @@
1046
1069
  ]
1047
1070
  },
1048
1071
  "purchase": {
1072
+ "title": "Purchase",
1073
+ "description": "An order complete event is mapped to the GA4 purchase event with transaction details and nested product items.",
1049
1074
  "in": {
1050
1075
  "name": "order complete",
1051
1076
  "data": {
@@ -1132,7 +1157,7 @@
1132
1157
  "group": "gr0up",
1133
1158
  "count": 1,
1134
1159
  "version": {
1135
- "source": "3.4.0",
1160
+ "source": "3.4.1",
1136
1161
  "tagging": 1
1137
1162
  },
1138
1163
  "source": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@walkeros/web-destination-gtag",
3
3
  "description": "Unified Google destination for walkerOS (GA4, Ads, GTM)",
4
- "version": "3.4.0",
4
+ "version": "3.4.1",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",
@@ -37,7 +37,7 @@
37
37
  "update": "npx npm-check-updates -u && npm update"
38
38
  },
39
39
  "dependencies": {
40
- "@walkeros/web-core": "3.4.0"
40
+ "@walkeros/web-core": "3.4.1"
41
41
  },
42
42
  "repository": {
43
43
  "url": "git+https://github.com/elbwalker/walkerOS.git",