1/** 2 * Exely booking-form â analytics. 3 * Fires once when a guest successfully completes a booking (onBookingSuccess). 4 * Goal / event name: booking (same id in Yandex Metrika and GA4). 5 */ 6(function (window) { 7 var GA_ID = "G-JYQ2D4YSDV"; 8 var YM_ID = 99750807; 9 var EVENT = "booking"; 10 var sent = Object.create(null); 11 12 function asyrTrackBookingSuccess(data) { 13 data = data || {}; 14 var bookingNumber = data.bookingNumber != null ? String(data.bookingNumber) : ""; 15 if (bookingNumber && sent[bookingNumber]) return; 16 if (bookingNumber) sent[bookingNumber] = true; 17 18 var value = data.price != null && data.price !== "" ? Number(data.price) : undefined; 19 if (value !== undefined && !isFinite(value)) value = undefined; 20 var currency = data.currency ? String(data.currency) : undefined; 21 22 try { 23 window.dataLayer = window.dataLayer || []; 24 window.dataLayer.push({ 25 event: EVENT, 26 booking_number: bookingNumber || undefined, 27 value: value, 28 currency: currency, 29 provider_name: data.providerName || undefined, 30 }); 31 } catch (_) {} 32 33 try { 34 if (typeof window.gtag === "function") { 35 var gaPayload = { send_to: GA_ID }; 36 if (bookingNumber) gaPayload.transaction_id = bookingNumber; 37 if (value !== undefined) gaPayload.value = value; 38 if (currency) gaPayload.currency = currency; 39 window.gtag("event", EVENT, gaPayload); 40 } 41 } catch (_) {} 42 43 try { 44 if (typeof window.ym === "function") { 45 window.ym(YM_ID, "reachGoal", EVENT); 46 } 47 } catch (_) {} 48 49 try { 50 if (typeof window.fbq === "function") { 51 window.fbq("track", "Lead"); 52 } 53 } catch (_) {} 54 55 try { 56 if (window.ttq && typeof window.ttq.track === "function") { 57 window.ttq.track("Contact"); 58 } 59 } catch (_) {} 60 } 61 62 window.asyrTrackBookingSuccess = asyrTrackBookingSuccess; 63})(window);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.