Force Mixpanel Cookie Over HTTPS

By default, Mixpanel cookies can be transmitted over standard http. However, Mixpanel’s JavaScript library provides a configuration to transmit your cookies over https. To do so, use the set_config() method and change the secure_cookie flag from false to true. This means Mixpanel cookies can only be transmitted over https.

Using the set_config() method will look like this:

mixpanel.set_config({"secure_cookie":true});

You can also slightly modify your init function in the JavaScript library to the following:

mixpanel.init("yourTokenHere",{"secure_cookie":true});

Is this article helpful?
1 out of 1 found this helpful

Comments

0 comments

Article is closed for comments.