{"id":27119,"date":"2025-09-02T09:10:12","date_gmt":"2025-09-02T07:10:12","guid":{"rendered":"https:\/\/www.abacusmedicine.com\/de\/?page_id=27119"},"modified":"2025-09-10T12:29:34","modified_gmt":"2025-09-10T10:29:34","slug":"book","status":"publish","type":"page","link":"https:\/\/www.abacusmedicine.com\/de\/book\/","title":{"rendered":"Booking Relay"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"27119\" class=\"elementor elementor-27119\" data-elementor-post-type=\"page\">\n\t\t\t\t<div data-particle_enable=\"false\" data-particle-mobile-disabled=\"false\" class=\"elementor-element elementor-element-e072193 e-flex e-con-boxed e-con e-parent\" data-id=\"e072193\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4a3a371 elementor-widget elementor-widget-html\" data-id=\"4a3a371\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<style>\r\n  .wrap{min-height:60vh;display:grid;place-items:center;text-align:center;padding:2rem}\r\n  .card{max-width:680px;border:1px solid #eee;border-radius:16px;padding:28px;box-shadow:0 10px 30px rgba(0,0,0,.06)}\r\n  .muted{color:#666;font-size:14px}.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}\r\n<\/style>\r\n\r\n<main class=\"wrap\">\r\n  <div class=\"card\">\r\n    <h1>Sie werden weitergeleitet\u2026<\/h1>\r\n    <p class=\"muted\">Please wait a moment. If nothing happens, <a id=\"fallbackLink\" href=\"#\">click here<\/a>.<\/p>\r\n    <details>\r\n      <summary class=\"muted\">Technical details<\/summary>\r\n      <pre class=\"mono\" id=\"debug\" aria-live=\"polite\"><\/pre>\r\n    <\/details>\r\n  <\/div>\r\n<\/main>\r\n\r\n<script>\r\n  \/\/ ====== CONFIG ======\r\n  const OUTLOOK_BOOKING_URL = \"https:\/\/outlook.office365.com\/book\/NewBusinessBooking@abacusmedicine.com\/s\/hNC__Bc17EK10Sswmq6YnQ2\";\r\n  const GA4_ID = \"G-5M3928FV8K\";         \/\/ Your GA4 ID\r\n  const WAIT_MS = 2000;                   \/\/ Safety wait; we also use GA's event_callback\r\n  const KEEP_PARAMS_TO_OUTLOOK = true;    \/\/ true = forward UTMs\/click IDs to Outlook\r\n  const DEBUG_MODE = true;                \/\/ true for GA4 DebugView; set false after testing\r\n  \/\/ =====================\r\n\r\n  \/\/ Collect query params (UTMs + click IDs)\r\n  const url = new URL(window.location.href);\r\n  const params = url.searchParams;\r\n\r\n  \/\/ Build destination (optionally keep params)\r\n  const dest = new URL(OUTLOOK_BOOKING_URL);\r\n  if (KEEP_PARAMS_TO_OUTLOOK) {\r\n    for (const [k, v] of params.entries()) dest.searchParams.set(k, v);\r\n  }\r\n  const destination = dest.toString();\r\n  const fallback = document.getElementById(\"fallbackLink\");\r\n  if (fallback) fallback.href = destination;\r\n\r\n  \/\/ Payload for GA4\r\n  const payload = {\r\n    utm_source: params.get(\"utm_source\") || \"(not set)\",\r\n    utm_medium: params.get(\"utm_medium\") || \"(not set)\",\r\n    utm_campaign: params.get(\"utm_campaign\") || \"\",\r\n    utm_content: params.get(\"utm_content\") || \"\",\r\n    utm_term: params.get(\"utm_term\") || \"\",\r\n    gclid: params.get(\"gclid\") || \"\",\r\n    fbclid: params.get(\"fbclid\") || \"\",\r\n    msclkid: params.get(\"msclkid\") || \"\",\r\n    debug_mode: !!DEBUG_MODE\r\n  };\r\n\r\n  \/\/ Debug panel\r\n  const dbg = document.getElementById(\"debug\");\r\n  if (dbg) dbg.textContent = JSON.stringify({ to: destination, payload }, null, 2);\r\n\r\n  \/\/ Ensure GA4 exists; if not, load it on this page only (so no duplicates)\r\n  function ensureGtag(callback){\r\n    if (typeof window.gtag === \"function\") { callback(); return; }\r\n    \/\/ Load GA4 once\r\n    if (!document.getElementById(\"ga4-loader\")) {\r\n      const s = document.createElement(\"script\");\r\n      s.id = \"ga4-loader\";\r\n      s.async = true;\r\n      s.src = \"https:\/\/www.googletagmanager.com\/gtag\/js?id=\" + GA4_ID;\r\n      s.onload = () => {\r\n        window.dataLayer = window.dataLayer || [];\r\n        window.gtag = function(){ dataLayer.push(arguments); };\r\n        gtag(\"js\", new Date());\r\n        gtag(\"config\", GA4_ID);\r\n        callback();\r\n      };\r\n      document.head.appendChild(s);\r\n    } else {\r\n      const t = setInterval(()=>{ if (typeof window.gtag === \"function\"){ clearInterval(t); callback(); } }, 50);\r\n      setTimeout(()=>{ clearInterval(t); callback(); }, 1500);\r\n    }\r\n  }\r\n\r\n  \/\/ Redirect helper (never get stuck)\r\n  let redirected = false;\r\n  function go(){ if(!redirected){ redirected = true; window.location.replace(destination); } }\r\n\r\n  ensureGtag(() => {\r\n    if (typeof window.gtag === \"function\") {\r\n      gtag(\"event\", \"utm_landing\", {\r\n        ...payload,\r\n        event_callback: go,\r\n        event_timeout: 900\r\n      });\r\n      setTimeout(go, WAIT_MS); \/\/ final safety net\r\n    } else {\r\n      go();\r\n    }\r\n  });\r\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Sie werden weitergeleitet\u2026 Please wait a moment. If nothing happens, click here. Technical details<\/p>\n","protected":false},"author":4,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-27119","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.abacusmedicine.com\/de\/wp-json\/wp\/v2\/pages\/27119","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.abacusmedicine.com\/de\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.abacusmedicine.com\/de\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.abacusmedicine.com\/de\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.abacusmedicine.com\/de\/wp-json\/wp\/v2\/comments?post=27119"}],"version-history":[{"count":53,"href":"https:\/\/www.abacusmedicine.com\/de\/wp-json\/wp\/v2\/pages\/27119\/revisions"}],"predecessor-version":[{"id":27473,"href":"https:\/\/www.abacusmedicine.com\/de\/wp-json\/wp\/v2\/pages\/27119\/revisions\/27473"}],"wp:attachment":[{"href":"https:\/\/www.abacusmedicine.com\/de\/wp-json\/wp\/v2\/media?parent=27119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}