SSDI Webflow To Chatgptbuilder

PHOTO EMBED

Wed Oct 11 2023 16:02:16 GMT+0000 (Coordinated Universal Time)

Saved by @nikanika4425

<!-- Redirection Script -->
<script>
// Function to get URL parameters
function getURLParameter(name) {
    return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\+/g, '%20')) || null;
}

// Get parameters from URL
const first_name = getURLParameter('first_name');
const last_name = getURLParameter('last_name');
const email = getURLParameter('email');
const phone = getURLParameter('phone');

// Construct the refValue for ChatGPTBuilder
const refValue = `WebsiteTraffic--${first_name}--651081--${first_name}--961911--${last_name}--946431--${email}--671618--${phone}`;

// Redirect to ChatGPTBuilder link after a 1-second delay
setTimeout(() => {
    location.href = `https://app.chatgptbuilder.io/webchat/?p=1974933&ref=${refValue}`;
}, 1000);
</script>
content_copyCOPY