Skip to main content

American Flyers

Gracias Bogota 19 De Julio De 2025

Gracias por registrarte para nuestra conferencia informativa PRESENCIAL

Muchas gracias por haber completado el proceso de registro para asistir a la conferencia informativa PRESENCIAL de American Flyers. Tu participación en nuestra conferencia informativa está confirmada. Por favor, permanece atento(a), en breve te haremos llegar información complementaria en relación a este evento.

/* American Flyers ES - contact thank-you Lead (browser + server, shared event_id) */ (function () { var PAGES = ['/gracias', '/gracias-main-contact']; var path = window.location.pathname.replace(/\/+$/, '') || '/'; if (path !== '/' ) { path = path.replace(/\/+$/, '') || '/'; } if (PAGES.indexOf(path) === -1) return; var KEY = 'afes_lead_fired:' + path; var WINDOW_MS = 30 * 60 * 1000; var now = Date.now(); try { var t = parseInt(sessionStorage.getItem(KEY) || '0', 10); if (t && (now - t) < WINDOW_MS) return; sessionStorage.setItem(KEY, String(now)); } catch (e) {} function readCookie(n) { var m = document.cookie.match('(^|;)\\s*' + n + '\\s*=\\s*([^;]+)'); return m ? decodeURIComponent(m[2]) : ''; } var eid = readCookie('afes_meta_eid'); if (!eid) { eid = 'afes_b_' + Math.random().toString(36).slice(2, 10) + now.toString(36); try { document.cookie = 'afes_meta_eid=' + eid + ';path=/;max-age=900;SameSite=Lax'; } catch (e) {} } /* Browser pixel Lead carries the SAME event_id as the server copy, so Meta dedupes. */ var tries = 0; (function fire() { if (typeof window.fbq === 'function') { window.fbq('track', 'Lead', { content_name: 'Contacto ES', thank_you_page: path }, { eventID: eid }); return; } if (tries++ < 40) window.setTimeout(fire, 250); })(); /* Server side: CAPI Lead + nothing else. keepalive survives the page unload. */ try { var body = JSON.stringify({ eid: eid, path: path, url: window.location.href }); if (window.fetch) { window.fetch('/wp-json/afes-meta/v1/lead', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: body, keepalive: true, credentials: 'omit' }); } else { var x = new XMLHttpRequest(); x.open('POST', '/wp-json/afes-meta/v1/lead', true); x.setRequestHeader('Content-Type', 'application/json'); x.send(body); } } catch (e) {} })();