Customising Opt-out Links

The actions that are triggered when an opt-out link is clicked are controlled by the Email Profile related to the email that was sent.

Opt-out actions provide an easy way to model the opt-out process and also control email preferences for individual Users.

Removing Opt-out Links

For scenarios where an opt-out link is not required e.g. receipt emails, service updates etc. the validation can be set to optional with an Email Profile. To make opt-out link validation optional, follow these steps...

  • Expand the "Templates" section in the sidebar
  • Click on Email Profiles
  • Choose the related Email Profile
  • Within the details page, go the to Opt-out section
  • Set the 'Validation' setting to optional
  • Hit the save button

Once this setting has been updated, go to the Template where you want to make the opt-out link optional and save the content to force the validation testing process to run again.

Instant opt-out implements the preference set within the related Email Profile.

To force Global Suppression, use this tag {?$optout_link_global?} instead.

Use this option when you want to opt-out the User as soon as they click a link to unsubscribe.

Instant opt-out can be set visual using the drag & drop email designer feature and it can also be coded manually by set the href of any anchor tag to {?$optout_link?}.

This tag outputs an encoded link that when clicked follows the opt-out actions specified in the Email Profile.

Example Usage

This example shows how the tag can be used on an image but it can be use in exactly the same way on text and other content.

<a href="{?$optout_link?}"><img src="/images/opt-out-image.jpg" alt="Opt-out" /></a>

Example CSS Styling

To override the styling of an opt-out link inline CSS can be used in this way...

<a href="{?$optout_link?}" style="font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size:12px; color:#FFFFFF; text-decoration:underline;">Unsubscribe here</a>  

Email Profile Insert

In scenarios where you want to insert the same block of content that includes an opt-out link into any Email Template there is a further customisation option available.

The content to insert can be set within the Email Profile and then instead of using the {?$optout_link?} on an anchor tag, simply insert the {?$optout_content?} tag.

For example, when using this option the opt-out content would be loading from the related Email Profile and then inserted directly into the content to produce something like...

You received this email because you subscribed to the ABC Company newsletter. 
<a href="[this link is auto-generated]">click here</a> if you never want to hear 
from us again.

Forward to Website Landing Page

The web page that gets displayed to the User after processing an opt-out request can be customised using the options available within Email Profiles.

As an alternative, the default page can be skipped and a website landing page URL can be displayed using this option.

The opt-out request is processed instantly in the same way as above and the website landing page URL gets parameters appended onto the end to allow the receiving web page to process or display information as required.

Appended Parameters

  • contacts_id - internal ID of User
  • email - email address of User
  • reference - reference of User
  • company_id - internal account ID
  • action - either 'unsubscribe' or 'resubscribe'

Campaign Emails

  • email_spooler_id - internal ID relating to the Campaign
  • email_spooler_split_id - internal ID relating to the Campaign

Automation Emails

  • journey_email_id - internal ID relating to the Workflow email

Example Forwarding URL

http://example.com/landing.php?contacts_id=12345&company_id=666&email=jim@somedomain.com&reference=REF-123&email_spooler_id=909911&email_spooler_split_id=123123&action=unsubscribe

Reversing Opt-out

To provide a link that allows the User to change their mind e.g. "Are you sure you wanted to opt-out? Click here to re-subscribe." a coded request can be made to the related tracking domain to undo the initial opt-out action.

Campaign Emails

Emails that originated from Campaigns need the <email_spooler_split_id> and <contacts_id> parameters to be merged from the info initially sent to the landing page URL when the unsubscribe link was clicked e.g.

http://clicks.example.com/pref/S-<email_spooler_split_id>@<contacts_id>@resub

Automation Emails

Emails that originate from Workflows need the <journey_email_id> and <contacts_id> parameters to be merged from the info initially sent to the landing page URL when the unsubscribe link was clicked e.g.

http://clicks.example.com/pref/WF-<journey_email_id>@<contacts_id>@resub

Custom Designed Forms

The web page that gets displayed to the User after processing an opt-out request can be customised using the options available within Email Profiles.

For more info on creating Opt-out Forms, click here.

Process Requests Externally

Every email message sent generates a unique opt-out link and that provides a useful feature if you want to do something like display a page on your website to ask the User if they are sure they want to unsubscribe.

Add the unique link as a parameter like this:

<a href="http://yourdomain.com/?optout={?$optout_link|escape:'url'?}">Click here</a> to unsubscribe.

One the User clicks to confirm opt-out on the displayed web page an asynchronous request (using something like cURL in PHP) can then be made to the URL specified in the optout parameter to complete the process.

Related Pages