301 status code means that the requested resource has been permanently moved to a new URL. All future requests should use the new address.
The browser will automatically redirect the user to the new address, and search engines will update their indexes.
302 status code indicates that the requested resource is temporarily available at a different URL.
The user is automatically redirected to the new URL, but search engines continue to index the old address.
200 status code is a standard successful HTTP server response. It means that the client’s request (e.g., from a browser) was successfully processed, and the server is delivering the requested data.
The user receives content without errors, and the page or application functions properly. If Code 200 is accompanied by data, the browser or program processes and displays it to the user.
GET / HTTP/1.1 Host: m0a.com Accept: */* User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>MzeroA.com</title> <base href=""> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Expires" content="0"> <meta name="description" content="MzeroA.com"> <meta name="keywords" content="MzeroA.com"> <meta name="author" content="MzeroA.com"> <link rel="icon" type="image/png" sizes="16x16" href="assets/images/loader.png"> <link href="https://fonts.googleapis.com/css?family=Ubuntu:300,400,400i,700,700i&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,500,500i,600,700,700i&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link rel="stylesheet" href="styles.03d94129b0512668b7f2.css"></head> <body> <app-root></app-root> <!-- Google Tag Manager (noscript) --> <noscript> <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-K6ZNN8T" height="0" width="0" style="display:none;visibility:hidden"></iframe> </noscript> <!-- End Google Tag Manager (noscript) --> <!-- iTracker360 JS Snippet --> <script type="text/javascript" src="https://d2ieqaiwehnqqp.cloudfront.net/t3bdc1221e2e0899cfaad945a7cbe44b9.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.js"></script> <script> new WOW().init(); window.onload = function () { (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-K6ZNN8T'); }; document.body.addEventListener("click", function (event) { const link = event.target.closest('a[href*="infusionsoft.app/app/orderForms"]'); if (!link) return; // Exit if not a checkout link let itemName = link.getAttribute("data-gtm-name") || "Unknown Item"; let itemID = link.getAttribute("data-gtm-id") || "Unknown ID"; let rawPrice = link.getAttribute("data-gtm-price") || "0.00"; let itemCategory = link.getAttribute("data-gtm-category") || "Uncategorized"; let priceValues = rawPrice.split("-").map(p => parseFloat(p.trim())).filter(p => !isNaN(p)); let itemPrice = priceValues.length ? Math.min(...priceValues) : 0; window.latestClickData = { item_name: itemName, item_id: itemID, price: itemPrice, category: itemCategory, full_price_range: rawPrice, last_page_visited: document.referrer || window.location.href, }; if (!window.addToCartDebounce) { window.addToCartDebounce = setTimeout(() => { if (window.dataLayer && Array.isArray(window.dataLayer)) { window.dataLayer.push({ event: "add_to_cart", ecommerce: { currency: "USD", items: [window.latestClickData] } }); } else { console.error("dataLayer is NOT available! Event NOT pushed."); } window.addToCartDebounce = null; window.latestClickData = null; }, 250); } }, true); // Capture phase event delegation </script> <script> (function () { // Define product details based on URL key (include both production and sandbox values) const productLookup = { "OGS-Gold": { item_name: "Gold", item_id: "GSA-Gold", price: 159, category: "Membership", full_price_range: "159.00" }, "OGS-Silver": { item_name: "Silver", item_id: "GSA-Silver", price: 139, category: "Membership", full_price_range: "139.00" }, "OGS-Bronze": { item_name: "Bronze", item_id: "GSA-Bronze", price: 109, category: "Membership", full_price_range: "109.00" }, "FAA-Written-Boot-Camp": { item_name: "FAA Written Boot Camp", item_id: "FAA-Written-Boot-Camp", price: 70, category: "Course", full_price_range: "70.00-100.00" }, "Remote Pilot 101-UAS Course": { item_name: "Remote Pilot Full Course", item_id: "Remote-Pilot-101-UAS-Course", price: 179, category: "Course", full_price_range: "179.00" }, }; // Extract the orderId from URL query string or hash function getOrderIdFromURL() { const searchParams = new URLSearchParams(window.location.search); const hashParams = new URLSearchParams(window.location.hash.replace(/^#\/[^?]*\?/, '')); const orderId = searchParams.get("orderId") || hashParams.get("orderId"); if (orderId) { return orderId; } else { console.warn("No orderId found in URL."); return null; } } // Fetch order details from the API endpoint using the orderId async function fetchOrderDetails(orderId) { const apiUrl = `https://mzeroa.com/api/endpoint/order/${orderId}`; try { const response = await fetch(apiUrl); if (!response.ok) throw new Error(`API Request Failed: ${response.status}`); const orderData = await response.json(); return orderData; } catch (error) { console.error("Error fetching order data:", error); return null; } } // Slugify helper — collapse any non‐alphanumeric run into “-” function slugify(str) { return str .trim() .toLowerCase() .replace(/[^a-z0-9]+/g, "-") // spaces, punctuation → hyphens .replace(/^-+|-+$/g, ""); // trim leading/trailing hyphens } // Build normalized lookup once const normalizedLookup = Object.entries(productLookup).reduce((map, [key, val]) => { map[slugify(key)] = val; return map; }, {}); // Given the identifier from orderData, normalize it and match to our productLookup function getProductFromIdentifier(identifier) { if (!identifier) { console.warn("No identifier in order data."); return null; } // Normalize const slug = slugify(identifier); const product = normalizedLookup[slug]; if (!product) { console.warn(`No product found for slug: ${slug}`); return null; } else { return product; } } // Push the purchase event to the GTM dataLayer using data from the API response async function firePurchaseEvent() { const orderId = getOrderIdFromURL(); if (!orderId) { console.warn("No orderId found. Purchase event not fired."); return; } // Prevent duplicate firing via sessionStorage const purchaseKey = `purchase_${orderId}`; if (sessionStorage.getItem(purchaseKey)) { console.warn("Purchase event already fired for this session, ignoring duplicate."); return; } const orderData = await fetchOrderDetails(orderId); if (!orderData) { console.warn("No valid order data returned. Purchase event not fired."); return; } // Terminate if the payload does not contain an identifier if (!orderData.identifier) { console.warn("Order data missing identifier. Purchase event not fired."); return; } // Use the identifier to get product data from our lookup. const product = getProductFromIdentifier(orderData.identifier); if (!product) { console.warn("Could not match product data from identifier. Purchase event not fired."); return; } // Build the user data from the API response const userData = { user_name: `${orderData.firstName} ${orderData.lastName}`.trim(), user_email: orderData.emailAddress, company_name: orderData.company, address: { street: orderData.addressLine1, street2: orderData.addressLine2, city: orderData.city, state: orderData.state, zip: orderData.zipCode, country: orderData.country }, phone_number: orderData.phoneNumber }; // Use the value from our productLookup for the conversion value. // For variable price products, we assume the lookup value is used. const conversionValue = product.price; // Push the purchase event to the GTM dataLayer window.dataLayer = window.dataLayer || []; window.dataLayer.push({ event: "purchase", ecommerce: { transaction_id: orderId, currency: "USD", value: conversionValue, // using product lookup price tax: orderData.tax || 0, shipping: orderData.shipping || 0, total_paid: conversionValue || 0, total_due: orderData.total_due || 0, items: [product] }, user_data: userData }); sessionStorage.setItem(purchaseKey, "true"); } // If the current URL contains "thankyou", fire the purchase event if (window.location.href.includes("thankyou")) { firePurchaseEvent(); } })(); </script> <script src="runtime.ea8cd2b9e48164ca8d70.js" defer></script><script src="polyfills-es5.fa71e620b34ac5794877.js" nomodule defer></script><script src="polyfills.e77036a5ce4b450cf02a.js" defer></script><script src="scripts.e39b458c4e8df6460f34.js" defer></script><script src="main.758491dc164620bbe326.js" defer></script></body> </html>