Providing your recipients with the opportunity to opt out or choose which types of mail they’d like to receive is something we at Twilio SendGrid are proponents of, and if you’re sending marketing emails, you’re legally required by CAN-SPAM laws to do so. In addition to this, ensuring that you provide an option for your recipients to unsubscribe from your emails can help with deliverability. If your recipients have an easy way to tell you that they’d like to stop receiving your email, instead of using the spam button, it will give you valuable insights without affecting your reputation.
Because we’re all for allowing recipients to choose, there are many different ways to implement an Unsubscribe option in your SendGrid emails, including the native Unsubscribe Modules within New and Legacy Marketing Campaigns, ASM tags, Subscription Tracking, or if you have your own landing page, a custom unsubscribe link.
Marketing Campaigns Unsubscribe Modules
When you are creating a Single Send using the New Marketing Campaigns feature or a Campaign in Legacy Marketing Campaigns, you will be able to specify your Unsubscribe Group, Custom Link, or choose to use a Global Unsubscribe link under Settings > Recipients on the left hand side of the editor. In the Design Editor, you can also click on the Unsubscribe Module within the Single Send to toggle the Address Line with your sender information and the Unsubscribe Preferences option, which allows you to create a landing page with multiple Unsubscribe Groups that allows recipients to choose which Groups from which they'd like to unsubscribe, on or off.
If you are using the Code Editor, you have the ability to make changes to the Unsubscribe Module within the HTML editor to the left.
In order to display multiple unsubscribe groups on your preferences page:
- Navigate to 'Marketing' > 'Unsubscribe Groups'.
- Click the 3 dots in the lower right corner of any group you want to add to the preferences page to select "Edit".
- Then check the box "Display this group on your unsubscribe preferences page." and click the blue "Save Unsubscribe Group" button.
This group will always appear on the preferences page when sending via Marketing as well as the unsubscribe group you associate with the campaign.
ASM Tags
ASM stands for Advanced Subscription Management, and the substitution tags we refer to as ASM Tags can be used within Dynamic Transactional Templates. You can also apply the ASM parameter within your mail send request using the API or an X-SMTPAPI header. It’s important to note that when using our ASM Global or Group Unsubscribe tags, you must pass an unsubscribe group ID in your API or X-SMTPAPI request for the unsubscribe link to populate. You can also include "Groups to display" to tell us which groups should be displayed on the preferences page.
If you add the ASM tags in your API call or X-SMTPAPI Header, we will add default verbiage and links to the bottom left of the email as follows:
Unsubscribe From This List | Manage Email Preferences
If you would like to change the location of your links, you'll need to add the appropriate tags in the content of the email. The tags are:
- Group Unsubscribes: <%asm_group_unsubscribe_url%>
- Global Unsubscribes: <%asm_global_unsubscribe_url%>
- Manage Preferences: <%asm_preferences_url%>
If you would like to use your own verbiage instead of the default shown above for the links, you can add these raw link tags to your <a href> tag:
- Group Unsubscribe, custom verbiage: <%asm_group_unsubscribe_raw_url%>
- Global Unsubscribe, custom verbiage: <%asm_global_unsubscribe_raw_url%>
- Manage Preferences, custom verbiage: <%asm_preferences_raw_url%>
Specifics, and example JSON that you would need to use for ASM tags can be found in this article here.
Subscription Tracking
Subscription Tracking is a setting you can enable within your SendGrid account under Settings > Tracking > Subscription Tracking. When this setting is enabled, a Global Unsubscribe link will automatically be appended to every email sent through the account. They’re natively placed at the bottom of the email, but can be moved around using a replacement tag, which you would set on the same Settings page.
Custom Unsubscribe Link
Custom unsubscribe links are very common, and due to the ability to customize the landing page makes them a popular option. Because our native landing page is only in English, the only way for anyone with non-English speaking recipients to provide an opt-out landing page in a different language would be to use a custom unsubscribe link. This option also provides an opportunity for users to customize the landing page in other ways, such as including a survey regarding why the recipient is unsubscribing or something similar.
In order to use a custom unsubscribe link, you can include it as an <a href> tag in your template or mail send request for API or SMTP sending, or you can select "Custom Unsubscribe Link" from the drop-down in Marketing Campaigns (New or Legacy) and input your custom URL in the space provided. The important thing to note for this option is that you will need to keep track of the recipients who are opting out manually, as we will be processing these as Clicks related to your custom URL rather than Unsubscribe events except when using Marketing Campaigns.
Reference Documentation:
Mail Send API documentation (for passing "group ID and "groups to display"): https://docs.sendgrid.com/api-reference/mail-send/mail-send
Create and Manage Unsubscribe Groups (with video):
https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups
Subscription Tracking (Global Account Setting):
https://docs.sendgrid.com/ui/sending-email/subscription-tracking
Unsubscribe Best Practices:
https://sendgrid.com/blog/managing-your-marketing-email-unsubscribes/