Skip to main content
Install CCPA opt-out script
Updated over 10 months ago

To automatically remove California Consumer Privacy Act (CCPA) opt-outs that were completed on your website from our database, you will need to install the CCPA opt-out script:

geq.optevent()

Add this script to fire on your CCPA 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?