Skip to main content

Install Data opt-out script

Updated over 2 weeks ago

To ensure that any California Consumer Privacy Act (CCPA) and other regulatory opt-out requests submitted through your website are automatically removed from our database, you will need to install our data opt-out script.

geq.optevent()

Add this script to fire on your opt-out page, and update 'email-address' and 'EmailFormID' in the script below to match the variable for email address and the class name for your specific form submission button:

<script type="text/javascript">
        var gesubmitaction = function () {geq.optevent(document.getElementById('email-address').value)};
        var s_classname = document.getElementsByClassName("EmailFormID");
        for (let i = 0; i < s_classname.length; i++) {
            s_classname[i].addEventListener('submit', gesubmitaction);
        }
</script>

You can also add 'geq.optevent()' directly to the submit button.

Have questions? Message us on chat, or email support[at]retention.com!

Did this answer your question?