@bigz-app/booking-widget 0.3.0 → 0.3.2

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 +1 @@
1
- {"version":3,"file":"BookingForm.d.ts","sourceRoot":"","sources":["../../src/components/BookingForm.tsx"],"names":[],"mappings":"AAoCA,UAAU,YAAY;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE;QACT,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACd,CAAC;IACF,YAAY,EAAE;QACb,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;IACF,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAYD,UAAU,gBAAgB;IACzB,MAAM,EAAE,GAAG,CAAC;IACZ,YAAY,EAAE,YAAY,CAAC;IAC3B,aAAa,EAAE,GAAG,CAAC;IACnB,SAAS,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,iBAAiB,CAAC,EAAE,GAAG,CAAC;IACxB,qBAAqB,CAAC,EAAE,GAAG,CAAC;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,CAAC,EAAE;QACd,UAAU,EAAE,MAAM,CAAC;QACnB,oBAAoB,EAAE,MAAM,CAAC;QAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC5B,GAAG,IAAI,CAAC;CACT;AAqCD,wBAAgB,WAAW,CAAC,EAC3B,MAAM,EACN,YAAY,EACZ,aAAa,EACb,SAAS,EACT,OAAO,EACP,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,MAAM,EACN,OAAO,EACP,YAAY,GACZ,EAAE,gBAAgB,2CAwqClB"}
1
+ {"version":3,"file":"BookingForm.d.ts","sourceRoot":"","sources":["../../src/components/BookingForm.tsx"],"names":[],"mappings":"AA+CA,UAAU,YAAY;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE;QACT,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACd,CAAC;IACF,YAAY,EAAE;QACb,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;IACF,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAYD,UAAU,gBAAgB;IACzB,MAAM,EAAE,GAAG,CAAC;IACZ,YAAY,EAAE,YAAY,CAAC;IAC3B,aAAa,EAAE,GAAG,CAAC;IACnB,SAAS,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,iBAAiB,CAAC,EAAE,GAAG,CAAC;IACxB,qBAAqB,CAAC,EAAE,GAAG,CAAC;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,CAAC,EAAE;QACd,UAAU,EAAE,MAAM,CAAC;QACnB,oBAAoB,EAAE,MAAM,CAAC;QAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC5B,GAAG,IAAI,CAAC;CACT;AAqCD,wBAAgB,WAAW,CAAC,EAC3B,MAAM,EACN,YAAY,EACZ,aAAa,EACb,SAAS,EACT,OAAO,EACP,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,MAAM,EACN,OAAO,EACP,YAAY,GACZ,EAAE,gBAAgB,2CAwqClB"}
@@ -1 +1 @@
1
- {"version":3,"file":"BookingSuccessModal.d.ts","sourceRoot":"","sources":["../../src/components/BookingSuccessModal.tsx"],"names":[],"mappings":"AAWA,UAAU,wBAAwB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,eAAO,MAAM,mBAAmB,GAAI,wDAMjC,wBAAwB,mDA+uB1B,CAAC"}
1
+ {"version":3,"file":"BookingSuccessModal.d.ts","sourceRoot":"","sources":["../../src/components/BookingSuccessModal.tsx"],"names":[],"mappings":"AAeA,UAAU,wBAAwB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,eAAO,MAAM,mBAAmB,GAAI,wDAMjC,wBAAwB,mDAywB1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PaymentForm.d.ts","sourceRoot":"","sources":["../../src/components/PaymentForm.tsx"],"names":[],"mappings":"AAIA,UAAU,gBAAgB;IACzB,MAAM,EAAE,GAAG,CAAC;IACZ,YAAY,EAAE,GAAG,CAAC;IAClB,QAAQ,EAAE,GAAG,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,GAAG,CAAC;IAClB,SAAS,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,YAAY,CAAC,EAAE;QACd,UAAU,EAAE,MAAM,CAAC;QACnB,oBAAoB,EAAE,MAAM,CAAC;QAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC5B,GAAG,IAAI,CAAC;IACT,aAAa,EAAE,GAAG,CAAC;IACnB,gBAAgB,CAAC,EAAE,GAAG,CAAC;CACvB;AA+ND,wBAAgB,WAAW,CAAC,EAC3B,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,SAAS,EACT,OAAO,EACP,YAAY,EACZ,aAAa,EACb,gBAAgB,GAChB,EAAE,gBAAgB,2CAuLlB"}
1
+ {"version":3,"file":"PaymentForm.d.ts","sourceRoot":"","sources":["../../src/components/PaymentForm.tsx"],"names":[],"mappings":"AAIA,UAAU,gBAAgB;IACzB,MAAM,EAAE,GAAG,CAAC;IACZ,YAAY,EAAE,GAAG,CAAC;IAClB,QAAQ,EAAE,GAAG,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,GAAG,CAAC;IAClB,SAAS,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,YAAY,CAAC,EAAE;QACd,UAAU,EAAE,MAAM,CAAC;QACnB,oBAAoB,EAAE,MAAM,CAAC;QAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC5B,GAAG,IAAI,CAAC;IACT,aAAa,EAAE,GAAG,CAAC;IACnB,gBAAgB,CAAC,EAAE,GAAG,CAAC;CACvB;AA+ND,wBAAgB,WAAW,CAAC,EAC3B,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,SAAS,EACT,OAAO,EACP,YAAY,EACZ,aAAa,EACb,gBAAgB,GAChB,EAAE,gBAAgB,2CAyPlB"}
@@ -113,6 +113,27 @@ export interface UniversalBookingConfig {
113
113
  fontFamily?: string;
114
114
  buttonText?: string;
115
115
  locale?: string;
116
+ googleAds?: {
117
+ /**
118
+ * Google Ads Tag ID (e.g., 'AW-XXXXXXX')
119
+ * If not provided, no conversion tracking will be performed
120
+ */
121
+ tagId?: string;
122
+ /**
123
+ * Google Ads Conversion ID/Label (e.g., 'booking_conversion')
124
+ * If not provided, no conversion tracking will be performed
125
+ */
126
+ conversionId?: string;
127
+ /**
128
+ * Optional conversion currency (defaults to 'EUR')
129
+ */
130
+ conversionCurrency?: string;
131
+ /**
132
+ * Whether to include the booking value as conversion value (default: true)
133
+ * If false, no conversion value will be sent
134
+ */
135
+ includeValue?: boolean;
136
+ };
116
137
  onSuccess?: (result: any) => void;
117
138
  onError?: (error: string) => void;
118
139
  }
@@ -1 +1 @@
1
- {"version":3,"file":"UniversalBookingWidget.d.ts","sourceRoot":"","sources":["../../src/components/UniversalBookingWidget.tsx"],"names":[],"mappings":"AAmBA,MAAM,WAAW,SAAS;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE;QACT,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACd,CAAC;IACF,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,uBAAuB,EAAE,MAAM,CAAC;IAChC,qBAAqB,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,aAAa;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,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,CAAC,EAAE,MAAM,CAAC;QACpB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,SAAS,CAAC,EAAE;QACX;;;WAGG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf;;;WAGG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QAEtB;;WAEG;QACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAE5B;;;WAGG;QACH,YAAY,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC;IAGF,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAKD,wBAAgB,sBAAsB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE;IAAE,MAAM,EAAE,sBAAsB,CAAA;CAAE,2CA88BhG"}
package/dist/index.cjs CHANGED
@@ -257,9 +257,9 @@ const resolveSemanticColor = (colorValue, fallbackValue) => {
257
257
  const themes = {
258
258
  // --- Light Themes ---
259
259
  "light-fresh": {
260
- highlight: "oklch(0.65 0.2 190)", // accent-strong
261
- background: "oklch(0.99 0.005 220)", // neutral-strong (background)
262
- surface: "oklch(1 0 0)", // card (pure white)
260
+ highlight: "#00a8a1", // accent-strong
261
+ background: "#f8fdfe", // neutral-strong (background)
262
+ surface: "#ffffff", // card (pure white)
263
263
  text: "#0e7490", // Turquoise 800
264
264
  border: "#bae6fd", // Blue 200
265
265
  success: "#38bdf8", // Blue 400
@@ -9284,6 +9284,64 @@ function PaymentForm({ config, eventDetails, formData, totalAmount, discountCode
9284
9284
  const [paymentIntentId, setPaymentIntentId] = React__default.useState(null);
9285
9285
  const [isCreatingPaymentIntent, setIsCreatingPaymentIntent] = React__default.useState(false);
9286
9286
  const [paymentError, setPaymentError] = React__default.useState(null);
9287
+ // LocalStorage persistence (scoped by organization + event) for paymentIntentId only
9288
+ const storageKey = typeof window !== "undefined"
9289
+ ? `bw_pi_${config?.organizationId}_${config?.eventInstanceId || eventDetails?.id}`
9290
+ : "";
9291
+ const PAYMENT_INTENT_TTL = 24 * 60 * 60 * 1000; // 24 hours
9292
+ function loadPersistedPaymentIntent() {
9293
+ if (typeof window === "undefined" || !storageKey)
9294
+ return null;
9295
+ try {
9296
+ const raw = window.localStorage.getItem(storageKey);
9297
+ if (!raw)
9298
+ return null;
9299
+ const parsed = JSON.parse(raw);
9300
+ if (!parsed?.id || !parsed?.ts)
9301
+ return null;
9302
+ if (Date.now() - parsed.ts > PAYMENT_INTENT_TTL) {
9303
+ window.localStorage.removeItem(storageKey);
9304
+ return null;
9305
+ }
9306
+ return parsed.id;
9307
+ }
9308
+ catch {
9309
+ return null;
9310
+ }
9311
+ }
9312
+ function persistPaymentIntent(id) {
9313
+ if (typeof window === "undefined" || !storageKey || !id)
9314
+ return;
9315
+ try {
9316
+ const payload = { id, ts: Date.now() };
9317
+ window.localStorage.setItem(storageKey, JSON.stringify(payload));
9318
+ }
9319
+ catch { }
9320
+ }
9321
+ function clearPersistedPaymentIntent() {
9322
+ if (typeof window === "undefined" || !storageKey)
9323
+ return;
9324
+ try {
9325
+ window.localStorage.removeItem(storageKey);
9326
+ }
9327
+ catch { }
9328
+ }
9329
+ // On mount (and when scope changes), restore persisted paymentIntentId
9330
+ React__default.useEffect(() => {
9331
+ if (!paymentIntentId) {
9332
+ const restored = loadPersistedPaymentIntent();
9333
+ if (restored) {
9334
+ setPaymentIntentId(restored);
9335
+ }
9336
+ }
9337
+ // eslint-disable-next-line react-hooks/exhaustive-deps
9338
+ }, [storageKey]);
9339
+ // Persist whenever paymentIntentId changes
9340
+ React__default.useEffect(() => {
9341
+ if (paymentIntentId) {
9342
+ persistPaymentIntent(paymentIntentId);
9343
+ }
9344
+ }, [paymentIntentId]);
9287
9345
  // Create payment intent when component mounts or when relevant data changes
9288
9346
  React__default.useEffect(() => {
9289
9347
  const createPaymentIntent = async () => {
@@ -9413,7 +9471,13 @@ function PaymentForm({ config, eventDetails, formData, totalAmount, discountCode
9413
9471
  clientSecret,
9414
9472
  appearance: stripeAppearance || { theme: "stripe" },
9415
9473
  locale: config.locale || "de",
9416
- }, children: jsxRuntime.jsx(PaymentFormInner, { config: config, eventDetails: eventDetails, formData: formData, totalAmount: totalAmount, discountCode: discountCode, onSuccess: onSuccess, onError: onError, systemConfig: systemConfig, clientSecret: clientSecret }) }));
9474
+ }, children: jsxRuntime.jsx(PaymentFormInner, { config: config, eventDetails: eventDetails, formData: formData, totalAmount: totalAmount, discountCode: discountCode, onSuccess: (result) => {
9475
+ // Clear persisted PI data on successful payment
9476
+ clearPersistedPaymentIntent();
9477
+ setPaymentIntentId(null);
9478
+ setClientSecret(null);
9479
+ onSuccess(result);
9480
+ }, onError: onError, systemConfig: systemConfig, clientSecret: clientSecret }) }));
9417
9481
  }
9418
9482
 
9419
9483
  function Sidebar({ isOpen, onClose, title, children, width = "450px" }) {
@@ -10228,6 +10292,317 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
10228
10292
  ` })] }) }));
10229
10293
  }
10230
10294
 
10295
+ /**
10296
+ * Google Ads Conversion Tracking Utility
10297
+ *
10298
+ * This utility handles Google Ads conversion tracking for the booking widget.
10299
+ * It includes consent checking, gtag initialization, and conversion tracking.
10300
+ */
10301
+ /**
10302
+ * Check if Google Consent Mode has granted the necessary permissions for ads tracking
10303
+ * This checks multiple sources of consent state in order of preference
10304
+ */
10305
+ function checkGoogleConsent() {
10306
+ console.log("[Google Ads Tracking] 🔍 Checking Google consent...");
10307
+ if (typeof window === "undefined") {
10308
+ console.log("[Google Ads Tracking] ❌ Window object not available (SSR context)");
10309
+ return false;
10310
+ }
10311
+ console.log("[Google Ads Tracking] ✅ Window object available");
10312
+ // Method 1: Check dataLayer for consent_update events (most reliable)
10313
+ if (window.dataLayer && Array.isArray(window.dataLayer)) {
10314
+ console.log("[Google Ads Tracking] 🔍 Checking dataLayer for consent events...");
10315
+ const dataLayer = window.dataLayer;
10316
+ // Debug: Show the entire dataLayer contents
10317
+ console.log("[Google Ads Tracking] 🗂️ Complete dataLayer contents:", JSON.stringify(dataLayer, null, 2));
10318
+ console.log("[Google Ads Tracking] 📊 dataLayer length:", dataLayer.length);
10319
+ // Look for the most recent consent update in dataLayer
10320
+ let latestConsentState = null;
10321
+ const foundEvents = [];
10322
+ // Search backwards through dataLayer for most recent consent state
10323
+ for (let i = dataLayer.length - 1; i >= 0; i--) {
10324
+ const event = dataLayer[i];
10325
+ console.log(`[Google Ads Tracking] 🔍 Checking dataLayer[${i}]:`, event);
10326
+ if (event && typeof event === "object") {
10327
+ // Check for various consent event patterns
10328
+ if (event.event === "consent_update" || event.event === "default_consent") {
10329
+ console.log("[Google Ads Tracking] 📋 Found consent event:", event);
10330
+ foundEvents.push(event);
10331
+ if (event.consent_mode) {
10332
+ latestConsentState = event.consent_mode;
10333
+ break;
10334
+ }
10335
+ }
10336
+ // Also check for direct consent_mode properties
10337
+ if (event.consent_mode) {
10338
+ console.log("[Google Ads Tracking] 📋 Found consent_mode property:", event);
10339
+ foundEvents.push(event);
10340
+ latestConsentState = event.consent_mode;
10341
+ break;
10342
+ }
10343
+ }
10344
+ }
10345
+ console.log("[Google Ads Tracking] 📋 All found consent events:", foundEvents);
10346
+ if (latestConsentState) {
10347
+ const adStorageGranted = latestConsentState.ad_storage === "granted";
10348
+ console.log("[Google Ads Tracking] 🔐 ad_storage from dataLayer:", latestConsentState.ad_storage);
10349
+ console.log("[Google Ads Tracking] 🎯 Consent result from dataLayer:", adStorageGranted);
10350
+ return adStorageGranted;
10351
+ }
10352
+ console.log("[Google Ads Tracking] ❌ No consent events found in dataLayer");
10353
+ }
10354
+ console.log("[Google Ads Tracking] ❌ dataLayer not found or not an array");
10355
+ // Method 2: Check for cookie-based consent (fallback for host implementation)
10356
+ console.log("[Google Ads Tracking] 🔍 Checking cookie-based consent...");
10357
+ try {
10358
+ // Debug: Show all cookies
10359
+ console.log("[Google Ads Tracking] 🍪 All cookies:", document.cookie);
10360
+ const allCookies = document.cookie.split(";").map((cookie) => cookie.trim());
10361
+ console.log("[Google Ads Tracking] 🍪 Parsed cookies:", allCookies);
10362
+ // Check for the host page's conversion tracking consent cookie
10363
+ const conversionTrackingCookie = document.cookie
10364
+ .split(";")
10365
+ .find((cookie) => cookie.trim().startsWith("conversionTrackingConsent="));
10366
+ if (conversionTrackingCookie) {
10367
+ const cookieValue = conversionTrackingCookie.split("=")[1];
10368
+ const isGranted = cookieValue === "true";
10369
+ console.log("[Google Ads Tracking] 🍪 Found conversionTrackingConsent cookie:", cookieValue);
10370
+ console.log("[Google Ads Tracking] 🎯 Consent result from cookie:", isGranted);
10371
+ return isGranted;
10372
+ }
10373
+ console.log("[Google Ads Tracking] ❌ conversionTrackingConsent cookie not found");
10374
+ // Also check for other potential cookie names
10375
+ const alternativeCookieNames = ["analyticsConsent", "ads_consent", "ad_storage"];
10376
+ for (const cookieName of alternativeCookieNames) {
10377
+ const alternativeCookie = allCookies.find((cookie) => cookie.startsWith(`${cookieName}=`));
10378
+ if (alternativeCookie) {
10379
+ console.log(`[Google Ads Tracking] 🍪 Found alternative cookie ${cookieName}:`, alternativeCookie);
10380
+ }
10381
+ }
10382
+ }
10383
+ catch (error) {
10384
+ console.warn("[Google Ads Tracking] ⚠️ Error checking cookies:", error);
10385
+ }
10386
+ // Method 3: Check if gtag exists but no consent state found
10387
+ if (typeof window.gtag === "function") {
10388
+ console.log("[Google Ads Tracking] ⚠️ gtag function exists but no consent state found");
10389
+ console.log("[Google Ads Tracking] 💡 This might indicate consent hasn't been set yet");
10390
+ }
10391
+ else {
10392
+ console.log("[Google Ads Tracking] ❌ gtag function not found");
10393
+ }
10394
+ // If no consent mechanism is found, assume consent is not granted
10395
+ console.log("[Google Ads Tracking] 🚫 No valid consent state found, returning false");
10396
+ return false;
10397
+ }
10398
+ /**
10399
+ * Check if gtag is already initialized on the host page
10400
+ */
10401
+ function isGtagInitialized() {
10402
+ console.log("[Google Ads Tracking] 🔍 Checking if gtag is initialized...");
10403
+ if (typeof window === "undefined") {
10404
+ console.log("[Google Ads Tracking] ❌ Window object not available (SSR context)");
10405
+ return false;
10406
+ }
10407
+ console.log("[Google Ads Tracking] ✅ Window object available");
10408
+ // Check if gtag function exists
10409
+ if (typeof window.gtag === "function") {
10410
+ console.log("[Google Ads Tracking] ✅ gtag function exists");
10411
+ return true;
10412
+ }
10413
+ console.log("[Google Ads Tracking] ❌ gtag function not found, checking for scripts...");
10414
+ // Check if Google Analytics or Google Ads scripts are already loaded
10415
+ const scripts = document.querySelectorAll('script[src*="googletagmanager.com"]');
10416
+ console.log("[Google Ads Tracking] 📜 Found", scripts.length, "Google Tag Manager scripts");
10417
+ const isInitialized = scripts.length > 0;
10418
+ console.log("[Google Ads Tracking] 🎯 gtag initialization status:", isInitialized);
10419
+ return isInitialized;
10420
+ }
10421
+ /**
10422
+ * Initialize Google Tag (gtag) if not already present
10423
+ */
10424
+ function initializeGtag(tagId) {
10425
+ console.log("[Google Ads Tracking] 🚀 Starting gtag initialization with tagId:", tagId);
10426
+ return new Promise((resolve, reject) => {
10427
+ if (typeof window === "undefined") {
10428
+ console.log("[Google Ads Tracking] ❌ Window object not available (SSR context)");
10429
+ reject(new Error("Window object not available"));
10430
+ return;
10431
+ }
10432
+ console.log("[Google Ads Tracking] ✅ Window object available");
10433
+ // If gtag is already initialized, just resolve
10434
+ if (isGtagInitialized()) {
10435
+ console.log("[Google Ads Tracking] ⚡ gtag already initialized, skipping setup");
10436
+ resolve();
10437
+ return;
10438
+ }
10439
+ console.log("[Google Ads Tracking] 📦 gtag not found, creating new script element...");
10440
+ try {
10441
+ // Create the gtag script
10442
+ const script = document.createElement("script");
10443
+ script.async = true;
10444
+ script.src = `https://www.googletagmanager.com/gtag/js?id=${tagId}`;
10445
+ console.log("[Google Ads Tracking] 🌐 Script src set to:", script.src);
10446
+ script.onload = () => {
10447
+ console.log("[Google Ads Tracking] 📥 Script loaded successfully, initializing gtag...");
10448
+ // Initialize gtag
10449
+ window.dataLayer = window.dataLayer || [];
10450
+ console.log("[Google Ads Tracking] 📊 dataLayer initialized");
10451
+ window.gtag = (...args) => {
10452
+ window.dataLayer.push(args);
10453
+ };
10454
+ console.log("[Google Ads Tracking] 🔧 gtag function created");
10455
+ // Configure gtag
10456
+ console.log("[Google Ads Tracking] ⚙️ Configuring gtag with privacy settings...");
10457
+ window.gtag("js", new Date());
10458
+ window.gtag("config", tagId, {
10459
+ // Respect consent settings
10460
+ anonymize_ip: true,
10461
+ allow_google_signals: false,
10462
+ allow_ad_personalization_signals: false,
10463
+ });
10464
+ console.log("[Google Ads Tracking] ✅ gtag initialized successfully with tagId:", tagId);
10465
+ resolve();
10466
+ };
10467
+ script.onerror = (error) => {
10468
+ console.error("[Google Ads Tracking] ❌ Failed to load Google Tag script:", error);
10469
+ reject(new Error("Failed to load Google Tag script"));
10470
+ };
10471
+ console.log("[Google Ads Tracking] 📑 Adding script to document head...");
10472
+ // Add script to head
10473
+ document.head.appendChild(script);
10474
+ console.log("[Google Ads Tracking] ✅ Script element appended to head");
10475
+ }
10476
+ catch (error) {
10477
+ console.error("[Google Ads Tracking] ❌ Error during gtag initialization:", error);
10478
+ reject(error);
10479
+ }
10480
+ });
10481
+ }
10482
+ /**
10483
+ * Track a Google Ads conversion
10484
+ */
10485
+ function trackConversion(config) {
10486
+ console.log("[Google Ads Tracking] 🎯 Starting conversion tracking with config:", config);
10487
+ if (typeof window === "undefined") {
10488
+ console.warn("[Google Ads Tracking] ❌ Window object not available");
10489
+ return;
10490
+ }
10491
+ console.log("[Google Ads Tracking] ✅ Window object available");
10492
+ if (!config.tagId || !config.conversionId) {
10493
+ console.warn("[Google Ads Tracking] ❌ Missing tagId or conversionId", {
10494
+ tagId: config.tagId,
10495
+ conversionId: config.conversionId,
10496
+ });
10497
+ return;
10498
+ }
10499
+ console.log("[Google Ads Tracking] ✅ Required config fields present:", {
10500
+ tagId: config.tagId,
10501
+ conversionId: config.conversionId,
10502
+ });
10503
+ if (typeof window.gtag !== "function") {
10504
+ console.warn("[Google Ads Tracking] ❌ gtag function not available");
10505
+ return;
10506
+ }
10507
+ console.log("[Google Ads Tracking] ✅ gtag function is available");
10508
+ try {
10509
+ console.log("[Google Ads Tracking] 🔧 Building conversion data...");
10510
+ const conversionData = {
10511
+ send_to: `${config.tagId}/${config.conversionId}`,
10512
+ };
10513
+ console.log("[Google Ads Tracking] 📋 Base conversion data:", conversionData);
10514
+ // Add optional parameters
10515
+ if (config.conversionValue !== undefined) {
10516
+ conversionData.value = config.conversionValue;
10517
+ console.log("[Google Ads Tracking] 💰 Added conversion value:", config.conversionValue);
10518
+ }
10519
+ if (config.conversionCurrency) {
10520
+ conversionData.currency = config.conversionCurrency;
10521
+ console.log("[Google Ads Tracking] 💱 Added currency:", config.conversionCurrency);
10522
+ }
10523
+ if (config.transactionId) {
10524
+ conversionData.transaction_id = config.transactionId;
10525
+ console.log("[Google Ads Tracking] 🔖 Added transaction ID:", config.transactionId);
10526
+ }
10527
+ console.log("[Google Ads Tracking] 📦 Final conversion data:", conversionData);
10528
+ // Track the conversion
10529
+ console.log("[Google Ads Tracking] 🚀 Sending conversion event to gtag...");
10530
+ window.gtag("event", "conversion", conversionData);
10531
+ console.log("[Google Ads Tracking] ✅ Conversion tracked successfully:", conversionData);
10532
+ }
10533
+ catch (error) {
10534
+ console.error("[Google Ads Tracking] ❌ Error tracking conversion:", error);
10535
+ }
10536
+ }
10537
+ /**
10538
+ * Main function to handle Google Ads conversion tracking
10539
+ * This function checks consent, initializes gtag if needed, and tracks the conversion
10540
+ */
10541
+ async function handleGoogleAdsConversion(config) {
10542
+ console.log("[Google Ads Tracking] 🎬 Starting handleGoogleAdsConversion with config:", config);
10543
+ // Validate config
10544
+ if (!config.tagId || !config.conversionId) {
10545
+ console.log("[Google Ads Tracking] ❌ No tagId or conversionId provided, skipping conversion tracking", { tagId: config.tagId, conversionId: config.conversionId });
10546
+ return;
10547
+ }
10548
+ console.log("[Google Ads Tracking] ✅ Config validation passed");
10549
+ // Check consent first
10550
+ console.log("[Google Ads Tracking] 🔐 Checking consent...");
10551
+ if (!checkGoogleConsent()) {
10552
+ console.log("[Google Ads Tracking] 🚫 Google consent not granted, skipping conversion tracking");
10553
+ return;
10554
+ }
10555
+ console.log("[Google Ads Tracking] ✅ Consent check passed");
10556
+ try {
10557
+ // Initialize gtag if not already present
10558
+ console.log("[Google Ads Tracking] 🔍 Checking if gtag needs initialization...");
10559
+ if (!isGtagInitialized()) {
10560
+ console.log("[Google Ads Tracking] 🚀 Initializing gtag...");
10561
+ await initializeGtag(config.tagId);
10562
+ console.log("[Google Ads Tracking] ✅ gtag initialization completed");
10563
+ }
10564
+ else {
10565
+ console.log("[Google Ads Tracking] ⚡ gtag already initialized, proceeding...");
10566
+ }
10567
+ // Small delay to ensure gtag is ready
10568
+ console.log("[Google Ads Tracking] ⏱️ Adding 100ms delay to ensure gtag is ready...");
10569
+ setTimeout(() => {
10570
+ console.log("[Google Ads Tracking] 🎯 Delay completed, tracking conversion...");
10571
+ trackConversion(config);
10572
+ }, 100);
10573
+ }
10574
+ catch (error) {
10575
+ console.error("[Google Ads Tracking] ❌ Error handling conversion:", error);
10576
+ }
10577
+ }
10578
+ /**
10579
+ * Utility function to get conversion value from booking data
10580
+ */
10581
+ function getConversionValueFromBooking(bookingData) {
10582
+ console.log("[Google Ads Tracking] 💰 Extracting conversion value from booking data:", bookingData);
10583
+ // Try to get the total amount from various possible structures
10584
+ const possiblePaths = [
10585
+ { path: "order.total", value: bookingData?.order?.total },
10586
+ { path: "booking.total", value: bookingData?.booking?.total },
10587
+ { path: "total", value: bookingData?.total },
10588
+ { path: "amount", value: bookingData?.amount },
10589
+ { path: "payment.amount", value: bookingData?.payment?.amount },
10590
+ { path: "stripePaymentIntent.amount", value: bookingData?.stripePaymentIntent?.amount },
10591
+ ];
10592
+ console.log("[Google Ads Tracking] 🔍 Checking possible value paths:", possiblePaths);
10593
+ for (const { path, value } of possiblePaths) {
10594
+ console.log(`[Google Ads Tracking] 📋 Checking path '${path}':`, value);
10595
+ if (typeof value === "number" && value > 0) {
10596
+ // Convert from cents to euros
10597
+ const convertedValue = value / 100;
10598
+ console.log(`[Google Ads Tracking] ✅ Found valid value at '${path}': ${value} cents = ${convertedValue} euros`);
10599
+ return convertedValue;
10600
+ }
10601
+ }
10602
+ console.log("[Google Ads Tracking] ❌ No valid conversion value found in booking data");
10603
+ return undefined;
10604
+ }
10605
+
10231
10606
  const BookingSuccessModal = ({ isOpen, onClose, config, onError, paymentIntentId, }) => {
10232
10607
  const [bookingData, setBookingData] = React__default.useState(null);
10233
10608
  const [eventDetails, setEventDetails] = React__default.useState(null);
@@ -10272,6 +10647,27 @@ const BookingSuccessModal = ({ isOpen, onClose, config, onError, paymentIntentId
10272
10647
  });
10273
10648
  // Set payment status from Stripe data or order status
10274
10649
  setPaymentStatus(data.stripePaymentIntent?.status || data.order.status);
10650
+ // Trigger Google Ads conversion tracking if payment is successful
10651
+ const finalPaymentStatus = data.stripePaymentIntent?.status || data.order.status;
10652
+ if (finalPaymentStatus === "succeeded" &&
10653
+ config.googleAds?.tagId &&
10654
+ config.googleAds?.conversionId) {
10655
+ // Prepare conversion tracking data
10656
+ const conversionValue = config.googleAds.includeValue !== false
10657
+ ? getConversionValueFromBooking(data)
10658
+ : undefined;
10659
+ const transactionId = data.order.id;
10660
+ // Track the conversion
10661
+ handleGoogleAdsConversion({
10662
+ tagId: config.googleAds.tagId,
10663
+ conversionId: config.googleAds.conversionId,
10664
+ conversionValue,
10665
+ conversionCurrency: config.googleAds.conversionCurrency || "EUR",
10666
+ transactionId,
10667
+ }).catch((error) => {
10668
+ console.warn("[BookingSuccessModal] Google Ads conversion tracking failed:", error);
10669
+ });
10670
+ }
10275
10671
  }
10276
10672
  else {
10277
10673
  onError?.(data.error || "Fehler beim Abrufen der Buchungsdaten");
@@ -11868,7 +12264,6 @@ function UniversalBookingWidget({ config: baseConfig }) {
11868
12264
  body: JSON.stringify(requestBody),
11869
12265
  });
11870
12266
  const data = await response.json();
11871
- console.log("Event details response:", { status: response.status, data }); // Debug log
11872
12267
  if (response.ok) {
11873
12268
  setEventDetails(data.eventDetails);
11874
12269
  // Store system configuration for PaymentForm