Help us out with your details and we'll set up a product presentation at a mutually convenient time
bottom of page
document.addEventListener("DOMContentLoaded", function() {
// Current page ka URL path detect karein
const urlPath = window.location.pathname;
let contentTypeValue;
// Har page ke liye Content_Type dynamically set karein
if (urlPath.includes("reinventing-the-customer-experience-in-freight-forwarding")) {
contentTypeValue = "eBook"; // eBook page slug
} else if (urlPath.includes("empowering-freight-forwarders-with-the-perfect-erp-solution")) {
contentTypeValue = "Whitepaper"; // Whitepaper page slug
}
// Hidden field ki value set karein
const hiddenField = document.querySelector("input[name='Content_Type']");
if (hiddenField && contentTypeValue) {
hiddenField.value = contentTypeValue; // Dynamic value set karenge
}
// Form submit hone ke baad redirect karein
const form = document.querySelector("form"); // Form ko select karein
if (form) {
form.addEventListener("submit", function(e) {
e.preventDefault(); // Default form submission ko stop karein
// Redirect URL set karein based on Content_Type
let redirectURL;
if (contentTypeValue === "eBook") {
redirectURL = "https://349678f7-f8cc-4090-ae29-a6803c3b4640.usrfiles.com/ugd/349678_177561bfd02f4b7f86b7a2f31e929512.pdf";
} else if (contentTypeValue === "Whitepaper") {
redirectURL = "https://349678f7-f8cc-4090-ae29-a6803c3b4640.usrfiles.com/ugd/349678_403f0a51a54747f2a78f3a6b04bd19f8.pdf";
}
// Form submit hone ke baad redirect karein
if (redirectURL) {
window.location.href = redirectURL;
}
});
}
});