@recras/online-booking-js 1.10.2 → 1.10.3

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/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  [![Build Status](https://travis-ci.org/Recras/online-booking-js.svg?branch=master)](https://travis-ci.org/Recras/online-booking-js)
2
2
 
3
3
  # Recras JS Integration Library
4
- Version: 1.10.2
4
+ Version: 1.10.3
5
5
 
6
6
  JS library for easy online booking, contact form, and voucher integration
7
7
 
@@ -131,12 +131,12 @@ the constants in [src/eventHelper.js](src/eventHelper.js).
131
131
  When Google Analytics integration is enabled, certain events sent to GA include a label and/or value:
132
132
 
133
133
  | Event | Label | Value |
134
- | ---------------------------------- | --------------------------------- | ----------------------------------- |
134
+ | ---------------------------------- | --------------------------------- |-------------------------------------|
135
135
  | `Recras:Booking:PackageChanged` | Package name | Package ID |
136
136
  | `Recras:Booking:DateSelected` | Selected date, in ISO 8601 format | N/A |
137
- | `Recras:Booking:BuyInProgress` | Package name | Package ID |
137
+ | `Recras:Booking:BuyInProgress` | Package name | Rounded total amount of the booking |
138
138
  | `Recras:Booking:RedirectToPayment` | N/A | Rounded total amount of the booking |
139
139
  | `Recras:ContactForm:Submit` | N/A | Form ID |
140
140
  | `Recras:Voucher:TemplateChanged` | N/A | Template ID |
141
- | `Recras:Voucher:BuyInProgress` | Template name | Template ID |
141
+ | `Recras:Voucher:BuyInProgress` | Template name | Rounded total amount of the order |
142
142
  | `Recras:Voucher:RedirectToPayment` | N/A | Rounded total amount of the order |
package/changelog.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.10.3 (2021-12-16)
4
+ * Change value of "BuyInProgress" events from package/template ID (bookings/vouchers, respectively) to total price
5
+
3
6
  ## 1.10.2 (2021-10-07)
4
7
  * Clicking required checkboxes would become slow after clicking a few times - fixed
5
8
 
@@ -50,7 +50,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
50
50
 
51
51
  /*******************************
52
52
  * Recras integration library *
53
- * v 1.10.2 *
53
+ * v 1.10.3 *
54
54
  *******************************/
55
55
  var RecrasBooking = /*#__PURE__*/function () {
56
56
  function RecrasBooking() {
@@ -1689,7 +1689,7 @@ var RecrasBooking = /*#__PURE__*/function () {
1689
1689
  return false;
1690
1690
  }
1691
1691
 
1692
- this.eventHelper.sendEvent(RecrasEventHelper.PREFIX_BOOKING, RecrasEventHelper.EVENT_BOOKING_BOOKING_SUBMITTED, this.selectedPackage.arrangement, this.selectedPackage.id);
1692
+ this.eventHelper.sendEvent(RecrasEventHelper.PREFIX_BOOKING, RecrasEventHelper.EVENT_BOOKING_BOOKING_SUBMITTED, this.selectedPackage.arrangement, Math.round(this.getTotalPrice()));
1693
1693
  var paymentMethod = this.paymentMethods(this.selectedPackage)[0];
1694
1694
  var paymentMethodEl = this.findElement('[name="paymentMethod"]:checked');
1695
1695
 
@@ -3646,7 +3646,7 @@ var RecrasVoucher = /*#__PURE__*/function () {
3646
3646
  return false;
3647
3647
  }
3648
3648
 
3649
- this.eventHelper.sendEvent(RecrasEventHelper.PREFIX_VOUCHER, RecrasEventHelper.EVENT_VOUCHER_VOUCHER_SUBMITTED, this.selectedTemplate.name, this.selectedTemplate.id);
3649
+ this.eventHelper.sendEvent(RecrasEventHelper.PREFIX_VOUCHER, RecrasEventHelper.EVENT_VOUCHER_VOUCHER_SUBMITTED, this.selectedTemplate.name, Math.round(this.totalPrice()));
3650
3650
  this.findElement('.buyTemplate').setAttribute('disabled', 'disabled');
3651
3651
  var payload = {
3652
3652
  voucher_template_id: this.selectedTemplate.id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recras/online-booking-js",
3
- "version": "1.10.2",
3
+ "version": "1.10.3",
4
4
  "description": "JS library for easy integration of Recras online booking and voucher sales",
5
5
  "main": "dist/onlinebooking.js",
6
6
  "scripts": {
package/src/booking.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*******************************
2
2
  * Recras integration library *
3
- * v 1.10.2 *
3
+ * v 1.10.3 *
4
4
  *******************************/
5
5
 
6
6
  class RecrasBooking {
@@ -1391,7 +1391,7 @@ ${ msgs[1] }</p></div>`);
1391
1391
  RecrasEventHelper.PREFIX_BOOKING,
1392
1392
  RecrasEventHelper.EVENT_BOOKING_BOOKING_SUBMITTED,
1393
1393
  this.selectedPackage.arrangement,
1394
- this.selectedPackage.id
1394
+ Math.round(this.getTotalPrice())
1395
1395
  );
1396
1396
 
1397
1397
  let paymentMethod = this.paymentMethods(this.selectedPackage)[0];
package/src/vouchers.js CHANGED
@@ -53,7 +53,7 @@ class RecrasVoucher {
53
53
  RecrasEventHelper.PREFIX_VOUCHER,
54
54
  RecrasEventHelper.EVENT_VOUCHER_VOUCHER_SUBMITTED,
55
55
  this.selectedTemplate.name,
56
- this.selectedTemplate.id
56
+ Math.round(this.totalPrice())
57
57
  );
58
58
  this.findElement('.buyTemplate').setAttribute('disabled', 'disabled');
59
59
 
package/upgrading.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 1.10.2 -> 1.10.3
2
+ * The value of "BuyInProgress" events sent to Google Analytics was changed from package ID to total price. This is true for both bookings and vouchers. We consider this a bugfix and not a backwards-compatibility breaking change.
3
+
1
4
  # 1.2.0 -> 1.3.0
2
5
  * Option `showSubmit` for contact forms (only used internally) is now named `standalone`. The old option will remain as alias until the next major version.
3
6