@bigz-app/booking-widget 0.2.3 → 0.3.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 +28 -2
- package/dist/booking-widget.js +397 -76
- package/dist/booking-widget.js.map +1 -1
- package/dist/components/BookingForm.d.ts.map +1 -1
- package/dist/components/BookingSuccessModal.d.ts.map +1 -1
- package/dist/components/EventInstanceSelection.d.ts +0 -1
- package/dist/components/EventInstanceSelection.d.ts.map +1 -1
- package/dist/components/PaymentForm.d.ts.map +1 -1
- package/dist/components/UniversalBookingWidget.d.ts +21 -0
- package/dist/components/UniversalBookingWidget.d.ts.map +1 -1
- package/dist/index.cjs +397 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +397 -76
- package/dist/index.esm.js.map +1 -1
- package/dist/utils/google-ads-tracking.d.ts +65 -0
- package/dist/utils/google-ads-tracking.d.ts.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ pnpm install @bigz-app/booking-widget
|
|
|
10
10
|
|
|
11
11
|
## Quick Start
|
|
12
12
|
|
|
13
|
-
Import the widget and provide the necessary configuration. The widget handles the entire booking flow, from event selection to payment.
|
|
13
|
+
Import the widget and provide the necessary configuration. The widget handles the entire booking flow, from event selection to payment, with optional Google Ads conversion tracking.
|
|
14
14
|
|
|
15
15
|
```tsx
|
|
16
16
|
import { UniversalBookingWidget } from '@bigz-app/booking-widget';
|
|
@@ -100,4 +100,30 @@ The widget can be configured dynamically using URL query parameters. These will
|
|
|
100
100
|
| `instanceId` | `eventInstanceId`| `?instanceId=123` |
|
|
101
101
|
| `categoryId` | `categoryId` | `?categoryId=1` |
|
|
102
102
|
| `eventTypeId` | `eventTypeId` | `?eventTypeId=5` |
|
|
103
|
-
| `eventTypeIds` | `eventTypeIds` | `?eventTypeIds=1,3,5` |
|
|
103
|
+
| `eventTypeIds` | `eventTypeIds` | `?eventTypeIds=1,3,5` |
|
|
104
|
+
|
|
105
|
+
## Google Ads Conversion Tracking
|
|
106
|
+
|
|
107
|
+
The widget supports automatic Google Ads conversion tracking when payments are successful. This feature requires Google Consent Mode to be implemented on your website.
|
|
108
|
+
|
|
109
|
+
```tsx
|
|
110
|
+
const config = {
|
|
111
|
+
// ... your existing config
|
|
112
|
+
googleAds: {
|
|
113
|
+
tagId: 'AW-XXXXXXX', // Your Google Ads Tag ID (required)
|
|
114
|
+
conversionId: 'booking_conversion', // Your conversion label (required)
|
|
115
|
+
conversionCurrency: 'EUR', // Optional, defaults to 'EUR'
|
|
116
|
+
includeValue: true // Optional, defaults to true
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Key Features:**
|
|
122
|
+
- ✅ Uses Google Consent Mode for proper consent management
|
|
123
|
+
- ✅ Prevents duplicate gtag initialization
|
|
124
|
+
- ✅ Includes booking value and transaction ID
|
|
125
|
+
- ✅ Automatic error handling and fallbacks
|
|
126
|
+
|
|
127
|
+
**Required:** You must implement [Google Consent Mode](https://developers.google.com/tag-platform/security/consent) on your website for tracking to work.
|
|
128
|
+
|
|
129
|
+
For detailed setup instructions, see [Google Ads Tracking Documentation](./docs/google-ads-tracking.md).
|