Managing and Analyzing Unsubscribes

The Messaging and Mobile A/B testing features are not available for purchase and will be deprecated from the product on January 1st, 2022. Read more information on the Mixpanel blog.

When users unsubscribe from Mixpanel emails, it gets tracked as a user profile property ($unsubscribed) with the value set to the timestamp the user unsubscribed. Additionally, an event called Notifications Unsubscribed will be sent to your project. This event will be sent with a Campaign property, set to the Message from which the user clicked to unsubscribe.


While the Campaign property will display the message from which the user unsubscribed, they will still be unsubscribed from all messages going forward.

Since user profile properties show the state of a user in the present point in time and not a historical view of the user over time, it’s not possible to view unsubscribe data for messages over time using the $unsubscribed property using one of Mixpanel’s out-of-the-box reports.

See Unsubscribe Data Over Time

  1. Select "Notification Unsubscribed" from the event dropdown in the Insights report.
  2. Adjust the date range to view unsubscribes for a particular period of time.
  3. To view unsubscribe data segmented by message select Campaign in the property drown. (Note that this is only the campaign from which the user unsubscribed).

Custom Unsubscribe Link

It is possible to look at email message unsubscribe data over time if you set up a custom unsubscribe page (i.e., you create your own unsubscribe link instead checking the default Mixpanel unsubscribe box).


Modify the Unsubscribe Link in an Email

Custom HTML must be added in order to customize the unsubscribe link found in an email. The HTML should follow this format:

<a href="<< unsub >>">My custom unsubscribe link text</a>

Custom Unsubscribe Landing Page

By default, Mixpanel directs users who click on the unsubscribe link from emails to a Mixpanel-hosted unsubscribe page. This page runs a script that sets a user profile property $unsubscribed, with the value set to the timestamp the user unsubscribed - to that user’s profile. This prevents the user from receiving any more messages from that project, but does not globally unsubscribe them from Mixpanel messages.

However, it is possible to redirect users who click on the unsubscribe link from a Mixpanel email message to your own domain. This gives you a chance to re-engage with those customers one last time or style the page to match your site’s design.


  • You must either be setting users’ distinct_ids as an additional property on their profiles; OR

  • You must be setting a different user ID, like email address or username, that is aliased to the Mixpanel distinct_id as a property on their profiles.


Your custom unsubscribe link will then look something like this - in this example, we’re using $email, which is set as a property on a users' profiles and is aliased to the Mixpanel distinct_id:

<a href="{{$email}}">Unsubscribe</a>

Now on the unsubscribe page (, we will use our function to grab the value for “id.” However, instead of setting this value as a super property, we will use it as the distinct_id of a people set. This will allow us to set the “$unsubscribed=True” property to that specific user’s profile:

function getQueryParam(param) {
    param = param.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
    var regexS = "[\\?&]" + param + "=([^&#]*)",
        regex = new RegExp( regexS ),
        results = regex.exec(document.URL);
    if (results === null || (results && typeof(results[1]) !== 'string' && results[1].length)) {
        return '';
    } else {
        return decodeURIComponent(results[1]).replace(/\+/g, ' ');

var distinct_id = getQueryParam("id");
    "Campaign ID": campaign name,

Once your custom unsubscribe page is built, remember to uncheck the default unsubscribe option on your emails, and insert the link to your custom unsubscribe page at the end of your email instead:


View All Unsubscribed Users 

See which users have an $unsubscribed property on their user profile (i.e., they have unsubscribed from receiving Mixpanel email messages) via Explore.

  1. Navigate to Explore
  2. Under Filters, select Unsubscribed is True:


From there, you can look at unsubscribed users by clicking on their names in the list.

Or, get a download of these unsubscribed users.

See how many of your users have unsubscribed over time.

Managing Unsubscribes Across Messaging Platforms

If you use Mixpanel Messages as well as a different product to send other messages (like transactional notifications), you may want to make sure that user unsubscribe preferences are carried over from your other messaging platform to Mixpanel so that you’re not sending unwanted messages.

If you’re using the default unsubscribe link in Mixpanel, that link adds the $unsubscribed property to a users’ profiles. So if you have a large group of users that have unsubscribed from your messages from a different service, you can reflect that in Mixpanel by adding the $unsubscribed property to their profiles in bulk.

Detailed instructions on adding the $unsubscribed property to user profiles in bulk.

What if my other messaging platform allows users to unsubscribe from different types of content separately?

If you have many different kinds of campaigns and content from other platforms (e.g., a newsletter, critical product updates, new feature announcements), you may have users who are unsubscribed from one of those campaigns but is still subscribed to the others.

The way to handle this with Mixpanel would be to create custom unsubscribe properties:

  • On import, instead of importing the default unsubscribed property with a value, import one property for each unsubscribe option. For example: unsubscribed_newsletter, unsubscribed_product, unsubsribed_feature.

  • Then, when creating campaigns in Mixpanel, filter out those custom unsubscribe properties if they match the type of content you’re sending. For example, if you’re setting up a newsletter campaign, it would look like this:2016-05-26_23_42_10.966673-unsubscribed_newsletter.png

Did this answer your question?



Article is closed for comments.