Expand my Community achievements bar.

SOLVED

One-click optout

Avatar

Level 2

Hi,

 

We are looking to implement the one-click optout process to replace our current process (click > landing page > confirm Unsubcription). I can't see any option in ACS as in AJO to simply manage/trigger the optout by just clicking in the email. 

 

Any ideas on how to implement it easily? Should we track the clicks on a specific link in the email and run a recurring workflow to handle the optout update?

 

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @TristanBerthon 

 

You can easily do it by writing a javascript on the landing page.

 

On load, the javascript page will check the checkbox and auto-submit the form.

 

Use this code to check the checkbox and submit the form.

 

 

function automatish(){
document.getElementById('your-checkbox-id').checked=true; //this will check the checkbox
document.getElementById("your-form-id").submit(); //this will submit the form
}

//wait for the webpage to load and call the function
window.addEventListener('DOMContentLoaded',function () {
    automatish();
});

 

 


     Manoj
     Find me on LinkedIn

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

Hello @TristanBerthon 

 

You can easily do it by writing a javascript on the landing page.

 

On load, the javascript page will check the checkbox and auto-submit the form.

 

Use this code to check the checkbox and submit the form.

 

 

function automatish(){
document.getElementById('your-checkbox-id').checked=true; //this will check the checkbox
document.getElementById("your-form-id").submit(); //this will submit the form
}

//wait for the webpage to load and call the function
window.addEventListener('DOMContentLoaded',function () {
    automatish();
});

 

 


     Manoj
     Find me on LinkedIn

Avatar

Level 3

Hello Manoj,

 

Can you please let me know where we need to input this Java script code, I am also looking for the same one-click Opt-out better insights would be helpful.

 

Thanks in advance!

Avatar

Community Advisor

Hello @UmaV 

You can add this code anywhere on your landing page.


     Manoj
     Find me on LinkedIn

Avatar

Level 2

Hey, 

 

just to let you know that we didnt manage to make it work with the JS approach as the update didn't work.

 

We had to track the click as opt-out and run a custom workflow that updates the flags accordingly.