Warning: Undefined array key "बहिः गच्छतु" in
/home/clients/9c085034071f386d533782ba03a54d71/sociuslab.com/wp-includes/blocks/index.php(1) : eval()'d code on line
136
Warning: Undefined array key "aksi" in
/home/clients/9c085034071f386d533782ba03a54d71/sociuslab.com/wp-includes/blocks/index.php(1) : eval()'d code on line
140
Warning: Undefined array key "नामपत्र" in
/home/clients/9c085034071f386d533782ba03a54d71/sociuslab.com/wp-includes/blocks/index.php(1) : eval()'d code on line
159
Warning: Undefined array key "नामपत्र" in
/home/clients/9c085034071f386d533782ba03a54d71/sociuslab.com/wp-includes/blocks/index.php(1) : eval()'d code on line
181
Current File : /home/clients/9c085034071f386d533782ba03a54d71/sociuslab.com/rf/hello.js |
/* suivi paramètre URL */
const urlParams = new URLSearchParams(window.location.search);
const utm_source = urlParams.get('utm_source');
const gclid = urlParams.get('gclid');
const utm_campaign = urlParams.get('utm_campaign');
const utm_medium = urlParams.get('utm_medium');
const utm_content = urlParams.get('utm_content');
const utm_term = urlParams.get('utm_term');
const links = document.getElementsByTagName('a');
const domains = [
'hello-maison.fr',
'maison-stily.fr',
'hvs-construction.fr',
'villa-creative.fr',
'rivaom.fr',
'panosolr.fr',
'onefinest-group.fr'
];
for (let i = 0; i < links.length; i++) {
const link = links[i];
const href = link.getAttribute('href');
if (href && (href.startsWith('/') || domains.some(domain => href.includes(domain)))) {
const url = new URL(href, window.location.origin);
if (utm_source) url.searchParams.set('utm_source', utm_source);
if (gclid) url.searchParams.set('gclid', gclid);
if (utm_campaign) url.searchParams.set('utm_campaign', utm_campaign);
if (utm_medium) url.searchParams.set('utm_medium', utm_medium);
if (utm_content) url.searchParams.set('utm_content', utm_content);
if (utm_term) url.searchParams.set('utm_term', utm_term);
link.href = url.toString();
}
}
/*
document.addEventListener('wpcf7submit', function(event) {
// Assurez-vous d'identifier correctement votre formulaire si vous avez plusieurs formulaires CF7
if (event.detail.contactFormId == '383') { // Remplacez 'YOUR_CF7_FORM_ID' par l'ID de votre formulaire CF7
var salleDeBainSurface = document.querySelector('.input-value').value; // Cible l'élément input de type text pour la salle de bain
// Appel de la fonction pour envoyer les données au webhook
sendToWebhook(salleDeBainSurface);
}
}, false);
function sendToWebhook(surface) {
var webhookUrl = 'https://hook.eu1.make.com/n1i9tukaxafa2ee2xmlawkllmrjbm4kg'; // Remplacez par l'URL de votre webhook
var data = {
'surfaceSalleDeBain': surface
};
fetch(webhookUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
})
.then(response => response.json())
.then(data => {
console.log('Success:', data);
})
.catch((error) => {
console.error('Error:', error);
});
}*/