Add a SendGrid Unsubscribe Link To Emails

Updated Sept 6, 2025

Quick Summary
  • SG Widget supports adding unsubscribe links to Sendgrid Emails
  • There are two types of unsubscribe - Global and Group

If you want SendGrid Unsubscribe Links in your emails just like the screenshot below, then read on:

email.png

Contents

Global vs Group Unsubscribes

Firstly, an email sent via Sendgrid can contain more than one type of unsubscribe link so it’s important to understand differences or you could inadvertently allow users to exclude themselves from emails that they really need to see.

Global

A global unsubscribe link is one that allows users to remove themselves from every email you send from your Sendgrid account - no exceptions. If an email address exists in any of your Sendgrid lists and a user clicks a global unsubscribe link, they will be excluded from receiving any future emails from you regardless of the list it targets. This is an extremely powerful option but one that should be used with care.

Consider the following scenario of a Shopify store that uses Sendgrid to send their transactional emails and most likely uses Sendgrid for their marketing emails as well. If a user clicks a global unsubscribe in a promotional email there is a good chance they may not receive transactional emails they really need in the future such as a purchase confirmation or delivery notification.

As you can see, global unsubscribes are powerful but should be used with care. Now let’s compare with Group unsubscribe links.

Group

A group unsubscribe link is one that allows users to remove themselves from specific email lists and remain subscribed to others. This gives Sendgrid users and their recipient's much more granularity and control over how marketing preferences are handled. Let consider how global unsubscribes would impact our previous example:

If a user clicks a group unsubscribe link in a promotional email from an online store they would be unsubscribed from that list only and would still receive important transactional emails. The store owner would be happy because they can still inform their users about purchases and the customers would be happy because they will receive an email letting them know when their item will be delivered so they can be in the house.

Adding Sendgrid Unsubscribe Links to emails

There are two types of emails that can be sent from Sendgrid - Transactional or Marketing, and each of these has different methods for inserting unsubscribe links.

Transactional Templates

Global Unsubscribe

As previously discussed, there are no genuine reasons to have global unsubscribe links in transactional emails. After all, they are only triggered by user actions like purchasing a product or requesting a password reset so you can be certain that these are emails users want to receive. None the less, if you have a use case that requires global unsubscribe in a transactional email you can do that by using the Sendgrid Subscription tracking feature. In your Sendgrid Account:

  • Go to Settings > Subscription tracking
  • Activate

Final warning
This will give users the ability to opt out of every email you send, whether it is marketing or transactional. Use with extreme caution.

Group Unsubscribe

Group unsubscribe links are the best method for inserting unsubscribe functionality in your emails. Before you do that, you need to have groups created in your Sendgrid account so if you haven’t got some already, go to:

Groups > Unsubscribe Groups > Create a group

Next, you need to insert specific tags in your email that are populated when you make an API request to send the email. This request will contain the group that users will be removed from and also the groups that will be displayed if they click the unsubscribe preferences link.

In your Sendgrid Account:

  • Go to your template
  • Insert an unsubscribe module in an HTML block
  • Save

unsubscribe-module.png

This will insert the required tags that are turned into links when the email is sent.

With SG Widget, specifying the groups is easy and requires no coding. In your SG Widget Account:

  • Go to the Edit page of a Widget
  • Scroll to the Double Opt-In or Welcome Email sections
  • Choose an unsubscribe group
  • Choose unsubscribe groups to display
  • Click Update
Remember
SG Widget's Custom Email templates are a powerful integration with Sendgrid and allow you to customise your Welcome and Double Opt In emails.

Marketing Templates

Global Unsubscribe

As Sendgrid have an intuitive email builder, adding global unsubscribe links to Sendgrid marketing templates is rather straightforward. In your Sendgrid account:

  • Go to Templates > Marketing
  • Open a template
  • Click Tags
  • Drag the <%asm_global_unsubscribe_raw_url%> tag into your email
  • Save

Group Unsubscribe

Adding a Group Unsubscribe link to a Marketing Template is an identical process, except this time you want to select the <%asm_group_unsubscribe_raw_url%> tag. It couldn’t be easier!

Removing Sendgrid Unsubscribe Links from emails

Removing Sendgrid Unsubscribe Links from emails is easy by simply undoing the steps you carried out previous to add them. Just go into the template and remove the section.

Fixing Sendgrid unsubscribe link not working

There are lots of threads on reddit about Sendgrid unsubscribe links not working. We regularly review this and reply with solutions. The most common error we see is syntax mistakes in the placeholders that are inserted into email templates. If you are having problems that is the first thing to check.

This isn't an issue with SG Widget of course because we allow the unsubscribe group to be specified in our UI.

Sendgrid Unsubscribe Preferences

As mentioned, you can give users the ability to alter their subscription preferences from the email by including a preferences tag, which opens a page containing a list of options for users to set on a more granular level.

If you added an unsubscribe module to a template, SG Widget makes it easy to control what is displayed on the preferences page. In the Unsubscribe Settings section of your widget, just check the groups you want to be displayed. These will be passed to Sendgrid in an API call when someone subscribes to your list.

unsubscribe-groups.png

When a user clicks the Preferences link in an email they will see a Sendgrid hosted page like this:

preferences-pg.png

How to reduce unsubscribes

While it is important to have a clean unsubscribe process, it would be great if it wasn’t used all that much by your users as nobody wants to see a subscriber leaving their list after you've successfully collected the email. Here are a few proven methods to reduce your unsubscribe rate: .

Conclusion

Unsubscribe links need to be in every email you send. This guide shows you exactly how to insert unsubscribe links with Sendgrid and the options you have when doing so.

Unless you have a valid reason to use global unsubscribes, we strongly recommend that you insert Group unsubscribe links your emails. Both of these options are possible with SG Widget and they can be configured easily so you can meet the GDPR requirements and ensure that every email you send is a compliant one.

Do you have an opinion on global vs group unsubscribes or are you struggling to implement Sendgrid Unsubscribe Links in your emails? We would love to hear from you so post your thoughts in the comment section below.

You Might Also Like

Comments


Kleaver 08.20.2024

When someone does a global unsubscribe, can that be reverted?

SG Widget Support 08.20.2024

Yes. That is possible in your Sendgrid account. There is a list of global unsubscribes and if you remove an address from this, that email will be able to receive communications again. However, be careful as it should only be done with the users consent.

Leave a Comment: