Leanplum has a built-in unsubscribe management system out of the box. However, you might want to also mirror those unsubscribes by sending them to your backend too. The ideal method to achieve this is a triggered Webhook campaign.
Steps:
- Create a single message campaign or multi-message campaign containing 1 Webhook action.
- Set the campaign trigger to the event Unsubscribe. Leanplum tracks that event automatically when a user unsubscribes from a single email category or from the email channel as a whole.
- Pass any of the desired parameters via our JINJA templates.
- Example setup in the dashboard:
- And here is the entire API call in text:
https://endpoint.com?unsubscribeTriggerTime={{triggerTime}}&messageId={{messageId}}&userId={{userId}}&unsubscribeChannel={{parameter.['Channel'] | default('null')}}&unsubscribeCategory={{parameter.['Email Category'] | default('null')}}
- Example setup in the dashboard: