<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Embedded Form with GTM Tracking</title>

<!-- Load Tailwind CSS for modern styling -->

<script src="https://cdn.tailwindcss.com"></script>


<!-- 1. Google Tag Manager SCRIPT (Head Placement) -->

<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':

new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],

j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=

'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);

})(window,document,'script','dataLayer','GTM-K7BN628M');</script>

<!-- End Google Tag Manager -->


<style>

/* Apply smooth scrolling and use Inter font (Tailwind default) */

html { scroll-behavior: smooth; font-family: 'Inter', sans-serif; }

</style>

</head>

<body class="bg-gray-50 min-h-screen p-4 sm:p-8">


<!-- 2. Google Tag Manager NOSCRIPT (Body Placement) -->

<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-K7BN628M"

height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>

<!-- End Google Tag Manager (noscript) -->


<div class="max-w-4xl mx-auto bg-white p-6 sm:p-8 rounded-xl shadow-2xl">

<h1 class="text-3xl font-bold text-gray-800 mb-6 border-b pb-2">

Thank You

</h1>




<!-- 3. Embedded Form Container -->

<div id="ghl-form-container" class="w-full">


<div class="border-4 border-indigo-200 rounded-xl overflow-hidden shadow-lg">

<iframe

src="https://links.jetedco.com/widget/form/XeAtBuEgINQzK2VeHGFR"

style="width:100%;height:1400px;border:none;"

id="inline-XeAtBuEgINQzK2VeHGFR"

data-form-id="XeAtBuEgINQzK2VeHGFR"

title="Welcome Aboard Form"

allow="payment; allow-same-origin; allow-scripts; allow-popups"

sandbox="allow-same-origin allow-scripts allow-popups allow-forms">

</iframe>

</div>

<!-- The form embed script MUST be included for the form to work -->

<script src="https://links.jetedco.com/js/form_embed.js"></script>

</div>


<!-- 4. Cross-Domain Tracking JavaScript -->

<script>

document.addEventListener('DOMContentLoaded', () => {

const formIdToTrack = 'XeAtBuEgINQzK2VeHGFR';


// Listener for messages sent from the iframe

window.addEventListener('message', (event) => {

// Critical Security Check: Only accept messages from the expected domain.

const expectedOrigin = 'https://links.jetedco.com';

if (event.origin !== expectedOrigin) {

return;

}


// Attempt to parse the data (GHL usually sends JSON data)

let data;

try {

data = typeof event.data === 'string' ? JSON.parse(event.data) : event.data;

} catch (e) {

data = event.data; // Use raw data if JSON parsing fails

}


// Logic to detect a successful form submission event from GHL/JetEdCo

// We look for specific event signals or the tracked form ID in the message data

const isFormSubmission = (

(data && (data.event === 'formSubmitted' || data.event === 'paymentSuccess')) ||

(data && data.formId === formIdToTrack)

);


if (isFormSubmission) {

console.log('GTM: SUCCESS! Cross-domain form submission detected for form ID:', formIdToTrack);


// Push the custom event to the GTM dataLayer

window.dataLayer = window.dataLayer || [];

window.dataLayer.push({

'event': 'cross_domain_form_submission',

'form_id': formIdToTrack,

'form_source': 'JetEdCo/GHL'

});


// Optional: show a confirmation box to the user instead of 'alert()'

const trackingMessage = document.createElement('div');

trackingMessage.className = 'fixed top-4 right-4 bg-green-500 text-white p-4 rounded-lg shadow-xl transition-opacity duration-500 z-50';

trackingMessage.textContent = '✅ Form Submission Tracked (Check Console/GTM Debugger)!';

document.body.appendChild(trackingMessage);

setTimeout(() => trackingMessage.remove(), 5000);

}

}, false);

});

</script>


</div>


</body>

</html>

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Embedded Form with GTM Tracking</title>

<!-- Load Tailwind CSS for modern styling -->

<script src="https://cdn.tailwindcss.com"></script>


<!-- 1. Google Tag Manager SCRIPT (Head Placement) -->

<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':

new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],

j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=

'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);

})(window,document,'script','dataLayer','GTM-K7BN628M');</script>

<!-- End Google Tag Manager -->


<style>

/* Apply smooth scrolling and use Inter font (Tailwind default) */

html { scroll-behavior: smooth; font-family: 'Inter', sans-serif; }

</style>

</head>

<body class="bg-gray-50 min-h-screen p-4 sm:p-8">


<!-- 2. Google Tag Manager NOSCRIPT (Body Placement) -->

<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-K7BN628M"

height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>

<!-- End Google Tag Manager (noscript) -->


<div class="max-w-4xl mx-auto bg-white p-6 sm:p-8 rounded-xl shadow-2xl">

<h1 class="text-3xl font-bold text-gray-800 mb-6 border-b pb-2">

Thank You

</h1>




<!-- 3. Embedded Form Container -->

<div id="ghl-form-container" class="w-full">


<div class="border-4 border-indigo-200 rounded-xl overflow-hidden shadow-lg">

<iframe

src="https://links.jetedco.com/widget/form/XeAtBuEgINQzK2VeHGFR"

style="width:100%;height:1400px;border:none;"

id="inline-XeAtBuEgINQzK2VeHGFR"

data-form-id="XeAtBuEgINQzK2VeHGFR"

title="Welcome Aboard Form"

allow="payment; allow-same-origin; allow-scripts; allow-popups"

sandbox="allow-same-origin allow-scripts allow-popups allow-forms">

</iframe>

</div>

<!-- The form embed script MUST be included for the form to work -->

<script src="https://links.jetedco.com/js/form_embed.js"></script>

</div>


<!-- 4. Cross-Domain Tracking JavaScript -->

<script>

document.addEventListener('DOMContentLoaded', () => {

const formIdToTrack = 'XeAtBuEgINQzK2VeHGFR';


// Listener for messages sent from the iframe

window.addEventListener('message', (event) => {

// Critical Security Check: Only accept messages from the expected domain.

const expectedOrigin = 'https://links.jetedco.com';

if (event.origin !== expectedOrigin) {

return;

}


// Attempt to parse the data (GHL usually sends JSON data)

let data;

try {

data = typeof event.data === 'string' ? JSON.parse(event.data) : event.data;

} catch (e) {

data = event.data; // Use raw data if JSON parsing fails

}


// Logic to detect a successful form submission event from GHL/JetEdCo

// We look for specific event signals or the tracked form ID in the message data

const isFormSubmission = (

(data && (data.event === 'formSubmitted' || data.event === 'paymentSuccess')) ||

(data && data.formId === formIdToTrack)

);


if (isFormSubmission) {

console.log('GTM: SUCCESS! Cross-domain form submission detected for form ID:', formIdToTrack);


// Push the custom event to the GTM dataLayer

window.dataLayer = window.dataLayer || [];

window.dataLayer.push({

'event': 'cross_domain_form_submission',

'form_id': formIdToTrack,

'form_source': 'JetEdCo/GHL'

});


// Optional: show a confirmation box to the user instead of 'alert()'

const trackingMessage = document.createElement('div');

trackingMessage.className = 'fixed top-4 right-4 bg-green-500 text-white p-4 rounded-lg shadow-xl transition-opacity duration-500 z-50';

trackingMessage.textContent = '✅ Form Submission Tracked (Check Console/GTM Debugger)!';

document.body.appendChild(trackingMessage);

setTimeout(() => trackingMessage.remove(), 5000);

}

}, false);

});

</script>


</div>


</body>

</html>

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Embedded Form with GTM Tracking</title>

<!-- Load Tailwind CSS for modern styling -->

<script src="https://cdn.tailwindcss.com"></script>


<!-- 1. Google Tag Manager SCRIPT (Head Placement) -->

<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':

new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],

j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=

'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);

})(window,document,'script','dataLayer','GTM-K7BN628M');</script>

<!-- End Google Tag Manager -->


<style>

/* Apply smooth scrolling and use Inter font (Tailwind default) */

html { scroll-behavior: smooth; font-family: 'Inter', sans-serif; }

</style>

</head>

<body class="bg-gray-50 min-h-screen p-4 sm:p-8">


<!-- 2. Google Tag Manager NOSCRIPT (Body Placement) -->

<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-K7BN628M"

height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>

<!-- End Google Tag Manager (noscript) -->


<div class="max-w-4xl mx-auto bg-white p-6 sm:p-8 rounded-xl shadow-2xl">

<h1 class="text-3xl font-bold text-gray-800 mb-6 border-b pb-2">

Thank You

</h1>




<!-- 3. Embedded Form Container -->

<div id="ghl-form-container" class="w-full">


<div class="border-4 border-indigo-200 rounded-xl overflow-hidden shadow-lg">

<iframe

src="https://links.jetedco.com/widget/form/XeAtBuEgINQzK2VeHGFR"

style="width:100%;height:1400px;border:none;"

id="inline-XeAtBuEgINQzK2VeHGFR"

data-form-id="XeAtBuEgINQzK2VeHGFR"

title="Welcome Aboard Form"

allow="payment; allow-same-origin; allow-scripts; allow-popups"

sandbox="allow-same-origin allow-scripts allow-popups allow-forms">

</iframe>

</div>

<!-- The form embed script MUST be included for the form to work -->

<script src="https://links.jetedco.com/js/form_embed.js"></script>

</div>


<!-- 4. Cross-Domain Tracking JavaScript -->

<script>

document.addEventListener('DOMContentLoaded', () => {

const formIdToTrack = 'XeAtBuEgINQzK2VeHGFR';


// Listener for messages sent from the iframe

window.addEventListener('message', (event) => {

// Critical Security Check: Only accept messages from the expected domain.

const expectedOrigin = 'https://links.jetedco.com';

if (event.origin !== expectedOrigin) {

return;

}


// Attempt to parse the data (GHL usually sends JSON data)

let data;

try {

data = typeof event.data === 'string' ? JSON.parse(event.data) : event.data;

} catch (e) {

data = event.data; // Use raw data if JSON parsing fails

}


// Logic to detect a successful form submission event from GHL/JetEdCo

// We look for specific event signals or the tracked form ID in the message data

const isFormSubmission = (

(data && (data.event === 'formSubmitted' || data.event === 'paymentSuccess')) ||

(data && data.formId === formIdToTrack)

);


if (isFormSubmission) {

console.log('GTM: SUCCESS! Cross-domain form submission detected for form ID:', formIdToTrack);


// Push the custom event to the GTM dataLayer

window.dataLayer = window.dataLayer || [];

window.dataLayer.push({

'event': 'cross_domain_form_submission',

'form_id': formIdToTrack,

'form_source': 'JetEdCo/GHL'

});


// Optional: show a confirmation box to the user instead of 'alert()'

const trackingMessage = document.createElement('div');

trackingMessage.className = 'fixed top-4 right-4 bg-green-500 text-white p-4 rounded-lg shadow-xl transition-opacity duration-500 z-50';

trackingMessage.textContent = '✅ Form Submission Tracked (Check Console/GTM Debugger)!';

document.body.appendChild(trackingMessage);

setTimeout(() => trackingMessage.remove(), 5000);

}

}, false);

});

</script>


</div>


</body>

</html>

https://links.jetedco.com/widget/form/XeAtBuEgINQzK2VeHGFR