🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

vue-multianalytics

Package Overview
Dependencies
Maintainers
2
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-multianalytics - npm Package Compare versions

Comparing version

to
1.7.7

2

dist/vue-multianalytics.min.js

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

module.exports=function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=r(i),c=n(2),u=r(c),l=n(6),s=r(l),f=n(7),d=r(f),p=n(8),v=r(p),g=n(9),y=r(g),h=n(5),m=(o(h),n(3)),b=o(m),k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];e.modulesEnabled=[];for(var o in t.modules){var r=void 0;switch(o){case b.MODULE_GA:r=new u.default,r.init(t.modules[o]);break;case b.MODULE_MIXPANEL:r=new s.default,r.init(t.modules[o]);break;case b.MODULE_SEGMENT:r=new d.default,r.init(t.modules[o]);break;case b.MODULE_FACEBOOK:r=new v.default,r.init(t.modules[o]);break;case b.MODULE_MPARTICLE:r=new y.default,r.init(t.modules[o])}r&&e.modulesEnabled.push(r)}t.routing&&t.routing.vueRouter&&w(e,t.routing);var i=new a.default(e.modulesEnabled);e.prototype.$multianalytics=e.prototype.$ma=e.ma=i,n&&(e.prototype.$multianalyticsm=e.prototype.$mam=e.mam=n(i))},w=function(e,t){return t.ignoredViews&&(t.ignoredViews=t.ignoredViews.map(function(e){return e.toLowerCase()})),t.preferredProperty||(t.preferredProperty="path"),t.vueRouter.afterEach(function(n){t.ignoredViews&&t.ignoredViews.indexOf(n[t.preferredProperty].toLowerCase())!==-1||e.ma.trackView({viewName:n.meta.analytics||n[t.preferredProperty]},t.ignoredModules)}),t.ignoredViews};t.default={install:k}},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function(){function e(t){n(this,e),this.modulesEnabled=t}return o(e,[{key:"trackView",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.viewName&&this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.trackView(e)})}},{key:"trackEvent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.trackEvent(e)})}},{key:"ecommerceTrackEvent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.ecommerceTrackEvent(e)})}},{key:"trackException",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.trackException(e)})}},{key:"trackTiming",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.trackTiming(e)})}},{key:"addTransaction",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.addTransaction(e)})}},{key:"addItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.addItem(e)})}},{key:"trackTransaction",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.modulesEnabled.forEach(function(t){e.indexOf(t.name)===-1&&t.trackTransaction()})}},{key:"clearTransactions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.modulesEnabled.forEach(function(t){e.indexOf(t.name)===-1&&t.clearTransactions()})}},{key:"setUsername",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.setUsername(e)})}},{key:"setUserProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.setUserProperties(e)})}},{key:"setUserPropertiesOnce",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.setUserPropertiesOnce(e)})}},{key:"setSuperProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.setSuperProperties(e)})}},{key:"setSuperPropertiesOnce",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.setSuperPropertiesOnce(e)})}},{key:"identify",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.identify(e)})}},{key:"setAlias",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.setAlias(e)})}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.modulesEnabled.forEach(function(t){e.indexOf(t.name)===-1&&t.reset()})}}]),e}();t.default=r},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),u=n(3),l=n(4),s=o(l),f=n(5),d=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,u.MODULE_GA));return e.settings={additionalAccountNames:[],userId:null},e}return a(t,e),c(t,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t,n,o,r,i,a){e.GoogleAnalyticsObject=r,e[r]=e[r]||function(){(e[r].q=e[r].q||[]).push(arguments)},e[r].l=1*new Date,i=t.createElement(n),a=t.getElementsByTagName(n)[0],i.setAttribute("defer",""),i.src=o,a.parentNode.insertBefore(i,a)}(window,document,"script","https://www.google-analytics.com/analytics.js","ga");var t=["trackingId","appName","appVersion"];t.forEach(function(t){if(!e[t])throw new Error('VueAnalytics : Please provide a "'+t+'" from the config.')}),this.config.debug=e.debug,ga("create",e.trackingId,"auto"),ga("set","transport","beacon"),ga("set","appName",e.appName),ga("set","appVersion",e.appVersion),e.ecommerce&&ga("require","ecommerce")}},{key:"trackView",value:function(e){var t=e.viewName;this.config.debug&&(0,f.logDebug)(t);var n={hitType:"pageview",page:t};this.settings.userId&&ga("set","&uid",this.settings.userId),ga("send",n)}},{key:"trackEvent",value:function(e){var t=e.category,n=void 0===t?"Event":t,o=e.action,r=e.label,i=void 0===r?null:r,a=e.value,c=void 0===a?null:a,u=e.callback,l=void 0===u?null:u;if(this.config.debug&&f.logDebug.apply(void 0,arguments),c){var s=parseInt(c,10);c=isNaN(s)?0:s}var d={hitType:"event",eventCategory:n,eventAction:o,eventLabel:i,eventValue:c,hitCallback:l,userId:this.settings.userId};ga("send",d)}},{key:"trackException",value:function(e){var t=e.description,n=void 0===t?"":t,o=e.isFatal,r=void 0!==o&&o;this.config.debug&&(0,f.logDebug)({description:n,isFatal:r}),ga("send","exception",{exDescription:n,exFatal:r})}},{key:"trackTiming",value:function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.config.debug&&(0,f.logDebug)({timingCategory:e,timingVar:t,timingValue:n,timingLabel:o});var r={hitType:"timing",timingCategory:e,timingVar:t,timingValue:n};o&&(r.timingLabel=o),ga("send",r)}},{key:"setUsername",value:function(e){this.settings.userId=e}},{key:"identify",value:function(e){var t=e.userId;this.setUsername(t)}},{key:"setUserProperties",value:function(e){e.properties}},{key:"addTransaction",value:function(e){var t=e.id,n=e.affiliation,o=void 0===n?"":n,r=e.revenue,i=void 0===r?0:r,a=e.shipping,c=void 0===a?0:a,u=e.tax,l=void 0===u?0:u,s=e.currency,f=void 0===s?"USD":s;ga("ecommerce:addTransaction",{id:t,affiliation:o,revenue:i,shipping:c,tax:l,currency:f})}},{key:"addItem",value:function(e){var t=e.id,n=e.name,o=e.sku,r=e.category,i=e.price,a=void 0===i?0:i,c=e.quantity,u=void 0===c?1:c;ga("ecommerce:addItem",{id:t,name:n,sku:o,category:r,price:a,quantity:u})}},{key:"trackTransaction",value:function(){ga("ecommerce:send")}},{key:"clearTransactions",value:function(){ga("ecommerce:clear")}}]),t}(s.default);t.default=d},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.MODULE_GA="ga",t.MODULE_MIXPANEL="mixpanel",t.MODULE_SEGMENT="segment",t.MODULE_FACEBOOK="facebook",t.MODULE_MPARTICLE="mparticle"},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function(){function e(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,e),this.name=t,this.config=o}return o(e,[{key:"trackView",value:function(){}},{key:"trackEvent",value:function(){}},{key:"trackException",value:function(){}},{key:"trackTiming",value:function(){}},{key:"setAlias",value:function(){}},{key:"identify",value:function(){}},{key:"setUsername",value:function(){}},{key:"setUserProperties",value:function(){}},{key:"setUserPropertiesOnce",value:function(){}},{key:"setSuperProperties",value:function(){}},{key:"setSuperPropertiesOnce",value:function(){}},{key:"ecommerceTrackEvent",value:function(){}},{key:"addTransaction",value:function(){}},{key:"addItem",value:function(){}},{key:"trackTransaction",value:function(){}},{key:"clearTransactions",value:function(){}},{key:"reset",value:function(){}}]),e}();t.default=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.logDebug=function(e){var t;(t=console).log.apply(t,["VueAnalytics :"].concat(Array.prototype.slice.call(arguments)))},t.cordovaApp={bootstrapWindows:function(){window.ActiveXObject=void 0,ga("set","checkProtocolTask",null)}}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),u=n(3),l=n(4),s=o(l),f=n(5),d=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,u.MODULE_MIXPANEL))}return a(t,e),c(t,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!t.__SV){var n=window;try{var o,r,i,a=n.location,c=a.hash;o=function(e,t){return(r=e.match(RegExp(t+"=([^&]*)")))?r[1]:null},c&&o(c,"state")&&(i=JSON.parse(decodeURIComponent(o(c,"state"))),"mpeditor"===i.action&&(n.sessionStorage.setItem("_mpcehash",c),history.replaceState(i.desiredHash||"",e.title,a.pathname+a.search)))}catch(e){}var u,l;window.mixpanel=t,t._i=[],t.init=function(e,n,o){function r(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=t;for("undefined"!=typeof o?i=t[o]=[]:o="mixpanel",i.people=i.people||[],i.toString=function(e){var t="mixpanel";return"mixpanel"!==o&&(t+="."+o),e||(t+=" (stub)"),t},i.people.toString=function(){return i.toString(1)+".people (stub)"},u="disable time_event track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config reset people.set people.set_once people.increment people.append people.union people.track_charge people.clear_charges people.delete_user".split(" "),l=0;l<u.length;l++)r(i,u[l]);t._i.push([e,n,o])},t.__SV=1.2,n=e.createElement("script"),n.type="text/javascript",n.setAttribute("defer",""),n.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",o=e.getElementsByTagName("script")[0],o.parentNode.insertBefore(n,o)}}(document,window.mixpanel||[]);var t=["token"];t.forEach(function(t){if(!e[t])throw new Error('VueMultianalytics : Please provide a "'+t+'" from the config.')}),this.config.debug=e.debug,mixpanel.init(e.token,e.config)}},{key:"trackView",value:function(e){var t=e.viewName;this.config.debug&&(0,f.logDebug)(t),mixpanel.track("Page Viewed",{page:t})}},{key:"trackEvent",value:function(e){var t=e.action,n=e.properties,o=void 0===n?{}:n,r=e.callback,i=void 0===r?null:r;this.config.debug&&f.logDebug.apply(void 0,arguments);var a=Object.assign({},o);mixpanel.track(t,a,i)}},{key:"setAlias",value:function(e){this.config.debug&&(0,f.logDebug)(e),mixpanel.alias(e)}},{key:"identify",value:function(e){var t=e.userId;this.config.debug&&(0,f.logDebug)(t),t&&mixpanel.identify(t)}},{key:"setUsername",value:function(e){this.config.debug&&(0,f.logDebug)(e),mixpanel.identify(e)}},{key:"setUserProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config.debug&&(0,f.logDebug)(e),mixpanel.people.set(e)}},{key:"setUserPropertiesOnce",value:function(e){this.config.debug&&(0,f.logDebug)(e),mixpanel.people.set_once(e)}},{key:"setSuperProperties",value:function(e){this.config.debug&&(0,f.logDebug)(e),mixpanel.register(e)}},{key:"setSuperPropertiesOnce",value:function(e){this.config.debug&&(0,f.logDebug)(e),mixpanel.register_once(e)}},{key:"reset",value:function(){this.config.debug&&(0,f.logDebug)("reset"),mixpanel.reset()}}]),t}(s.default);t.default=d},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),u=n(3),l=n(4),s=o(l),f=n(5),d=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,u.MODULE_SEGMENT));return e.superProperties={},e}return a(t,e),c(t,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(){var e=window.analytics=window.analytics||[];if(!e.initialize)if(e.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{e.invoked=!0,e.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"],e.factory=function(t){return function(){var n=Array.prototype.slice.call(arguments);return n.unshift(t),e.push(n),e}};for(var t=0;t<e.methods.length;t++){var n=e.methods[t];e[n]=e.factory(n)}e.load=function(e){var t=document.createElement("script");t.type="text/javascript",t.setAttribute("defer",""),t.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+e+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n)},e.SNIPPET_VERSION="4.0.0"}}();var t=["token"];t.forEach(function(t){if(!e[t])throw new Error('VueMultianalytics : Please provide a "'+t+'" from the config.')}),this.config.debug=e.debug,analytics.load(e.token),this.config.debug&&analytics.debug()}},{key:"trackView",value:function(e){var t=e.viewName,n=e.properties,o=void 0===n?{}:n;this.config.debug&&f.logDebug.apply(void 0,arguments);try{Object.assign(o,this.superProperties);analytics.page(t,o)}catch(e){if(!(e instanceof ReferenceError))throw e}}},{key:"trackEvent",value:function(e){var t=(e.category,e.action),n=(e.label,e.value,e.properties),o=void 0===n?{}:n;e.callback;this.config.debug&&f.logDebug.apply(void 0,arguments);try{var r=Object.assign(o,this.superProperties);analytics.track(t,r)}catch(e){if(!(e instanceof ReferenceError))throw e}}},{key:"setUserProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config.debug&&(0,f.logDebug)(e);var t={};if(e.hasOwnProperty("userId")){var n=e.userId;e.delete("userId"),t.userId=n}t.options=e,this.identify(t)}},{key:"setSuperProperties",value:function(e){this.config.debug&&(0,f.logDebug)(e),this.superProperties=e}},{key:"identify",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config.debug&&(0,f.logDebug)(e);try{e.userId?analytics.identify(e.userId,e.options):analytics.identify(e.options)}catch(e){if(!(e instanceof ReferenceError))throw e}}},{key:"setUsername",value:function(e){this.config.debug&&(0,f.logDebug)(e),this.identify({userId:e})}},{key:"setAlias",value:function(e){this.config.debug&&(0,f.logDebug)(e);try{analytics.alias(e)}catch(e){if(!(e instanceof ReferenceError))throw e}}},{key:"reset",value:function(){this.config.debug&&(0,f.logDebug)("reset");try{analytics.reset()}catch(e){if(!(e instanceof ReferenceError))throw e}}}]),t}(s.default);t.default=d},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){if(null==e)throw new TypeError("Cannot destructure undefined")}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=n(3),s=n(4),f=o(s),d=n(5),p=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l.MODULE_FACEBOOK))}return c(t,e),u(t,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t,n,o,r,i,a){e.fbq||(r=e.fbq=function(){r.callMethod?r.callMethod.apply(r,arguments):r.queue.push(arguments)},e._fbq||(e._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[],i=t.createElement(n),i.setAttribute("defer",""),i.src=o,a=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(i,a))}(window,document,"script","https://connect.facebook.net/en_US/fbevents.js");var t=["token"];t.forEach(function(t){if(!e[t])throw new Error('VueAnalytics : Please provide a "'+t+'" from the config.')}),this.config.debug=e.debug,fbq("init",e.token)}},{key:"trackView",value:function(e){r(e),fbq("track","PageView")}},{key:"trackEvent",value:function(e){var t=e.fb_event,n=void 0===t?"ViewContent":t,o=e.category,r=void 0===o?"Event":o,i=(e.action,e.label),a=void 0===i?null:i,c=e.value,u=void 0===c?null:c,l=(e.callback,e.ids),s=void 0===l?[]:l,f=e.type,p=void 0===f?null:f,v=e.currency,g=void 0===v?null:v;if(this.config.debug&&d.logDebug.apply(void 0,arguments),u){var y=parseInt(u,10);u=isNaN(y)?0:y}var h={content_name:a,content_category:r,content_ids:s,content_type:p,value:u,currency:g};fbq("track",n,h)}}]),t}(f.default);t.default=p},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=n(3),s=n(4),f=o(s),d=n(5),p=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l.MODULE_MPARTICLE));return e.superProperties={},e}return a(t,e),u(t,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=["token"];t.forEach(function(t){if(!e[t])throw new Error('VueMultianalytics : Please provide a "'+t+'" from the config.')}),window.mParticle={config:{isDebug:e.debug,isSandbox:e.sandbox}},function(e){window.mParticle=window.mParticle||{},window.mParticle.config=window.mParticle.config||{},window.mParticle.config.rq=[],window.mParticle.ready=function(e){window.mParticle.config.rq.push(e)};var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=("https:"==document.location.protocol?"https://jssdkcdns":"http://jssdkcdn")+".mparticle.com/js/v1/"+e+"/mparticle.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n)}(e.token)}},{key:"trackView",value:function(e){var t=e.viewName,n=e.properties,o=void 0===n?{}:n,r=e.customFlags,i=void 0===r?{}:r;try{var a=Object.assign(o,this.superProperties);console.log("my properties are: ",a,this.superProperties),mParticle.logPageView(t,a,i)}catch(e){if(!(e instanceof ReferenceError))throw e}}},{key:"trackEvent",value:function(e){var t=(e.category,e.action),n=e.eventType,o=void 0===n?mParticle.EventType.Other:n,r=(e.label,e.value,e.properties),i=void 0===r?{}:r;e.callback;try{this.config.debug&&d.logDebug.apply(void 0,arguments);var a=Object.assign(i,this.superProperties);console.log("my properties are: ",a,this.superProperties),mParticle.logEvent(t,o,a)}catch(e){if(!(e instanceof ReferenceError))throw e}}},{key:"ecommerceTrackEvent",value:function(e){var t=e.productActionType,n=void 0===t?mParticle.CommerceEventType.ProductAddToCart:t,o=e.product,r=void 0===o?void 0:o,i=e.properties,a=void 0===i?{}:i,u=e.currency,l=void 0===u?void 0:u;try{if(this.config.debug&&d.logDebug.apply(void 0,arguments),r&&"object"===("undefined"==typeof r?"undefined":c(r))){Array.isArray(r)?r:[r],productsToCreate.forEach(function(e){return mParticle.eCommerce.createProduct(e.name,e.sku||performance.now(),e.price,e.quantity)})}var s=Object.assign(a,this.superProperties);l&&mParticle.eCommerce.setCurrencyCode(l),mParticle.eCommerce.logProductAction(n,mProduct,s)}catch(e){if(!(e instanceof ReferenceError))throw e}}},{key:"setUserProperties",value:function(e){try{this.config.debug&&d.logDebug.apply(void 0,arguments),e.userId&&mParticle.setUserIdentity(e.userId,e.identityType||mParticle.IdentityType.CustomerId)}catch(e){if(!(e instanceof ReferenceError))throw e}}},{key:"setSuperProperties",value:function(e){this.superProperties=e}}]),t}(f.default);t.default=p}]);
module.exports=function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=r(i),c=n(2),u=r(c),l=n(6),s=r(l),f=n(7),d=r(f),p=n(8),v=r(p),g=n(9),y=r(g),h=n(5),m=(o(h),n(3)),b=o(m),k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];e.modulesEnabled=[];for(var o in t.modules){var r=void 0;switch(o){case b.MODULE_GA:r=new u.default,r.init(t.modules[o]);break;case b.MODULE_MIXPANEL:r=new s.default,r.init(t.modules[o]);break;case b.MODULE_SEGMENT:r=new d.default,r.init(t.modules[o]);break;case b.MODULE_FACEBOOK:r=new v.default,r.init(t.modules[o]);break;case b.MODULE_MPARTICLE:r=new y.default,r.init(t.modules[o])}r&&e.modulesEnabled.push(r)}t.routing&&t.routing.vueRouter&&w(e,t.routing);var i=new a.default(e.modulesEnabled);e.prototype.$multianalytics=e.prototype.$ma=e.ma=i,n&&(e.prototype.$multianalyticsm=e.prototype.$mam=e.mam=n(i))},w=function(e,t){return t.ignoredViews&&(t.ignoredViews=t.ignoredViews.map(function(e){return e.toLowerCase()})),t.preferredProperty||(t.preferredProperty="path"),t.vueRouter.afterEach(function(n){t.ignoredViews&&t.ignoredViews.indexOf(n[t.preferredProperty].toLowerCase())!==-1||e.ma.trackView({viewName:n.meta.analytics||n[t.preferredProperty]},t.ignoredModules)}),t.ignoredViews};t.default={install:k}},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function(){function e(t){n(this,e),this.modulesEnabled=t}return o(e,[{key:"trackView",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.viewName&&this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.trackView(e)})}},{key:"trackEvent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.trackEvent(e)})}},{key:"ecommerceTrackEvent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.ecommerceTrackEvent(e)})}},{key:"trackException",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.trackException(e)})}},{key:"trackTiming",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.trackTiming(e)})}},{key:"addTransaction",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.addTransaction(e)})}},{key:"addItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.addItem(e)})}},{key:"trackTransaction",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.modulesEnabled.forEach(function(t){e.indexOf(t.name)===-1&&t.trackTransaction()})}},{key:"clearTransactions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.modulesEnabled.forEach(function(t){e.indexOf(t.name)===-1&&t.clearTransactions()})}},{key:"setUsername",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.setUsername(e)})}},{key:"setUserProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.setUserProperties(e)})}},{key:"setUserPropertiesOnce",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.setUserPropertiesOnce(e)})}},{key:"setSuperProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.setSuperProperties(e)})}},{key:"setSuperPropertiesOnce",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.setSuperPropertiesOnce(e)})}},{key:"identify",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.identify(e)})}},{key:"setAlias",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.modulesEnabled.forEach(function(n){t.indexOf(n.name)===-1&&n.setAlias(e)})}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.modulesEnabled.forEach(function(t){e.indexOf(t.name)===-1&&t.reset()})}}]),e}();t.default=r},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),u=n(3),l=n(4),s=o(l),f=n(5),d=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,u.MODULE_GA));return e.settings={additionalAccountNames:[],userId:null},e}return a(t,e),c(t,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t,n,o,r,i,a){e.GoogleAnalyticsObject=r,e[r]=e[r]||function(){(e[r].q=e[r].q||[]).push(arguments)},e[r].l=1*new Date,i=t.createElement(n),a=t.getElementsByTagName(n)[0],i.setAttribute("defer",""),i.src=o,a.parentNode.insertBefore(i,a)}(window,document,"script","https://www.google-analytics.com/analytics.js","ga");var t=["trackingId","appName","appVersion"];t.forEach(function(t){if(!e[t])throw new Error('VueAnalytics : Please provide a "'+t+'" from the config.')}),this.config.debug=e.debug,ga("create",e.trackingId,"auto"),ga("set","transport","beacon"),ga("set","appName",e.appName),ga("set","appVersion",e.appVersion),e.ecommerce&&ga("require","ecommerce")}},{key:"trackView",value:function(e){var t=e.viewName;this.config.debug&&(0,f.logDebug)(t);var n={hitType:"pageview",page:t};this.settings.userId&&ga("set","&uid",this.settings.userId),ga("send",n)}},{key:"trackEvent",value:function(e){var t=e.category,n=void 0===t?"Event":t,o=e.action,r=e.label,i=void 0===r?null:r,a=e.value,c=void 0===a?null:a,u=e.callback,l=void 0===u?null:u;if(this.config.debug&&f.logDebug.apply(void 0,arguments),c){var s=parseInt(c,10);c=isNaN(s)?0:s}var d={hitType:"event",eventCategory:n,eventAction:o,eventLabel:i,eventValue:c,hitCallback:l,userId:this.settings.userId};ga("send",d)}},{key:"trackException",value:function(e){var t=e.description,n=void 0===t?"":t,o=e.isFatal,r=void 0!==o&&o;this.config.debug&&(0,f.logDebug)({description:n,isFatal:r}),ga("send","exception",{exDescription:n,exFatal:r})}},{key:"trackTiming",value:function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.config.debug&&(0,f.logDebug)({timingCategory:e,timingVar:t,timingValue:n,timingLabel:o});var r={hitType:"timing",timingCategory:e,timingVar:t,timingValue:n};o&&(r.timingLabel=o),ga("send",r)}},{key:"setUsername",value:function(e){this.settings.userId=e}},{key:"identify",value:function(e){var t=e.userId;this.setUsername(t)}},{key:"setUserProperties",value:function(e){e.properties}},{key:"addTransaction",value:function(e){var t=e.id,n=e.affiliation,o=void 0===n?"":n,r=e.revenue,i=void 0===r?0:r,a=e.shipping,c=void 0===a?0:a,u=e.tax,l=void 0===u?0:u,s=e.currency,f=void 0===s?"USD":s;ga("ecommerce:addTransaction",{id:t,affiliation:o,revenue:i,shipping:c,tax:l,currency:f})}},{key:"addItem",value:function(e){var t=e.id,n=e.name,o=e.sku,r=e.category,i=e.price,a=void 0===i?0:i,c=e.quantity,u=void 0===c?1:c;ga("ecommerce:addItem",{id:t,name:n,sku:o,category:r,price:a,quantity:u})}},{key:"trackTransaction",value:function(){ga("ecommerce:send")}},{key:"clearTransactions",value:function(){ga("ecommerce:clear")}}]),t}(s.default);t.default=d},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.MODULE_GA="ga",t.MODULE_MIXPANEL="mixpanel",t.MODULE_SEGMENT="segment",t.MODULE_FACEBOOK="facebook",t.MODULE_MPARTICLE="mparticle"},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function(){function e(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,e),this.name=t,this.config=o}return o(e,[{key:"trackView",value:function(){}},{key:"trackEvent",value:function(){}},{key:"trackException",value:function(){}},{key:"trackTiming",value:function(){}},{key:"setAlias",value:function(){}},{key:"identify",value:function(){}},{key:"setUsername",value:function(){}},{key:"setUserProperties",value:function(){}},{key:"setUserPropertiesOnce",value:function(){}},{key:"setSuperProperties",value:function(){}},{key:"setSuperPropertiesOnce",value:function(){}},{key:"ecommerceTrackEvent",value:function(){}},{key:"addTransaction",value:function(){}},{key:"addItem",value:function(){}},{key:"trackTransaction",value:function(){}},{key:"clearTransactions",value:function(){}},{key:"reset",value:function(){}}]),e}();t.default=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.logDebug=function(e){var t;(t=console).log.apply(t,["VueAnalytics :"].concat(Array.prototype.slice.call(arguments)))},t.cordovaApp={bootstrapWindows:function(){window.ActiveXObject=void 0,ga("set","checkProtocolTask",null)}}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),u=n(3),l=n(4),s=o(l),f=n(5),d=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,u.MODULE_MIXPANEL))}return a(t,e),c(t,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!t.__SV){var n=window;try{var o,r,i,a=n.location,c=a.hash;o=function(e,t){return(r=e.match(RegExp(t+"=([^&]*)")))?r[1]:null},c&&o(c,"state")&&(i=JSON.parse(decodeURIComponent(o(c,"state"))),"mpeditor"===i.action&&(n.sessionStorage.setItem("_mpcehash",c),history.replaceState(i.desiredHash||"",e.title,a.pathname+a.search)))}catch(e){}var u,l;window.mixpanel=t,t._i=[],t.init=function(e,n,o){function r(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=t;for("undefined"!=typeof o?i=t[o]=[]:o="mixpanel",i.people=i.people||[],i.toString=function(e){var t="mixpanel";return"mixpanel"!==o&&(t+="."+o),e||(t+=" (stub)"),t},i.people.toString=function(){return i.toString(1)+".people (stub)"},u="disable time_event track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config reset people.set people.set_once people.increment people.append people.union people.track_charge people.clear_charges people.delete_user".split(" "),l=0;l<u.length;l++)r(i,u[l]);t._i.push([e,n,o])},t.__SV=1.2,n=e.createElement("script"),n.type="text/javascript",n.setAttribute("defer",""),n.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",o=e.getElementsByTagName("script")[0],o.parentNode.insertBefore(n,o)}}(document,window.mixpanel||[]);var t=["token"];t.forEach(function(t){if(!e[t])throw new Error('VueMultianalytics : Please provide a "'+t+'" from the config.')}),this.config.debug=e.debug,mixpanel.init(e.token,e.config)}},{key:"trackView",value:function(e){var t=e.viewName;this.config.debug&&(0,f.logDebug)(t),mixpanel.track("Page Viewed",{page:t})}},{key:"trackEvent",value:function(e){var t=e.action,n=e.properties,o=void 0===n?{}:n,r=e.callback,i=void 0===r?null:r;this.config.debug&&f.logDebug.apply(void 0,arguments);var a=Object.assign({},o);mixpanel.track(t,a,i)}},{key:"setAlias",value:function(e){this.config.debug&&(0,f.logDebug)(e),mixpanel.alias(e)}},{key:"identify",value:function(e){var t=e.userId;this.config.debug&&(0,f.logDebug)(t),t&&mixpanel.identify(t)}},{key:"setUsername",value:function(e){this.config.debug&&(0,f.logDebug)(e),mixpanel.identify(e)}},{key:"setUserProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config.debug&&(0,f.logDebug)(e),mixpanel.people.set(e)}},{key:"setUserPropertiesOnce",value:function(e){this.config.debug&&(0,f.logDebug)(e),mixpanel.people.set_once(e)}},{key:"setSuperProperties",value:function(e){this.config.debug&&(0,f.logDebug)(e),mixpanel.register(e)}},{key:"setSuperPropertiesOnce",value:function(e){this.config.debug&&(0,f.logDebug)(e),mixpanel.register_once(e)}},{key:"reset",value:function(){this.config.debug&&(0,f.logDebug)("reset"),mixpanel.reset()}}]),t}(s.default);t.default=d},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),u=n(3),l=n(4),s=o(l),f=n(5),d=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,u.MODULE_SEGMENT));return e.superProperties={},e}return a(t,e),c(t,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(){var e=window.analytics=window.analytics||[];if(!e.initialize)if(e.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{e.invoked=!0,e.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"],e.factory=function(t){return function(){var n=Array.prototype.slice.call(arguments);return n.unshift(t),e.push(n),e}};for(var t=0;t<e.methods.length;t++){var n=e.methods[t];e[n]=e.factory(n)}e.load=function(e){var t=document.createElement("script");t.type="text/javascript",t.setAttribute("defer",""),t.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+e+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n)},e.SNIPPET_VERSION="4.0.0"}}();var t=["token"];t.forEach(function(t){if(!e[t])throw new Error('VueMultianalytics : Please provide a "'+t+'" from the config.')}),this.config.debug=e.debug,analytics.load(e.token),this.config.debug&&analytics.debug()}},{key:"trackView",value:function(e){var t=e.viewName,n=e.properties,o=void 0===n?{}:n;this.config.debug&&f.logDebug.apply(void 0,arguments);try{Object.assign(o,this.superProperties);analytics.page(t,o)}catch(e){if(!(e instanceof ReferenceError))throw e}}},{key:"trackEvent",value:function(e){var t=(e.category,e.action),n=(e.label,e.value,e.properties),o=void 0===n?{}:n;e.callback;this.config.debug&&f.logDebug.apply(void 0,arguments);try{var r=Object.assign(o,this.superProperties);analytics.track(t,r)}catch(e){if(!(e instanceof ReferenceError))throw e}}},{key:"setUserProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config.debug&&(0,f.logDebug)(e);var t={};if(e.hasOwnProperty("userId")){var n=e.userId;e.delete("userId"),t.userId=n}t.options=e,this.identify(t)}},{key:"setSuperProperties",value:function(e){this.config.debug&&(0,f.logDebug)(e),this.superProperties=e}},{key:"identify",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config.debug&&(0,f.logDebug)(e);try{e.userId?analytics.identify(e.userId,e.options):analytics.identify(e.options)}catch(e){if(!(e instanceof ReferenceError))throw e}}},{key:"setUsername",value:function(e){this.config.debug&&(0,f.logDebug)(e),this.identify({userId:e})}},{key:"setAlias",value:function(e){this.config.debug&&(0,f.logDebug)(e);try{analytics.alias(e)}catch(e){if(!(e instanceof ReferenceError))throw e}}},{key:"reset",value:function(){this.config.debug&&(0,f.logDebug)("reset");try{analytics.reset()}catch(e){if(!(e instanceof ReferenceError))throw e}}}]),t}(s.default);t.default=d},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){if(null==e)throw new TypeError("Cannot destructure undefined")}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=n(3),s=n(4),f=o(s),d=n(5),p=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l.MODULE_FACEBOOK))}return c(t,e),u(t,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t,n,o,r,i,a){e.fbq||(r=e.fbq=function(){r.callMethod?r.callMethod.apply(r,arguments):r.queue.push(arguments)},e._fbq||(e._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[],i=t.createElement(n),i.setAttribute("defer",""),i.src=o,a=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(i,a))}(window,document,"script","https://connect.facebook.net/en_US/fbevents.js");var t=["token"];t.forEach(function(t){if(!e[t])throw new Error('VueAnalytics : Please provide a "'+t+'" from the config.')}),this.config.debug=e.debug,fbq("init",e.token)}},{key:"trackView",value:function(e){r(e),fbq("track","PageView")}},{key:"trackEvent",value:function(e){var t=e.fb_event,n=void 0===t?"ViewContent":t,o=e.category,r=void 0===o?"Event":o,i=(e.action,e.label),a=void 0===i?null:i,c=e.value,u=void 0===c?null:c,l=(e.callback,e.ids),s=void 0===l?[]:l,f=e.type,p=void 0===f?null:f,v=e.currency,g=void 0===v?null:v;if(this.config.debug&&d.logDebug.apply(void 0,arguments),u){var y=parseInt(u,10);u=isNaN(y)?0:y}var h={content_name:a,content_category:r,content_ids:s,content_type:p,value:u,currency:g};fbq("track",n,h)}}]),t}(f.default);t.default=p},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=n(3),s=n(4),f=o(s),d=n(5),p=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l.MODULE_MPARTICLE));return e.superProperties={},e}return a(t,e),u(t,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=["token"];t.forEach(function(t){if(!e[t])throw new Error('VueMultianalytics : Please provide a "'+t+'" from the config.')}),window.mParticle={config:{isDebug:e.debug,isSandbox:e.sandbox}},function(e){window.mParticle=window.mParticle||{},window.mParticle.config=window.mParticle.config||{},window.mParticle.config.rq=[],window.mParticle.ready=function(e){window.mParticle.config.rq.push(e)};var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=("https:"==document.location.protocol?"https://jssdkcdns":"http://jssdkcdn")+".mparticle.com/js/v2/"+e+"/mparticle.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n)}(e.token)}},{key:"trackView",value:function(e){var t=e.viewName,n=e.properties,o=void 0===n?{}:n,r=e.customFlags,i=void 0===r?{}:r;try{var a=Object.assign(o,this.superProperties);mParticle.logPageView(t,a,i)}catch(e){if(!(e instanceof ReferenceError))throw e}}},{key:"trackEvent",value:function(e){var t=(e.category,e.action),n=e.eventType,o=void 0===n?mParticle.EventType.Other:n,r=(e.label,e.value,e.properties),i=void 0===r?{}:r;e.callback;try{this.config.debug&&d.logDebug.apply(void 0,arguments);var a=Object.assign(i,this.superProperties);console.log("my properties are: ",a,this.superProperties),mParticle.logEvent(t,o,a)}catch(e){if(!(e instanceof ReferenceError))throw e}}},{key:"ecommerceTrackEvent",value:function(e){var t=e.productActionType,n=void 0===t?mParticle.CommerceEventType.ProductAddToCart:t,o=e.product,r=void 0===o?[]:o,i=e.properties,a=void 0===i?{}:i,u=e.currency,l=void 0===u?void 0:u;try{this.config.debug&&d.logDebug.apply(void 0,arguments);var s=[],f=[];if(r&&"object"===("undefined"==typeof r?"undefined":c(r))){Array.isArray(r)?r:[r],s.forEach(function(e){return mParticle.eCommerce.createProduct(e.name,e.sku||performance.now(),e.price,e.quantity)})}var p=Object.assign(a,this.superProperties);l&&mParticle.eCommerce.setCurrencyCode(l),mParticle.eCommerce.logProductAction(n,f,p)}catch(e){if(!(e instanceof ReferenceError))throw e}}},{key:"setUserProperties",value:function(e){try{this.config.debug&&d.logDebug.apply(void 0,arguments),e.userId&&mParticle.setUserIdentity(e.userId,e.identityType||mParticle.IdentityType.CustomerId)}catch(e){if(!(e instanceof ReferenceError))throw e}}},{key:"setSuperProperties",value:function(e){this.superProperties=e}}]),t}(f.default);t.default=p}]);
{
"name": "vue-multianalytics",
"version": "1.7.6",
"version": "1.7.7",
"description": "A vue multianalytics tool",

@@ -5,0 +5,0 @@ "main": "./dist/vue-multianalytics.min.js",

@@ -94,3 +94,3 @@ import { MODULE_MPARTICLE } from '../analyticsTypes'

*/
ecommerceTrackEvent ({productActionType = mParticle.CommerceEventType.ProductAddToCart, product = undefined, properties = {}, currency = undefined }) {
ecommerceTrackEvent ({productActionType = mParticle.CommerceEventType.ProductAddToCart, product = [], properties = {}, currency = undefined }) {
try {

@@ -100,2 +100,4 @@ if (this.config.debug) {

}
let productsToCreate = []
let mProducts = []

@@ -105,3 +107,3 @@ if (product && typeof product === 'object') {

let mProduct = productsToCreate.forEach(productToCreate => mParticle.eCommerce.createProduct(
let mProducts = productsToCreate.forEach(productToCreate => mParticle.eCommerce.createProduct(
productToCreate.name,

@@ -118,3 +120,3 @@ productToCreate.sku || performance.now(),

}
mParticle.eCommerce.logProductAction(productActionType, mProduct, fullProperties)
mParticle.eCommerce.logProductAction(productActionType, mProducts, fullProperties)
} catch (e) {

@@ -121,0 +123,0 @@ if (!(e instanceof ReferenceError)) {

Sorry, the diff of this file is too big to display