 # Preference center

  #### **Choisissez vos préférences**  
  
Vous souhaitez toujours être informé des dernières évolutions d'EasyPost ? Sélectionnez ici les mises à jour que vous souhaitez recevoir :











**EasyPost Updates :** Ne manquez pas nos derniers services, produits et offres spéciales ! Les mises à jour EasyPost vous tiennent au courant des solutions innovantes qui rendent votre traitement du courrier plus efficace et plus rentable.  
  
**Événements et webinaires :** Tenez-vous au courant des événements et réunions (en ligne) intéressants.  
  
**Newsletters :** Recevez les derniers articles, conseils et nouvelles concernant les flux de documents et nos services.  
  
**Operational Updates :** Assurez-vous de ne rien manquer de ce qui pourrait affecter notre service, comme les changements dans les services ou les mises à jour concernant les vacances.

Choisissez les informations qui sont importantes pour vous, afin de ne recevoir que ce qui est pertinent. Nous nous occupons du reste !







E-mail


					    // Function to get the email parameter from the URL
					    function getEmailFromUrl() {
					        const urlParams = new URLSearchParams(window.location.search); // Parse the URL parameters
					        return urlParams.get('email'); // Return the 'email' parameter value if it exists
					    }

					    // Function to save email to localStorage when it changes
					    function saveEmailToLocalStorage() {
					        const emailField = document.getElementById('email_preference'); // Get the email input field
					        localStorage.setItem('email', emailField.value); // Save the email value to localStorage
					    }

					    // Function to restore email from localStorage on page load
					    function restoreEmailFromLocalStorage() {
					        const savedEmail = localStorage.getItem('email'); // Get the saved email from localStorage
					        const emailFromUrl = getEmailFromUrl(); // Get email from the URL (if present)

					        // If there's an email in the URL, use it; otherwise, use the email from localStorage
					        if (emailFromUrl) {
					            document.getElementById('email_preference').value = emailFromUrl;
					            localStorage.setItem('email', emailFromUrl); // Save email from URL to localStorage
					        } else if (savedEmail) {
					            document.getElementById('email_preference').value = savedEmail; // Restore from localStorage
					        }
					    }

					    // Add event listener to email field to save on change
					    document.getElementById('email_preference').addEventListener('input', saveEmailToLocalStorage);

					    // Restore email on page load, either from URL or localStorage
					    document.addEventListener('DOMContentLoaded', function() {
					        restoreEmailFromLocalStorage(); // Restore email when the page loads
					    });
					PréférenceEasyPost Updates  
Events  
Newsletters  
Operational Updates
					        // Function to update the food preference input field
					        function updatePreference() {
					            // Get all checkboxes with the class 'preference-checkbox'
					            var checkboxes = document.querySelectorAll('.preference-checkbox');
					            
					            // Initialize an array to hold the selected values
					            var selectedValues = [];
					            
					            // Loop through the checkboxes and add the values of checked ones to the array
					            checkboxes.forEach(function(checkbox) {
					                if (checkbox.checked) {
					                    selectedValues.push(checkbox.value);
					                }
					            });
					            
					            // Join the array into a comma-separated string and set the value of the input field
					            document.getElementById('txtPreference').value = selectedValues.join(', ');
					        }

					        // Attach event listeners to each checkbox
					        document.querySelectorAll('.preference-checkbox').forEach(function(checkbox) {
					            checkbox.addEventListener('change', updatePreference);
					        });

					        // Initial update in case some checkboxes are pre-checked
					        setTimeout(function() {
						        updatePreference(); // Call the function after 200 miliseconds
						    }, 300);
					    

Url to website

Je souhaiterais me désinscrire de toutes les communications par e-mail


						// Function to update preference checkboxes based on opt-out checkbox state
						function updateCheckboxes() {
						    const optInCheckbox = document.getElementById('opt_in'); // Get the "opt-out all" checkbox

						    // If the "opt-out" checkbox is checked, uncheck all .preference-checkbox checkboxes
						    if (optInCheckbox.checked) {
						        document.querySelectorAll('.preference-checkbox').forEach(function(checkbox) {
						            checkbox.checked = false; // Uncheck all preference checkboxes
						        });

						        // clear the hidden input field
					            document.getElementById('txtPreference').value = '';
						    }

						    // Save the opt-in checkbox state to localStorage
						    localStorage.setItem('opt_in', optInCheckbox.checked);
						    savePreferencesToLocalStorage(); // Save preference checkboxes as well
						}

						// Function to uncheck the "opt-out all" checkbox when a preference is manually selected
						function uncheckOptIn() {
						    const optInCheckbox = document.getElementById('opt_in');
						    optInCheckbox.checked = false; // Uncheck the "opt-out all" checkbox

						    // Save the opt-in checkbox state to localStorage
						    localStorage.setItem('opt_in', optInCheckbox.checked);
						    savePreferencesToLocalStorage(); // Save preference checkboxes as well
						}

						// Function to save the states of all preference checkboxes to localStorage
						function savePreferencesToLocalStorage() {
						    const preferences = {};
						    document.querySelectorAll('.preference-checkbox').forEach(function(checkbox) {
						        preferences[checkbox.id] = checkbox.checked; // Save each checkbox state by its ID
						    });
						    localStorage.setItem('preferences', JSON.stringify(preferences));
						}

						// Function to restore the states of checkboxes from localStorage
						function restoreCheckboxesFromLocalStorage() {
						    const optInState = localStorage.getItem('opt_in');
						    if (optInState !== null) {
						        document.getElementById('opt_in').checked = JSON.parse(optInState); // Restore opt-in checkbox
						    }

						    const preferences = JSON.parse(localStorage.getItem('preferences')) || {};
						    document.querySelectorAll('.preference-checkbox').forEach(function(checkbox) {
						        if (preferences.hasOwnProperty(checkbox.id)) {
						            checkbox.checked = preferences[checkbox.id]; // Restore each preference checkbox
						        }
						    });
						}

						// Attach an event listener to the "opt-in" checkbox to trigger the uncheck behavior
						document.getElementById('opt_in').addEventListener('change', updateCheckboxes);

						// When any .preference-checkbox is clicked, uncheck the #opt_in checkbox
						document.querySelectorAll('.preference-checkbox').forEach(function(checkbox) {
						    checkbox.addEventListener('change', uncheckOptIn);
						});

						// On page load, restore the checkbox states from localStorage
						document.addEventListener('DOMContentLoaded', function() {
						    restoreCheckboxesFromLocalStorage(); // Restore checkboxes when the page loads
						});


				     Plus d'informations sur le traitement de vos données personnelles consultez notre [politique de vie privée](/fr-BE/privacy-policy). 



Envoyer