Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@analytics/mixpanel

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@analytics/mixpanel - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [0.2.1](https://github.com/DavidWells/analytics/compare/@analytics/mixpanel@0.2.0...@analytics/mixpanel@0.2.1) (2020-11-09)
### Bug Fixes
* **mixpanel:** fix undefined variable ([9276ecf](https://github.com/DavidWells/analytics/commit/9276ecf))
# 0.2.0 (2020-10-24)

@@ -8,0 +19,0 @@

13

dist/@analytics/mixpanel.js

@@ -6,3 +6,2 @@ var analyticsMixpanel = (function () {

var pluginConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var isMixpanelLoaded = false;
return {

@@ -22,3 +21,3 @@ NAMESPACE: "mixpanel",

if (mixpanel || isMixpanelLoaded) {
if (typeof window.mixpanel !== 'undefined') {
return;

@@ -115,3 +114,2 @@ } // Load mixpanel library

});
isMixpanelLoaded = true;
},

@@ -157,4 +155,11 @@

loaded: function loaded() {
return isMixpanelLoaded;
return !!window.mixpanel;
},
/* Clears super properties and generates a new random distinct_id for this instance. Useful for clearing data when a user logs out. */
reset: function reset() {
mixpanel.reset();
},
/* Custom methods to add .alias call */
methods: {

@@ -161,0 +166,0 @@ /**

@@ -1,1 +0,1 @@

var analyticsMixpanel=function(){"use strict";return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=!1;return{NAMESPACE:"mixpanel",config:e,initialize:function(e){var t=e.config;if(!t.token)throw new Error("No mixpanel token defined");mixpanel||n||(function(e,r){if(!r.__SV){var p,l,t=window;try{var n,a,i,o=t.location,c=o.hash;n=function(e,t){return(a=e.match(RegExp(t+"=([^&]*)")))?a[1]:null},c&&n(c,"state")&&"mpeditor"===(i=JSON.parse(decodeURIComponent(n(c,"state")))).action&&(t.sessionStorage.setItem("_mpcehash",c),history.replaceState(i.desiredHash||"",e.title,o.pathname+o.search))}catch(e){}(window.mixpanel=r)._i=[],r.init=function(e,t,n){function a(e,t){var n=t.split(".");2==n.length&&(e=e[n[0]],t=n[1]),e[t]=function(){e.push([t].concat(Array.prototype.slice.call(arguments,0)))}}var i=r;for(void 0!==n?i=r[n]=[]:n="mixpanel",i.people=i.people||[],i.toString=function(e){var t="mixpanel";return"mixpanel"!==n&&(t+="."+n),e||(t+=" (stub)"),t},i.people.toString=function(){return i.toString(1)+".people (stub)"},p="disable time_event track track_pageview track_links track_forms track_with_groups add_group set_group remove_group register register_once alias unregister identify name_tag set_config reset opt_in_tracking opt_out_tracking has_opted_in_tracking has_opted_out_tracking clear_opt_in_out_tracking people.set people.set_once people.unset people.increment people.append people.union people.track_charge people.clear_charges people.delete_user people.remove".split(" "),l=0;l<p.length;l++)a(i,p[l]);var o="set set_once union unset remove delete".split(" ");i.get_group=function(){function e(e){t[e]=function(){call2_args=arguments,call2=[e].concat(Array.prototype.slice.call(call2_args,0)),i.push([n,call2])}}for(var t={},n=["get_group"].concat(Array.prototype.slice.call(arguments,0)),a=0;a<o.length;a++)e(o[a]);return t},r._i.push([e,t,n])},r.__SV=1.2,(t=e.createElement("script")).type="text/javascript",t.async=!0,t.src="undefined"!=typeof MIXPANEL_CUSTOM_LIB_URL?MIXPANEL_CUSTOM_LIB_URL:"file:"===e.location.protocol&&"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//)?"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js":"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js",(n=e.getElementsByTagName("script")[0]).parentNode.insertBefore(t,n)}}(document,window.mixpanel||[]),mixpanel.init(t.token,{batch_requests:!0}),n=!0)},identify:function(e){var t=e.payload,n=t.userId,a=t.traits;"string"==typeof n&&mixpanel.identify(n),a&&mixpanel.people.set(a)},page:function(e){var t=e.payload;mixpanel.track(t.properties.path,{search:t.properties.search})},track:function(e){var t=e.payload;mixpanel.track(t.event,t.properties)},loaded:function(){return n},methods:{alias:function(e,t){mixpanel.alias(e,t)}}}}}();
var analyticsMixpanel=function(){"use strict";return function(){return{NAMESPACE:"mixpanel",config:0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},initialize:function(e){var t=e.config;if(!t.token)throw new Error("No mixpanel token defined");void 0===window.mixpanel&&(function(e,r){if(!r.__SV){var p,l,t=window;try{var n,i,a,o=t.location,c=o.hash;n=function(e,t){return(i=e.match(RegExp(t+"=([^&]*)")))?i[1]:null},c&&n(c,"state")&&"mpeditor"===(a=JSON.parse(decodeURIComponent(n(c,"state")))).action&&(t.sessionStorage.setItem("_mpcehash",c),history.replaceState(a.desiredHash||"",e.title,o.pathname+o.search))}catch(e){}(window.mixpanel=r)._i=[],r.init=function(e,t,n){function i(e,t){var n=t.split(".");2==n.length&&(e=e[n[0]],t=n[1]),e[t]=function(){e.push([t].concat(Array.prototype.slice.call(arguments,0)))}}var a=r;for(void 0!==n?a=r[n]=[]:n="mixpanel",a.people=a.people||[],a.toString=function(e){var t="mixpanel";return"mixpanel"!==n&&(t+="."+n),e||(t+=" (stub)"),t},a.people.toString=function(){return a.toString(1)+".people (stub)"},p="disable time_event track track_pageview track_links track_forms track_with_groups add_group set_group remove_group register register_once alias unregister identify name_tag set_config reset opt_in_tracking opt_out_tracking has_opted_in_tracking has_opted_out_tracking clear_opt_in_out_tracking people.set people.set_once people.unset people.increment people.append people.union people.track_charge people.clear_charges people.delete_user people.remove".split(" "),l=0;l<p.length;l++)i(a,p[l]);var o="set set_once union unset remove delete".split(" ");a.get_group=function(){function e(e){t[e]=function(){call2_args=arguments,call2=[e].concat(Array.prototype.slice.call(call2_args,0)),a.push([n,call2])}}for(var t={},n=["get_group"].concat(Array.prototype.slice.call(arguments,0)),i=0;i<o.length;i++)e(o[i]);return t},r._i.push([e,t,n])},r.__SV=1.2,(t=e.createElement("script")).type="text/javascript",t.async=!0,t.src="undefined"!=typeof MIXPANEL_CUSTOM_LIB_URL?MIXPANEL_CUSTOM_LIB_URL:"file:"===e.location.protocol&&"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//)?"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js":"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js",(n=e.getElementsByTagName("script")[0]).parentNode.insertBefore(t,n)}}(document,window.mixpanel||[]),mixpanel.init(t.token,{batch_requests:!0}))},identify:function(e){var t=e.payload,n=t.userId,i=t.traits;"string"==typeof n&&mixpanel.identify(n),i&&mixpanel.people.set(i)},page:function(e){var t=e.payload;mixpanel.track(t.properties.path,{search:t.properties.search})},track:function(e){var t=e.payload;mixpanel.track(t.event,t.properties)},loaded:function(){return!!window.mixpanel},reset:function(){mixpanel.reset()},methods:{alias:function(e,t){mixpanel.alias(e,t)}}}}}();

@@ -5,3 +5,2 @@ 'use strict';

var pluginConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var isMixpanelLoaded = false;
return {

@@ -21,3 +20,3 @@ NAMESPACE: "mixpanel",

if (mixpanel || isMixpanelLoaded) {
if (typeof window.mixpanel !== 'undefined') {
return;

@@ -114,3 +113,2 @@ } // Load mixpanel library

});
isMixpanelLoaded = true;
},

@@ -156,4 +154,11 @@

loaded: function loaded() {
return isMixpanelLoaded;
return !!window.mixpanel;
},
/* Clears super properties and generates a new random distinct_id for this instance. Useful for clearing data when a user logs out. */
reset: function reset() {
mixpanel.reset();
},
/* Custom methods to add .alias call */
methods: {

@@ -160,0 +165,0 @@ /**

function mixpanelPlugin$1() {
var pluginConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var isMixpanelLoaded = false;
return {

@@ -18,3 +17,3 @@ NAMESPACE: "mixpanel",

if (mixpanel || isMixpanelLoaded) {
if (typeof window.mixpanel !== 'undefined') {
return;

@@ -111,3 +110,2 @@ } // Load mixpanel library

});
isMixpanelLoaded = true;
},

@@ -153,4 +151,11 @@

loaded: function loaded() {
return isMixpanelLoaded;
return !!window.mixpanel;
},
/* Clears super properties and generates a new random distinct_id for this instance. Useful for clearing data when a user logs out. */
reset: function reset() {
mixpanel.reset();
},
/* Custom methods to add .alias call */
methods: {

@@ -157,0 +162,0 @@ /**

{
"name": "@analytics/mixpanel",
"version": "0.2.0",
"version": "0.2.1",
"description": "Mixpanel plugin for 'analytics' module",

@@ -54,3 +54,3 @@ "projectMeta": {

},
"gitHead": "b7d70d696894f4f8de569b8de3cc68c47cb739da"
"gitHead": "5aeaa6cffe7707d7cc8365519d9e9a690c67ab2e"
}

@@ -90,2 +90,3 @@ <!--

- **[analytics.track](https://getanalytics.io/api/#analyticstrack)** - Track custom events and send to Mixpanel
- **[analytics.reset](https://getanalytics.io/api/#analyticsreset)** - Reset browser storage cookies & localstorage for Mixpanel values

@@ -92,0 +93,0 @@ ### Browser API

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc