@recras/online-booking-js 1.10.3 → 2.0.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.
- package/README.md +7 -2
- package/changelog.md +12 -0
- package/dist/onlinebooking.js +199 -152
- package/dist/onlinebooking.min.js +1 -0
- package/docs/onlinebooking.html +2 -5
- package/package.json +20 -18
- package/src/booking.js +50 -14
- package/src/contactForm.js +0 -4
- package/src/cssHelper.js +0 -29
- package/src/eventHelper.js +39 -43
- package/src/vouchers.js +21 -2
- package/test/js-unit/recrasOptionsSpec.js +0 -3
- package/upgrading.md +5 -0
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[](https://travis-ci.org/Recras/online-booking-js)
|
|
2
2
|
|
|
3
3
|
# Recras JS Integration Library
|
|
4
|
-
Version:
|
|
4
|
+
Version: 2.0.1
|
|
5
5
|
|
|
6
6
|
JS library for easy online booking, contact form, and voucher integration
|
|
7
7
|
|
|
@@ -128,7 +128,7 @@ The library sends out a few custom events when certain things change:
|
|
|
128
128
|
You can use these events for custom actions, such as analytics. For use in code, please refer to
|
|
129
129
|
the constants in [src/eventHelper.js](src/eventHelper.js).
|
|
130
130
|
|
|
131
|
-
When Google Analytics integration is enabled, certain events sent to GA include a label and/or value:
|
|
131
|
+
When Google Analytics integration is enabled, certain events are sent to GA. Which events are sent depends on the version of GA you are using. For Universal Analytics (v3) and older, these custom events are sent and they include a label and/or value:
|
|
132
132
|
|
|
133
133
|
| Event | Label | Value |
|
|
134
134
|
| ---------------------------------- | --------------------------------- |-------------------------------------|
|
|
@@ -140,3 +140,8 @@ When Google Analytics integration is enabled, certain events sent to GA include
|
|
|
140
140
|
| `Recras:Voucher:TemplateChanged` | N/A | Template ID |
|
|
141
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 |
|
|
143
|
+
|
|
144
|
+
For GA4, these events are sent:
|
|
145
|
+
* when a package is selected: `select_content`. The ID of the package is included.
|
|
146
|
+
* when a voucher is selected: `select_content`. The ID of the template is included.
|
|
147
|
+
* when the user is redirected to the payment provider: `begin_checkout`. The total amount as well as all selected items (name, price, quantity) are included.
|
package/changelog.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.1 (2022-06-22)
|
|
4
|
+
* "Number of people" on a package line was incorrectly used as minimum quantity - fixed
|
|
5
|
+
|
|
6
|
+
## 2.0.0 (2022-05-16)
|
|
7
|
+
* Fix GA4 events
|
|
8
|
+
* Support for Google Analytics v2 has been dropped
|
|
9
|
+
* Support for Internet Explorer and old Edge (12-15) has been dropped
|
|
10
|
+
|
|
11
|
+
## 1.11.0 (2022-04-04)
|
|
12
|
+
* Add support for Google Analytics v4 (GA4)
|
|
13
|
+
* Minified version of the script is now included
|
|
14
|
+
|
|
3
15
|
## 1.10.3 (2021-12-16)
|
|
4
16
|
* Change value of "BuyInProgress" events from package/template ID (bookings/vouchers, respectively) to total price
|
|
5
17
|
|