If you ever need help, please email us at support@mixpanel.com
Back to topics

How do I set a property every time?

Updated Aug. 20, 2015

This article assumes you at least understand properties and only covers event-based tracking. For more on properties, read our tutorial. For the full spectrum of user-specific properties, please read Managing User-Specific Properties.

Super Properties

Super properties allow you to continuously attach a property to every event you track automatically. They make segmenting within Mixpanel more convenient because they act as global properties that get attached to all your events. Super properties are only for events, not profiles within People Analytics.

Some examples of these are:

  • User type (free/paid?)
  • Account age
  • Gender
  • Ad-campaign

By registering these as super properties, you will be able to segment each event by any of them without specifically including them as event properties every time.


Here's a breakdown of the function and its parameters. We'll show an example implementation in a moment.

 *  @required properties (hashmap) - Extra information to store about a user.
 *  @days (int) - Age of cookie in days (default: 365). 
                  The cookie set frequently so this has little effect.
 *  Example:
mixpanel.register({'user type': 'free trial'}, 100);


Now for an example implementation. There are a couple of places it makes sense to register super properties: on page load, if you have the data about your users already, and at the time of an individual event if that event tells you more about them.

If I want to register super properties on page load, it will look something like this:

<script type="text/javascript">
    (function(d,c){var a,b,g,e;a=d.createElement("script");a.type="text/javascript";
    b.parentNode.insertBefore(a,b);c._i=[];c.init=function(a,d,f){var b=c;
    "undefined"!==typeof f?b=c[f]=[]:f="mixpanel";g=['disable','track','track_links',

    // Register a super property
    mixpanel.register({"user type": "paid", "gender": "male"});

If I want to register the super property after an event has occurred, it's just as easy. Let's say that the user just signed up for an account and I want to tag them with their account type.

<script type="text/javascript">
function create_account() {
    mixpanel.register({"account type": "premium"});

Then, when I log an event or funnel these super properties will be automatically included. If I were to call

mixpanel.track('button click');

it would actually be sent to the server as

mixpanel.track('button click', {"user type": "noob", "gender": "male", "account type": "premium"});

This allows you to segment the 'button click' event by user type, gender, and account type with no extra effort. Using super properties drastically simplifies the rest of the integration process.

Using our javascript library, super properties only have to be registered at least once per visitor as we will persist the super properties across page loads later using cookies.

Super properties and funnel analysis

Super properties let you register properties (such as referrer or ad campaign) once at the beginning of your funnel, but see them for every step.

mixpanel.register({"ad campaign": "adwords1"});

Super Properties implementation

As we said before, Super Properties are implemented using cookies. These cookies are set to span all subdomains of your website by default, but you can turn off this feature if you want each subdomain to have a separate set of super properties.

All you have to do is set the cross_subdomain_cookie configuration parameter to false, like so:

<script type="text/javascript">
        mixpanel.set_config({ cross_subdomain_cookie: false });


Unfortunately Super Properties are not available for Facebook due to limitations of the platform. Super properties use cookies and thus cannot be used in FBJS. Iframe apps are affected as well as some browsers reject cookies from iframes.