From 3d9a0ffb0f60dc600d38c967ead3220e9c423a28 Mon Sep 17 00:00:00 2001 From: vc7 Date: Wed, 21 Oct 2015 12:41:50 +0800 Subject: [PATCH 1/2] Add cookie clear bridge. --- dist/angular-mixpanel.min.js | 2 +- src/angular-mixpanel.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dist/angular-mixpanel.min.js b/dist/angular-mixpanel.min.js index 72f246d..8ec241e 100644 --- a/dist/angular-mixpanel.min.js +++ b/dist/angular-mixpanel.min.js @@ -1 +1 @@ -"use strict";angular.module("analytics.mixpanel",[]).provider("$mixpanel",function(){function a(){if(!Object.prototype.hasOwnProperty.call(window,"mixpanel"))throw"Global `mixpanel` not available. Did you forget to include the library on the page?";mixpanel.init(d),b(function(){e&&mixpanel.register(e)})}function b(a){Object.prototype.hasOwnProperty.call(window,"mixpanel")&&void 0!==window.mixpanel.__loaded||setTimeout(function(){b(a)},500),a()}function c(a){return function(){var b,c,d=window.mixpanel,e=a.split(".");for(c=0;c Date: Wed, 21 Oct 2015 12:53:35 +0800 Subject: [PATCH 2/2] Update README --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index f0273c5..b9620e8 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,12 @@ angular.module('myApp').controller('MyCtrl', function ($scope, $mixpanel) { }); ``` +If you want to clean up mixpanel's cookie, like logout. + +```javascript +$mixpanel.cookie.clear(); +``` + Issues or feature requests --------------------------