@reservamos/browser-analytics 1.1.5 → 1.1.6

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.1.6
4
+
5
+ - Use taxonomy-consistent Title Case properties for `Purchase Confirmation Viewed`, including `Operation Id` instead of `order_number`.
6
+
3
7
  ## 1.1.5
4
8
 
5
9
  - Migrate npm releases from long-lived token authentication to npm Trusted Publishing with GitHub Actions OIDC.
@@ -7,7 +11,7 @@
7
11
 
8
12
  ## 1.1.4
9
13
 
10
- - Add `analytics.track.purchaseConfirmation` to send a `Purchase Confirmation Viewed` event when the confirmation or pending-payment page is viewed. Requires `order_number` and `payment_status` (`confirmed` | `pending_pix`); `payment_type` and `total` are optional.
14
+ - Add `analytics.track.purchaseConfirmation` to send a `Purchase Confirmation Viewed` event when the confirmation or pending-payment page is viewed.
11
15
 
12
16
  ## 1.1.3
13
17
 
package/README.md CHANGED
@@ -66,16 +66,16 @@ analytics.identify('main-identifier', {
66
66
 
67
67
  ## Tracking Purchase Confirmation
68
68
 
69
- The `purchaseConfirmation` event reports that a purchase confirmation or pending-payment page was viewed, so the order can be joined back to the visitor's Mixpanel `distinct_id`. `order_number` and `payment_status` (`'confirmed' | 'pending_pix'`) are required; `payment_type` and `total` are optional.
69
+ The `purchaseConfirmation` event reports that a purchase confirmation or pending-payment page was viewed, so the order can be joined back to the visitor's Mixpanel `distinct_id`. `Operation Id` and `Payment Status` (`'confirmed' | 'pending_pix'`) are required; `Payment Type` and `Total` are optional.
70
70
 
71
71
  ```typescript
72
72
  import analytics from '@reservamos/browser-analytics';
73
73
 
74
74
  analytics.track.purchaseConfirmation({
75
- order_number: 'MOB-123456',
76
- payment_status: 'confirmed',
77
- payment_type: 'credit_card',
78
- total: 199.9,
75
+ 'Operation Id': 'MOB-123456',
76
+ 'Payment Status': 'confirmed',
77
+ 'Payment Type': 'credit_card',
78
+ 'Total': 199.9,
79
79
  });
80
80
  ```
81
81