@walkeros/web-destination-snowplow 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,5 +1,5 @@
1
- import { Mapping as Mapping$1, WalkerOS } from '@walkeros/core';
2
1
  import { DestinationWeb } from '@walkeros/web-core';
2
+ import { Flow } from '@walkeros/core';
3
3
 
4
4
  declare global {
5
5
  interface Window {
@@ -11,112 +11,6 @@ interface SnowplowFunction {
11
11
  (...args: unknown[]): void;
12
12
  q?: unknown[];
13
13
  }
14
- /**
15
- * Context entity definition for Snowplow
16
- *
17
- * Each context entity has a schema URI and data mapping.
18
- */
19
- interface ContextEntity {
20
- /**
21
- * Iglu schema URI for this context entity
22
- *
23
- * @example SCHEMAS.PRODUCT, SCHEMAS.TRANSACTION
24
- */
25
- schema: string;
26
- /**
27
- * Data mapping for this context entity
28
- *
29
- * Uses standard walkerOS mapping syntax.
30
- *
31
- * @example { id: 'data.id', name: 'data.name', price: 'data.price' }
32
- */
33
- data: Mapping$1.Map;
34
- }
35
- /**
36
- * Structured event mapping for Snowplow's trackStructEvent
37
- *
38
- * When configured, bypasses self-describing events entirely
39
- * and calls trackStructEvent with the resolved values.
40
- *
41
- * @example
42
- * struct: {
43
- * category: { value: 'ui' },
44
- * action: { value: 'click' },
45
- * label: 'data.button_name',
46
- * property: 'data.section',
47
- * value: 'data.position',
48
- * }
49
- */
50
- interface StructuredEventMapping {
51
- /** Event category (required) */
52
- category: Mapping$1.Value;
53
- /** Event action (required) */
54
- action: Mapping$1.Value;
55
- /** Event label (optional) */
56
- label?: Mapping$1.Value;
57
- /** Event property (optional) */
58
- property?: Mapping$1.Value;
59
- /** Event value - must resolve to a number (optional) */
60
- value?: Mapping$1.Value;
61
- }
62
- /**
63
- * Custom mapping parameters for Snowplow events
64
- *
65
- * Uses standard `name` field for action type.
66
- * The `name` from the mapping rule becomes Snowplow's event.data.type.
67
- */
68
- interface Mapping {
69
- /**
70
- * Context entities to attach to this event
71
- *
72
- * Each entry defines a schema and data mapping.
73
- * Explicit - no auto-detection.
74
- *
75
- * @example
76
- * context: [
77
- * { schema: SCHEMAS.PRODUCT, data: { id: 'data.id', name: 'data.name' } }
78
- * ]
79
- */
80
- context?: ContextEntity[];
81
- /**
82
- * Snowplow-specific settings override
83
- */
84
- snowplow?: SnowplowMappingSettings;
85
- /**
86
- * Custom data mapping for self-describing event payload
87
- *
88
- * When specified with a `map` property, the mapped values are used
89
- * as the event data instead of the default ecommerce pattern.
90
- * Useful for media events (percent_progress) and custom schemas.
91
- *
92
- * @example
93
- * data: { map: { percentProgress: 'data.progress' } }
94
- */
95
- data?: Mapping$1.Value;
96
- /**
97
- * Structured event mapping (bypasses self-describing events)
98
- *
99
- * When configured, calls trackStructEvent instead of trackSelfDescribingEvent.
100
- * No schema is used - this completely bypasses the self-describing event path.
101
- *
102
- * @example
103
- * struct: {
104
- * category: { value: 'ui' },
105
- * action: { value: 'click' },
106
- * label: 'data.button_name',
107
- * }
108
- */
109
- struct?: StructuredEventMapping;
110
- }
111
- /**
112
- * Per-event Snowplow settings override
113
- */
114
- interface SnowplowMappingSettings {
115
- /**
116
- * Override action schema for this specific event
117
- */
118
- actionSchema?: string;
119
- }
120
14
  /**
121
15
  * Environment dependencies for Snowplow destination
122
16
  */
@@ -125,7 +19,6 @@ interface Env extends DestinationWeb.Env {
125
19
  snowplow?: SnowplowFunction;
126
20
  };
127
21
  }
128
- type Rule = Mapping$1.Rule<Mapping>;
129
22
 
130
23
  declare const init: Env | undefined;
131
24
  declare const push: Env;
@@ -138,664 +31,19 @@ declare namespace env {
138
31
  export { env_init as init, env_push as push, env_simulation as simulation };
139
32
  }
140
33
 
141
- /**
142
- * Example Snowplow function call outputs
143
- *
144
- * These represent the actual arguments passed to window.snowplow()
145
- * when different events are tracked using Snowplow's ecommerce schema.
146
- *
147
- * All ecommerce events use the self-describing event format with:
148
- * - Event action schema: snowplow_ecommerce_action/jsonschema/1-0-2
149
- * - Context entities with their respective schemas
150
- *
151
- * Reference: https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/snowplow-tracker-protocol/
152
- */
153
- /**
154
- * Page View Event
155
- * Uses built-in Snowplow page view tracking
156
- */
157
- declare function pageView$2(): unknown[];
158
- /**
159
- * Product View Event
160
- * walkerOS: elb('product view') - uses default getEvent data
161
- * Snowplow: product_view action with product context entity
162
- */
163
- declare function productView$2(): unknown[];
164
- /**
165
- * Add to Cart Event
166
- * walkerOS: elb('product add', { id: 'P123', name: 'Laptop', price: 999, quantity: 1 })
167
- * Snowplow: add_to_cart action with product, cart, page, and user context entities
168
- */
169
- declare function addToCart$2(): unknown[];
170
- /**
171
- * Remove from Cart Event
172
- * walkerOS: elb('product remove', { id: 'P123', name: 'Laptop', price: 999, quantity: 1 })
173
- * Snowplow: remove_from_cart action with product and cart context entities
174
- */
175
- declare function removeFromCart$2(): unknown[];
176
- /**
177
- * Transaction/Purchase Event
178
- * walkerOS: elb('order complete') - uses default getEvent data
179
- * Default: { id: '0rd3r1d', currency: 'EUR', shipping: 5.22, taxes: 73.76, total: 555 }
180
- * Snowplow: transaction action with transaction context entity
181
- *
182
- * Note: This is explicit mapping without auto-looping nested products.
183
- * For product contexts from nested array, use loop in mapping configuration.
184
- */
185
- declare function transaction$2(): unknown[];
186
- /**
187
- * Transaction with Multiple Products
188
- * walkerOS: elb('order complete', { id: 'ORD-456', revenue: 1498, tax: 120, shipping: 15 }, {
189
- * nested: [
190
- * { type: 'product', data: { id: 'P123', name: 'Laptop', price: 999, quantity: 1 } },
191
- * { type: 'product', data: { id: 'P456', name: 'Mouse', price: 49, quantity: 2 } }
192
- * ]
193
- * })
194
- * Snowplow: transaction action with multiple product entities
195
- */
196
- declare function transactionMultipleProducts$1(): unknown[];
197
- /**
198
- * Refund Event
199
- * walkerOS: elb('order refund', { transaction_id: 'ORD-123', amount: 999, reason: 'defective' })
200
- * Snowplow: refund action with refund context entity
201
- */
202
- declare function refund$2(): unknown[];
203
- /**
204
- * Checkout Step Event
205
- * walkerOS: elb('checkout step', { step: 1, shipping_method: 'express' })
206
- * Snowplow: checkout_step action with checkout_step context entity
207
- */
208
- declare function checkoutStep$2(): unknown[];
209
- /**
210
- * List View Event (Product Listing Page)
211
- * walkerOS: elb('product list', { category: 'Electronics' }, {
212
- * nested: [
213
- * { type: 'product', data: { id: 'P123', name: 'Laptop', price: 999 } },
214
- * { type: 'product', data: { id: 'P456', name: 'Mouse', price: 49 } }
215
- * ]
216
- * })
217
- * Snowplow: list_view action with multiple product context entities
218
- */
219
- declare function listView$2(): unknown[];
220
- /**
221
- * Promotion View Event
222
- * walkerOS: elb('promo view', { id: 'SUMMER2024', name: 'Summer Sale', creative: 'banner_top' })
223
- * Snowplow: promo_view action with promotion context entity
224
- */
225
- declare function promoView$2(): unknown[];
226
- /**
227
- * Custom Self-Describing Event (Non-Ecommerce)
228
- * Example of a custom event that doesn't use the ecommerce schema
229
- * walkerOS: elb('custom action', { ... })
230
- */
231
- declare function customSelfDescribingEvent(): unknown[];
232
- /**
233
- * Legacy: Alias for transaction (for backward compatibility with tests)
234
- */
235
- declare const purchase: typeof transaction$2;
236
- /**
237
- * Legacy: Alias for customSelfDescribingEvent (for backward compatibility with tests)
238
- */
239
- declare const selfDescribingEvent: typeof customSelfDescribingEvent;
240
- /**
241
- * Legacy: Structured Event (deprecated)
242
- * Old structured event format with 5 fields
243
- * This format is deprecated in favor of self-describing events
244
- */
245
- declare function structuredEvent(): unknown[];
246
-
247
- declare const events_customSelfDescribingEvent: typeof customSelfDescribingEvent;
248
- declare const events_purchase: typeof purchase;
249
- declare const events_selfDescribingEvent: typeof selfDescribingEvent;
250
- declare const events_structuredEvent: typeof structuredEvent;
251
- declare namespace events {
252
- export { addToCart$2 as addToCart, checkoutStep$2 as checkoutStep, events_customSelfDescribingEvent as customSelfDescribingEvent, listView$2 as listView, pageView$2 as pageView, productView$2 as productView, promoView$2 as promoView, events_purchase as purchase, refund$2 as refund, removeFromCart$2 as removeFromCart, events_selfDescribingEvent as selfDescribingEvent, events_structuredEvent as structuredEvent, transaction$2 as transaction, transactionMultipleProducts$1 as transactionMultipleProducts };
253
- }
254
-
255
- /**
256
- * Snowplow Ecommerce Mapping Examples
257
- *
258
- * Fully explicit mapping - no auto-detection or magic.
259
- * - `name` at rule level specifies the Snowplow action type
260
- * - `settings.context` defines context entities with schema and data mapping
261
- *
262
- * Pattern: name = action type, settings.context = [{ schema, data }]
263
- */
264
- /**
265
- * Page View Mapping
266
- *
267
- * Page views use Snowplow's built-in trackPageView method.
268
- * No custom mapping needed - just pass through.
269
- */
270
- declare const pageView$1: Rule;
271
- /**
272
- * Product View Mapping
273
- *
274
- * walkerOS: elb('product view', { id: 'P123', name: 'Laptop', category: 'Electronics', price: 999 })
275
- * Snowplow: product_view action with product context entity
276
- */
277
- declare const productView$1: Rule;
278
- /**
279
- * Add to Cart Mapping
280
- *
281
- * walkerOS: elb('product add', { id: 'P123', name: 'Laptop', price: 999, quantity: 1 })
282
- * Snowplow: add_to_cart action with product, cart, page, and user context entities
283
- *
284
- * Expects:
285
- * - data: product properties (id, name, category, price, currency, quantity)
286
- * - globals: cart_value, cart_currency, page_type, language
287
- * - user: id, email
288
- */
289
- declare const addToCart$1: Rule;
290
- /**
291
- * Remove from Cart Mapping
292
- *
293
- * walkerOS: elb('product remove', { id: 'P123', name: 'Laptop', price: 999, quantity: 1 })
294
- * Snowplow: remove_from_cart action with product context entity
295
- */
296
- declare const removeFromCart$1: Rule;
297
- /**
298
- * Transaction/Purchase Mapping
299
- *
300
- * walkerOS: elb('order complete') - uses default getEvent data
301
- * Default has: { id, currency, shipping, taxes, total } + nested products
302
- * Snowplow: transaction action with transaction context entity
303
- *
304
- * Note: For product contexts from nested, use loop in data.map
305
- */
306
- declare const transaction$1: Rule;
307
- /**
308
- * Refund Mapping
309
- *
310
- * walkerOS: elb('order refund', {
311
- * transaction_id: 'ORD-123', refund_amount: 999, refund_reason: 'defective'
312
- * })
313
- * Snowplow: refund action with refund context entity
314
- */
315
- declare const refund$1: Rule;
316
- /**
317
- * Checkout Step Mapping
318
- *
319
- * walkerOS: elb('checkout step', { step: 1, delivery_provider: 'express' })
320
- * Snowplow: checkout_step action with checkout_step context entity
321
- */
322
- declare const checkoutStep$1: Rule;
323
- /**
324
- * Product List View Mapping
325
- *
326
- * walkerOS: elb('product list', { category: 'Electronics' })
327
- * Snowplow: list_view action
328
- *
329
- * Note: For multiple products from nested, use loop in data.map
330
- */
331
- declare const listView$1: Rule;
332
- /**
333
- * Promotion View Mapping
334
- *
335
- * walkerOS: elb('promo view', { id: 'SUMMER2024', name: 'Summer Sale', creative_id: 'banner_top' })
336
- * Snowplow: promo_view action with promotion context entity
337
- */
338
- declare const promoView$1: Rule;
339
- /**
340
- * Promotion Click Mapping
341
- *
342
- * walkerOS: elb('promo click', { id: 'SUMMER2024', name: 'Summer Sale' })
343
- * Snowplow: promo_click action with promotion context entity
344
- */
345
- declare const promoClick: Rule;
346
- /**
347
- * Link Click Mapping (Self-Describing Event)
348
- *
349
- * walkerOS: elb('link click', { url: 'https://example.com', text: 'Learn more', id: 'cta-main' })
350
- * Snowplow: link_click self-describing event
351
- *
352
- * Note: Uses self-describing event with custom schema, not ecommerce action
353
- */
354
- declare const linkClick: Rule;
355
- /**
356
- * Form Submit Mapping (Self-Describing Event)
357
- *
358
- * walkerOS: elb('form submit', { form_id: 'contact-form', form_classes: ['main-form'] })
359
- * Snowplow: submit_form self-describing event
360
- */
361
- declare const formSubmit: Rule;
362
- /**
363
- * Site Search Mapping (Self-Describing Event)
364
- *
365
- * walkerOS: elb('search submit', { terms: 'laptop', filters: { category: 'Electronics' }, total_results: 42 })
366
- * Snowplow: site_search self-describing event
367
- */
368
- declare const siteSearch: Rule;
369
- /**
370
- * Social Share Mapping (Self-Describing Event)
371
- *
372
- * walkerOS: elb('social share', { network: 'twitter', action: 'share', target: 'https://example.com/article' })
373
- * Snowplow: social_interaction self-describing event
374
- */
375
- declare const socialShare: Rule;
376
- /**
377
- * Button Click (Structured Event)
378
- *
379
- * walkerOS: elb('button click', { button_name: 'submit', section: 'header', position: 1 })
380
- * Snowplow: trackStructEvent (category='ui', action='click', label, property, value)
381
- *
382
- * Use structured events for simple interactions that don't need full schemas.
383
- * No schema validation - just category, action, label, property, value.
384
- */
385
- declare const buttonClick: Rule;
386
- /**
387
- * Navigation Event (Structured Event)
388
- *
389
- * walkerOS: elb('navigation click', { menu: 'main', item: 'products', depth: 2 })
390
- * Snowplow: trackStructEvent (category='navigation', action='click')
391
- */
392
- declare const navigationClick: Rule;
393
- /**
394
- * Video Interaction (Structured Event)
395
- *
396
- * walkerOS: elb('video play', { video_id: 'intro-video', video_title: 'Welcome', progress: 25 })
397
- * Snowplow: trackStructEvent (category='video', action='play')
398
- *
399
- * For simple video tracking. Use media schemas for full video analytics.
400
- */
401
- declare const videoPlay: Rule;
402
- /**
403
- * CTA Interaction (Structured Event)
404
- *
405
- * walkerOS: elb('cta click', { cta_id: 'hero-signup', cta_text: 'Get Started', variant: 'A' })
406
- * Snowplow: trackStructEvent (category='cta', action='click')
407
- */
408
- declare const ctaClick: Rule;
409
- /**
410
- * Generic Interaction (Structured Event with Dynamic Category/Action)
411
- *
412
- * walkerOS: elb('interaction track', { event_category: 'engagement', event_action: 'scroll', depth: 50 })
413
- * Snowplow: trackStructEvent with dynamic category/action from event data
414
- *
415
- * Useful for flexible event tracking where category/action come from the event itself.
416
- */
417
- declare const genericInteraction: Rule;
418
- /**
419
- * Media Play Event Mapping
420
- *
421
- * walkerOS: elb('video play', {
422
- * current_time: 0, duration: 300, paused: false,
423
- * volume: 80, muted: false, video_id: 'intro-video', title: 'Welcome'
424
- * })
425
- * Snowplow: play_event with media_player and session contexts
426
- *
427
- * Use for HTML5 video/audio or custom media players.
428
- * The media_player context contains current playback state.
429
- */
430
- declare const mediaPlay: Rule;
431
- /**
432
- * Media Pause Event Mapping
433
- *
434
- * walkerOS: elb('video pause', {
435
- * current_time: 45.2, duration: 300, paused: true, volume: 80
436
- * })
437
- * Snowplow: pause_event with media_player context
438
- */
439
- declare const mediaPause: Rule;
440
- /**
441
- * Media End Event Mapping
442
- *
443
- * walkerOS: elb('video end', {
444
- * current_time: 300, duration: 300, video_id: 'intro-video'
445
- * })
446
- * Snowplow: end_event with media_player context
447
- */
448
- declare const mediaEnd: Rule;
449
- /**
450
- * Media Seek Event Mapping
451
- *
452
- * walkerOS: elb('video seek', {
453
- * current_time: 120, duration: 300, seek_from: 45, seek_to: 120
454
- * })
455
- * Snowplow: seek_end_event with media_player context
456
- *
457
- * Track when user seeks (jumps) to a different position in the media.
458
- */
459
- declare const mediaSeek: Rule;
460
- /**
461
- * Media Progress Event Mapping (Percent Progress)
462
- *
463
- * walkerOS: elb('video progress', {
464
- * current_time: 75, duration: 300, percent: 25
465
- * })
466
- * Snowplow: percent_progress_event with media_player context
467
- *
468
- * Fires at progress milestones (e.g., 25%, 50%, 75%, 100%).
469
- */
470
- declare const mediaProgress: Rule;
471
- /**
472
- * Media Buffer Event Mapping
473
- *
474
- * walkerOS: elb('video buffer', {
475
- * current_time: 45.2, duration: 300, buffering: true
476
- * })
477
- * Snowplow: buffer_start_event with media_player context
478
- *
479
- * Track buffering events for quality of experience analysis.
480
- */
481
- declare const mediaBuffer: Rule;
482
- /**
483
- * Media Quality Change Event Mapping
484
- *
485
- * walkerOS: elb('video quality', {
486
- * current_time: 45.2, previous_quality: '720p', new_quality: '1080p', auto: false
487
- * })
488
- * Snowplow: quality_change_event with media_player context
489
- */
490
- declare const mediaQualityChange: Rule;
491
- /**
492
- * Media Fullscreen Change Event Mapping
493
- *
494
- * walkerOS: elb('video fullscreen', {
495
- * current_time: 45.2, fullscreen: true
496
- * })
497
- * Snowplow: fullscreen_change_event with media_player context
498
- */
499
- declare const mediaFullscreen: Rule;
500
- /**
501
- * Media Error Event Mapping
502
- *
503
- * walkerOS: elb('video error', {
504
- * current_time: 45.2, error_code: 'MEDIA_ERR_NETWORK', error_message: 'Network error'
505
- * })
506
- * Snowplow: error_event with media_player context
507
- */
508
- declare const mediaError: Rule;
509
- /**
510
- * Ad Break Start Event Mapping
511
- *
512
- * walkerOS: elb('ad break_start', {
513
- * current_time: 0, ad_break_type: 'preroll', ad_break_id: 'preroll-1'
514
- * })
515
- * Snowplow: ad_break_start_event with media_player and ad_break contexts
516
- */
517
- declare const adBreakStart: Rule;
518
- /**
519
- * Ad Start Event Mapping
520
- *
521
- * walkerOS: elb('ad start', {
522
- * current_time: 0, ad_id: 'ad-123', creative_id: 'creative-456',
523
- * advertiser: 'Acme Corp', duration: 30, skippable: true
524
- * })
525
- * Snowplow: ad_start_event with media_player and ad contexts
526
- */
527
- declare const adStart: Rule;
528
- /**
529
- * Ad Complete Event Mapping
530
- *
531
- * walkerOS: elb('ad complete', {
532
- * current_time: 30, ad_id: 'ad-123'
533
- * })
534
- * Snowplow: ad_complete_event with media_player and ad contexts
535
- */
536
- declare const adComplete: Rule;
537
- /**
538
- * Ad Skip Event Mapping
539
- *
540
- * walkerOS: elb('ad skip', {
541
- * current_time: 5, ad_id: 'ad-123', time_skipped_at: 5
542
- * })
543
- * Snowplow: ad_skip_event with media_player and ad contexts
544
- */
545
- declare const adSkip: Rule;
546
- /**
547
- * Complete Mapping Configuration
548
- *
549
- * Maps walkerOS event names to Snowplow ecommerce actions.
550
- * Fully explicit - no auto-detection or magic.
551
- */
552
- declare const config: {
553
- page: {
554
- view: Rule;
555
- };
556
- product: {
557
- view: Rule;
558
- add: Rule;
559
- remove: Rule;
560
- list: Rule;
561
- };
562
- order: {
563
- complete: Rule;
564
- refund: Rule;
565
- };
566
- checkout: {
567
- step: Rule;
568
- };
569
- promo: {
570
- view: Rule;
571
- click: Rule;
572
- };
573
- };
574
- /**
575
- * Web Analytics Mapping Configuration
576
- *
577
- * Maps walkerOS event names to Snowplow web analytics events.
578
- * Includes both self-describing events and structured events.
579
- */
580
- declare const webConfig: {
581
- link: {
582
- click: Rule;
583
- };
584
- form: {
585
- submit: Rule;
586
- };
587
- search: {
588
- submit: Rule;
589
- };
590
- social: {
591
- share: Rule;
592
- };
593
- button: {
594
- click: Rule;
595
- };
596
- navigation: {
597
- click: Rule;
598
- };
599
- video: {
600
- play: Rule;
601
- };
602
- cta: {
603
- click: Rule;
604
- };
605
- interaction: {
606
- track: Rule;
607
- };
608
- };
609
- /**
610
- * Media Tracking Mapping Configuration
611
- *
612
- * Maps walkerOS event names to Snowplow media tracking events.
613
- * Includes video playback, progress, and ad tracking.
614
- *
615
- * For automatic media tracking, consider using Snowplow's
616
- * @snowplow/browser-plugin-media-tracking plugin instead.
617
- */
618
- declare const mediaConfig: {
619
- video: {
620
- play: Rule;
621
- pause: Rule;
622
- end: Rule;
623
- seek: Rule;
624
- progress: Rule;
625
- buffer: Rule;
626
- quality: Rule;
627
- fullscreen: Rule;
628
- error: Rule;
629
- };
630
- ad: {
631
- break_start: Rule;
632
- start: Rule;
633
- complete: Rule;
634
- skip: Rule;
635
- };
636
- };
637
-
638
- declare const mapping_adBreakStart: typeof adBreakStart;
639
- declare const mapping_adComplete: typeof adComplete;
640
- declare const mapping_adSkip: typeof adSkip;
641
- declare const mapping_adStart: typeof adStart;
642
- declare const mapping_buttonClick: typeof buttonClick;
643
- declare const mapping_config: typeof config;
644
- declare const mapping_ctaClick: typeof ctaClick;
645
- declare const mapping_formSubmit: typeof formSubmit;
646
- declare const mapping_genericInteraction: typeof genericInteraction;
647
- declare const mapping_linkClick: typeof linkClick;
648
- declare const mapping_mediaBuffer: typeof mediaBuffer;
649
- declare const mapping_mediaConfig: typeof mediaConfig;
650
- declare const mapping_mediaEnd: typeof mediaEnd;
651
- declare const mapping_mediaError: typeof mediaError;
652
- declare const mapping_mediaFullscreen: typeof mediaFullscreen;
653
- declare const mapping_mediaPause: typeof mediaPause;
654
- declare const mapping_mediaPlay: typeof mediaPlay;
655
- declare const mapping_mediaProgress: typeof mediaProgress;
656
- declare const mapping_mediaQualityChange: typeof mediaQualityChange;
657
- declare const mapping_mediaSeek: typeof mediaSeek;
658
- declare const mapping_navigationClick: typeof navigationClick;
659
- declare const mapping_promoClick: typeof promoClick;
660
- declare const mapping_siteSearch: typeof siteSearch;
661
- declare const mapping_socialShare: typeof socialShare;
662
- declare const mapping_videoPlay: typeof videoPlay;
663
- declare const mapping_webConfig: typeof webConfig;
664
- declare namespace mapping {
665
- export { mapping_adBreakStart as adBreakStart, mapping_adComplete as adComplete, mapping_adSkip as adSkip, mapping_adStart as adStart, addToCart$1 as addToCart, mapping_buttonClick as buttonClick, checkoutStep$1 as checkoutStep, mapping_config as config, mapping_ctaClick as ctaClick, mapping_formSubmit as formSubmit, mapping_genericInteraction as genericInteraction, mapping_linkClick as linkClick, listView$1 as listView, mapping_mediaBuffer as mediaBuffer, mapping_mediaConfig as mediaConfig, mapping_mediaEnd as mediaEnd, mapping_mediaError as mediaError, mapping_mediaFullscreen as mediaFullscreen, mapping_mediaPause as mediaPause, mapping_mediaPlay as mediaPlay, mapping_mediaProgress as mediaProgress, mapping_mediaQualityChange as mediaQualityChange, mapping_mediaSeek as mediaSeek, mapping_navigationClick as navigationClick, pageView$1 as pageView, productView$1 as productView, mapping_promoClick as promoClick, promoView$1 as promoView, refund$1 as refund, removeFromCart$1 as removeFromCart, mapping_siteSearch as siteSearch, mapping_socialShare as socialShare, transaction$1 as transaction, mapping_videoPlay as videoPlay, mapping_webConfig as webConfig };
666
- }
667
-
668
- /**
669
- * Example walkerOS events that would generate Snowplow ecommerce events
670
- *
671
- * These represent the actual walkerOS events (with their data and nested entities)
672
- * that would be transformed into Snowplow ecommerce schema format.
673
- *
674
- * Pattern: walkerOS event → Snowplow self-describing event with context entities
675
- */
676
- /**
677
- * Page View Event
678
- * walkerOS: elb('page view', { id: '/products', title: 'Product Listing' })
679
- * Generated when a user views a page
680
- */
681
- declare function pageView(): WalkerOS.Event;
682
- /**
683
- * Product View Event
684
- * walkerOS: elb('product view', { id: 'P123', name: 'Laptop', category: 'Electronics', price: 999 })
685
- * Generated when viewing a product detail page
686
- */
687
- declare function productView(): WalkerOS.Event;
688
- /**
689
- * Add to Cart Event
690
- * walkerOS: elb('product add', { id: 'P123', name: 'Laptop', price: 999, quantity: 1 }, {
691
- * globals: { cart_value: 999, cart_currency: 'USD', page_type: 'product', language: 'en' },
692
- * user: { id: 'U123', email: 'user@example.com' }
693
- * })
694
- * Generated when adding a product to cart
695
- */
696
- declare function addToCart(): WalkerOS.Event;
697
- /**
698
- * Remove from Cart Event
699
- * walkerOS: elb('product remove', { id: 'P123', name: 'Laptop', price: 999, quantity: 1 }, {
700
- * globals: { cart_total: 0, cart_currency: 'USD' }
701
- * })
702
- * Generated when removing a product from cart
703
- */
704
- declare function removeFromCart(): WalkerOS.Event;
705
- /**
706
- * Transaction/Purchase Event (Single Product)
707
- * walkerOS: elb('order complete', {
708
- * id: 'ORD-123',
709
- * revenue: 999,
710
- * tax: 80,
711
- * shipping: 10,
712
- * currency: 'USD',
713
- * payment_method: 'credit_card'
714
- * }, {
715
- * nested: [
716
- * { type: 'product', data: { id: 'P123', name: 'Laptop', category: 'Electronics', price: 999, quantity: 1 } }
717
- * ]
718
- * })
719
- * Generated when order is completed
720
- */
721
- declare function transaction(): WalkerOS.Event;
722
- /**
723
- * Transaction with Multiple Products
724
- * walkerOS: elb('order complete', {
725
- * id: 'ORD-456',
726
- * revenue: 1097,
727
- * tax: 120,
728
- * shipping: 15,
729
- * currency: 'USD',
730
- * payment_method: 'paypal'
731
- * }, {
732
- * nested: [
733
- * { type: 'product', data: { id: 'P123', name: 'Laptop', price: 999, quantity: 1 } },
734
- * { type: 'product', data: { id: 'P456', name: 'Mouse', price: 49, quantity: 2 } }
735
- * ]
736
- * })
737
- * Generated when order with multiple products is completed
738
- */
739
- declare function transactionMultipleProducts(): WalkerOS.Event;
740
- /**
741
- * Refund Event
742
- * walkerOS: elb('order refund', {
743
- * transaction_id: 'ORD-123',
744
- * refund_amount: 999,
745
- * currency: 'USD',
746
- * refund_reason: 'defective'
747
- * })
748
- * Generated when processing a refund
749
- */
750
- declare function refund(): WalkerOS.Event;
751
- /**
752
- * Checkout Step Event
753
- * walkerOS: elb('checkout step', { step: 1, delivery_provider: 'express' })
754
- * Generated when progressing through checkout
755
- */
756
- declare function checkoutStep(): WalkerOS.Event;
757
- /**
758
- * List View Event (Product Listing Page)
759
- * walkerOS: elb('product list', { category: 'Electronics', list_name: 'Search Results' }, {
760
- * nested: [
761
- * { type: 'product', data: { id: 'P123', name: 'Laptop', price: 999, position: 1 } },
762
- * { type: 'product', data: { id: 'P456', name: 'Mouse', price: 49, position: 2 } }
763
- * ]
764
- * })
765
- * Generated when viewing a product listing page (search, category, etc.)
766
- */
767
- declare function listView(): WalkerOS.Event;
768
- /**
769
- * Promotion View Event
770
- * walkerOS: elb('promo view', {
771
- * id: 'SUMMER2024',
772
- * name: 'Summer Sale',
773
- * creative_id: 'banner_top',
774
- * position: 'hero'
775
- * })
776
- * Generated when a promotion is displayed to the user
777
- */
778
- declare function promoView(): WalkerOS.Event;
779
- /**
780
- * Custom Event (Non-Ecommerce)
781
- * walkerOS: elb('custom action', { action_type: 'button_click', button_id: 'cta_signup' })
782
- * Example of a custom event that doesn't use ecommerce schema
783
- */
784
- declare function customEvent(): WalkerOS.Event;
34
+ declare const productView: Flow.StepExample;
35
+ declare const addToCart: Flow.StepExample;
36
+ declare const transaction: Flow.StepExample;
37
+ declare const promoView: Flow.StepExample;
38
+ declare const pageView: Flow.StepExample;
785
39
 
786
- declare const walkerosEvents_addToCart: typeof addToCart;
787
- declare const walkerosEvents_checkoutStep: typeof checkoutStep;
788
- declare const walkerosEvents_customEvent: typeof customEvent;
789
- declare const walkerosEvents_listView: typeof listView;
790
- declare const walkerosEvents_pageView: typeof pageView;
791
- declare const walkerosEvents_productView: typeof productView;
792
- declare const walkerosEvents_promoView: typeof promoView;
793
- declare const walkerosEvents_refund: typeof refund;
794
- declare const walkerosEvents_removeFromCart: typeof removeFromCart;
795
- declare const walkerosEvents_transaction: typeof transaction;
796
- declare const walkerosEvents_transactionMultipleProducts: typeof transactionMultipleProducts;
797
- declare namespace walkerosEvents {
798
- export { walkerosEvents_addToCart as addToCart, walkerosEvents_checkoutStep as checkoutStep, walkerosEvents_customEvent as customEvent, walkerosEvents_listView as listView, walkerosEvents_pageView as pageView, walkerosEvents_productView as productView, walkerosEvents_promoView as promoView, walkerosEvents_refund as refund, walkerosEvents_removeFromCart as removeFromCart, walkerosEvents_transaction as transaction, walkerosEvents_transactionMultipleProducts as transactionMultipleProducts };
40
+ declare const step_addToCart: typeof addToCart;
41
+ declare const step_pageView: typeof pageView;
42
+ declare const step_productView: typeof productView;
43
+ declare const step_promoView: typeof promoView;
44
+ declare const step_transaction: typeof transaction;
45
+ declare namespace step {
46
+ export { step_addToCart as addToCart, step_pageView as pageView, step_productView as productView, step_promoView as promoView, step_transaction as transaction };
799
47
  }
800
48
 
801
- export { env, events, mapping, walkerosEvents };
49
+ export { env, step };