The default Mosaico template has unsubscribe option in header. However the token or destination url is for group unsubscribe rather than the more general opt-out token. I cannot see a way to insert/change the token that is used for the default or to change for an individual template.

Default: enter image description here


enter image description here

(1) Is there a way to change an individual mailing to opt-out for unsubscribe (the more common requirement than removing from a Group)

(2) Is there a way to change the default?


2 Answers 2


This is how I do. You have 2 tokens:


to unsubscribe



to opt-out

I placed this code in a block at the end of the e-mail and it does the job.

<p style="text-align: center;">Si vous ne souhaitez plus recevoir de message de notre part, cliquez <a title="d&eacute;sabonnement" href="{action.unsubscribeUrl}" target="_blank">ici pour vous d&eacute;sabonner</a> et <a href="{action.optOutUrl}" target="_blank">ici pour vous d&eacute;sinscrire de toutes les campagnes du DOMAIN</a></p>

and these are the links I get in the e-mail:



To change the default unsubscribe link in Mosaico to an opt-out requires editing the extension code. I did the following tweak and it worked fine. Please note that this is not an ideal solution, and that the change will disappear when you update the Mosaico extension. For a temporary hack it works. This is with Mosaico extension version 2.7.1621893607. Details may vary for other versions. Make sure you backup the original file first and test the change.

Edit file: ~/wordpress/wp-content/uploads/civicrm/extensions/uk.co.vedaconsulting.mosaico/mosaico.php

Change line 339 as follows, from

'[unsubscribe_link]' => '{action.unsubscribeUrl}',


'[unsubscribe_link]' => '{action.optOutUrl}',

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.