Skip to content

FriendlyDotCH/MauticCustomUnsubscribeBundle

Repository files navigation

MauticCustomUnsubscribeBundle

A multi-topic unsubscribe feature with a non human interaction filter

How does it work?

Create a 2 custom fields that cover the topics concerning you want your contacts to receive emails. For example with the alias 'topic_travel' and 'topic_shopping'. Make them both multi-select for more flexibility. 'topic' is just an example, you can use anything you want. Let's assume you send segment emails, and the basis of segment membership is: topic_travel IS NOT 'DNC' AND topic_travel IS NOT EMPTY. Anyone who has a value, and it's other then DNC will get those emails. Unsubscribe happens, if the value is set to DNC.

Token to use

If you want them to unsubscribe from just one topic, you can use the following unsusbcribe URL token:

{customunsubscribe=topic_travel}

Once the contact clicks on the link generated by this token, will be redirected to a landing page matching that alias. You can say 'sorry to see you go from my Travel News email'. Once the person clicks, the value will be overwritten to DNC.

Support for custom text for unsubscribe link

Default text for unsubscribe is: "Abbestellen". Should you want to have a custom text within a tags, you should use a token as shown in the example below:

{customunsubscribe=topic_travel text="My custom unsubscribe text"}

Non Human Interaction

You can also add the {nhi} token to your email. This will generate a link, which is just a honeypot. If it's clicked within 5 seconds to the unsubscribe link, the request will be ignored.

Next steps:

Further improvement is on the way.

  1. We need to modify the Unsubscribe Header behaviour to work similarly.
  2. {nhi} clicks could maybe also ignore all clicks happening 5 seconds within this click
  3. 5 seconds should not be hardcoded
  4. Maybe instead of DNC other vlaues could be added tot he setup. Boolean for example.

First Design and Code by Joey Keller, expert contribution by Matic Zagmajster

About

A multi-topic unsubscribe feature with a non human interaction filter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages