🚀 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.6.6

2

dist/vue-multianalytics.min.js

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

module.exports=function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return e[i].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function i(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 o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),a=o(r),c=n(2),u=o(c),s=n(6),l=o(s),f=n(7),d=o(f),p=n(8),v=o(p),g=n(9),y=o(g),h=n(5),m=(i(h),n(3)),b=i(m),k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];e.modulesEnabled=[];for(var i in t.modules){var o=void 0;switch(i){case b.MODULE_GA:o=new u.default,o.init(t.modules[i]);break;case b.MODULE_MIXPANEL:o=new l.default,o.init(t.modules[i]);break;case b.MODULE_SEGMENT:o=new d.default,o.init(t.modules[i]);break;case b.MODULE_FACEBOOK:o=new v.default,o.init(t.modules[i]);break;case b.MODULE_MPARTICLE:o=new y.default,o.init(t.modules[i])}o&&e.modulesEnabled.push(o)}t.routing&&t.routing.vueRouter&&w(e,t.routing);var r=new a.default(e.modulesEnabled);e.prototype.$multianalytics=e.prototype.$ma=e.ma=r,n&&(e.prototype.$multianalyticsm=e.prototype.$mam=e.mam=n(r))},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 i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=function(){function e(t){n(this,e),this.modulesEnabled=t}return i(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=o},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(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 i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(3),s=n(4),l=i(s),f=n(5),d=function(e){function t(){o(this,t);var e=r(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,i,o,r,a){e.GoogleAnalyticsObject=o,e[o]=e[o]||function(){(e[o].q=e[o].q||[]).push(arguments)},e[o].l=1*new Date,r=t.createElement(n),a=t.getElementsByTagName(n)[0],r.setAttribute("defer",""),r.src=i,a.parentNode.insertBefore(r,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,i=e.action,o=e.label,r=void 0===o?null:o,a=e.value,c=void 0===a?null:a,u=e.callback,s=void 0===u?null:u;if(this.config.debug&&f.logDebug.apply(void 0,arguments),c){var l=parseInt(c,10);c=isNaN(l)?0:l}var d={hitType:"event",eventCategory:n,eventAction:i,eventLabel:r,eventValue:c,hitCallback:s,userId:this.settings.userId};ga("send",d)}},{key:"trackException",value:function(e){var t=e.description,n=void 0===t?"":t,i=e.isFatal,o=void 0!==i&&i;this.config.debug&&(0,f.logDebug)({description:n,isFatal:o}),ga("send","exception",{exDescription:n,exFatal:o})}},{key:"trackTiming",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.config.debug&&(0,f.logDebug)({timingCategory:e,timingVar:t,timingValue:n,timingLabel:i});var o={hitType:"timing",timingCategory:e,timingVar:t,timingValue:n};i&&(o.timingLabel=i),ga("send",o)}},{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,i=void 0===n?"":n,o=e.revenue,r=void 0===o?0:o,a=e.shipping,c=void 0===a?0:a,u=e.tax,s=void 0===u?0:u,l=e.currency,f=void 0===l?"USD":l;ga("ecommerce:addTransaction",{id:t,affiliation:i,revenue:r,shipping:c,tax:s,currency:f})}},{key:"addItem",value:function(e){var t=e.id,n=e.name,i=e.sku,o=e.category,r=e.price,a=void 0===r?0:r,c=e.quantity,u=void 0===c?1:c;ga("ecommerce:addItem",{id:t,name:n,sku:i,category:o,price:a,quantity:u})}},{key:"trackTransaction",value:function(){ga("ecommerce:send")}},{key:"clearTransactions",value:function(){ga("ecommerce:clear")}}]),t}(l.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 i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,e),this.name=t,this.config=i}return i(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=o},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 i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(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 i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(3),s=n(4),l=i(s),f=n(5),d=function(e){function t(){return o(this,t),r(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 i,o,r,a=n.location,c=a.hash;i=function(e,t){return(o=e.match(RegExp(t+"=([^&]*)")))?o[1]:null},c&&i(c,"state")&&(r=JSON.parse(decodeURIComponent(i(c,"state"))),"mpeditor"===r.action&&(n.sessionStorage.setItem("_mpcehash",c),history.replaceState(r.desiredHash||"",e.title,a.pathname+a.search)))}catch(e){}var u,s;window.mixpanel=t,t._i=[],t.init=function(e,n,i){function o(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 r=t;for("undefined"!=typeof i?r=t[i]=[]:i="mixpanel",r.people=r.people||[],r.toString=function(e){var t="mixpanel";return"mixpanel"!==i&&(t+="."+i),e||(t+=" (stub)"),t},r.people.toString=function(){return r.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(" "),s=0;s<u.length;s++)o(r,u[s]);t._i.push([e,n,i])},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",i=e.getElementsByTagName("script")[0],i.parentNode.insertBefore(n,i)}}(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,i=void 0===n?{}:n,o=e.callback,r=void 0===o?null:o;this.config.debug&&f.logDebug.apply(void 0,arguments);var a=Object.assign({},i);mixpanel.track(t,a,r)}},{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}(l.default);t.default=d},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(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 i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(3),s=n(4),l=i(s),f=n(5),d=function(e){function t(){o(this,t);var e=r(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,i=void 0===n?{}:n;this.config.debug&&f.logDebug.apply(void 0,arguments);try{Object.assign(i,this.superProperties);analytics.page(t,i)}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),i=void 0===n?{}:n;e.callback;this.config.debug&&f.logDebug.apply(void 0,arguments);try{var o=Object.assign(i,this.superProperties);analytics.track(t,o)}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}(l.default);t.default=d},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e){if(null==e)throw new TypeError("Cannot destructure undefined")}function r(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 i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=n(3),l=n(4),f=i(l),d=n(5),p=function(e){function t(){return r(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,s.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,i,o,r,a){e.fbq||(o=e.fbq=function(){o.callMethod?o.callMethod.apply(o,arguments):o.queue.push(arguments)},e._fbq||(e._fbq=o),o.push=o,o.loaded=!0,o.version="2.0",o.queue=[],r=t.createElement(n),r.setAttribute("defer",""),r.src=i,a=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(r,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){o(e),fbq("track","PageView")}},{key:"trackEvent",value:function(e){var t=e.fb_event,n=void 0===t?"ViewContent":t,i=e.category,o=void 0===i?"Event":i,r=(e.action,e.label),a=void 0===r?null:r,c=e.value,u=void 0===c?null:c,s=(e.callback,e.ids),l=void 0===s?[]:s,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:o,content_ids:l,content_type:p,value:u,currency:g};fbq("track",n,h)}}]),t}(f.default);t.default=p},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(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 i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=n(3),s=n(4),l=i(s),f=n(5),d=function(e){function t(){o(this,t);var e=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,u.MODULE_MPARTICLE));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]:{},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,this.config.sandbox=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,i=void 0===n?{}:n,o=e.customFlags,r=void 0===o?{}:o;try{mParticle.isSandbox=this.config.sandbox,mParticle.isDebug=this.config.debug;Object.assign(this.superProperties,i);mParticle.logPageView(t,i,r)}catch(e){if(!(e instanceof ReferenceError))throw e}}},{key:"trackEvent",value:function(e){var t=(e.category,e.action),n=e.eventType,i=void 0===n?mParticle.EventType.Other:n,o=(e.label,e.value,e.properties),r=void 0===o?{}:o;e.callback;try{this.config.debug&&f.logDebug.apply(void 0,arguments);var a=Object.assign(this.superProperties,r);mParticle.isSandbox=this.config.sandbox,mParticle.isDebug=this.config.debug,mParticle.logEvent(t,i,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,i=e.product,o=void 0===i?{}:i,r=e.properties,a=void 0===r?{}:r;try{this.config.debug&&f.logDebug.apply(void 0,arguments);var c=mParticle.eCommerce.createProduct(o.name,o.sku||performance.now(),o.price,o.quantity);mParticle.isSandbox=this.config.sandbox,mParticle.isDebug=this.config.debug;var u=Object.assign(this.superProperties,a);mParticle.eCommerce.logProductAction(n,c,u)}catch(e){if(!(e instanceof ReferenceError))throw e}}},{key:"setUserProperties",value:function(e){try{this.config.debug&&f.logDebug.apply(void 0,arguments),mParticle.isSandbox=this.config.sandbox,mParticle.isDebug=this.config.debug,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}(l.default);t.default=d}]);
module.exports=function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.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 i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),a=i(r),c=n(2),u=i(c),l=n(6),s=i(l),f=n(7),d=i(f),p=n(8),v=i(p),g=n(9),y=i(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 i=void 0;switch(o){case b.MODULE_GA:i=new u.default,i.init(t.modules[o]);break;case b.MODULE_MIXPANEL:i=new s.default,i.init(t.modules[o]);break;case b.MODULE_SEGMENT:i=new d.default,i.init(t.modules[o]);break;case b.MODULE_FACEBOOK:i=new v.default,i.init(t.modules[o]);break;case b.MODULE_MPARTICLE:i=new y.default,i.init(t.modules[o])}i&&e.modulesEnabled.push(i)}t.routing&&t.routing.vueRouter&&w(e,t.routing);var r=new a.default(e.modulesEnabled);e.prototype.$multianalytics=e.prototype.$ma=e.ma=r,n&&(e.prototype.$multianalyticsm=e.prototype.$mam=e.mam=n(r))},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}}(),i=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=i},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(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(){i(this,t);var e=r(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,i,r,a){e.GoogleAnalyticsObject=i,e[i]=e[i]||function(){(e[i].q=e[i].q||[]).push(arguments)},e[i].l=1*new Date,r=t.createElement(n),a=t.getElementsByTagName(n)[0],r.setAttribute("defer",""),r.src=o,a.parentNode.insertBefore(r,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,i=e.label,r=void 0===i?null:i,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:r,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,i=void 0!==o&&o;this.config.debug&&(0,f.logDebug)({description:n,isFatal:i}),ga("send","exception",{exDescription:n,exFatal:i})}},{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 i={hitType:"timing",timingCategory:e,timingVar:t,timingValue:n};o&&(i.timingLabel=o),ga("send",i)}},{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,i=e.revenue,r=void 0===i?0:i,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:r,shipping:c,tax:l,currency:f})}},{key:"addItem",value:function(e){var t=e.id,n=e.name,o=e.sku,i=e.category,r=e.price,a=void 0===r?0:r,c=e.quantity,u=void 0===c?1:c;ga("ecommerce:addItem",{id:t,name:n,sku:o,category:i,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}}(),i=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=i},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 i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(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 i(this,t),r(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,i,r,a=n.location,c=a.hash;o=function(e,t){return(i=e.match(RegExp(t+"=([^&]*)")))?i[1]:null},c&&o(c,"state")&&(r=JSON.parse(decodeURIComponent(o(c,"state"))),"mpeditor"===r.action&&(n.sessionStorage.setItem("_mpcehash",c),history.replaceState(r.desiredHash||"",e.title,a.pathname+a.search)))}catch(e){}var u,l;window.mixpanel=t,t._i=[],t.init=function(e,n,o){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 r=t;for("undefined"!=typeof o?r=t[o]=[]:o="mixpanel",r.people=r.people||[],r.toString=function(e){var t="mixpanel";return"mixpanel"!==o&&(t+="."+o),e||(t+=" (stub)"),t},r.people.toString=function(){return r.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++)i(r,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,i=e.callback,r=void 0===i?null:i;this.config.debug&&f.logDebug.apply(void 0,arguments);var a=Object.assign({},o);mixpanel.track(t,a,r)}},{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 i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(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(){i(this,t);var e=r(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 i=Object.assign(o,this.superProperties);analytics.track(t,i)}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 i(e){if(null==e)throw new TypeError("Cannot destructure undefined")}function r(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 r(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,i,r,a){e.fbq||(i=e.fbq=function(){i.callMethod?i.callMethod.apply(i,arguments):i.queue.push(arguments)},e._fbq||(e._fbq=i),i.push=i,i.loaded=!0,i.version="2.0",i.queue=[],r=t.createElement(n),r.setAttribute("defer",""),r.src=o,a=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(r,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){i(e),fbq("track","PageView")}},{key:"trackEvent",value:function(e){var t=e.fb_event,n=void 0===t?"ViewContent":t,o=e.category,i=void 0===o?"Event":o,r=(e.action,e.label),a=void 0===r?null:r,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:i,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 i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(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(){i(this,t);var e=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,u.MODULE_MPARTICLE));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]:{},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,i=e.customFlags,r=void 0===i?{}:i;try{Object.assign(this.superProperties,o);mParticle.logPageView(t,o,r)}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,i=(e.label,e.value,e.properties),r=void 0===i?{}:i;e.callback;try{this.config.debug&&f.logDebug.apply(void 0,arguments);var a=Object.assign(this.superProperties,r);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,i=void 0===o?{}:o,r=e.properties,a=void 0===r?{}:r;try{this.config.debug&&f.logDebug.apply(void 0,arguments);var c=mParticle.eCommerce.createProduct(i.name,i.sku||performance.now(),i.price,i.quantity),u=Object.assign(this.superProperties,a);mParticle.eCommerce.logProductAction(n,c,u)}catch(e){if(!(e instanceof ReferenceError))throw e}}},{key:"setUserProperties",value:function(e){try{this.config.debug&&f.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}(s.default);t.default=d}]);
{
"name": "vue-multianalytics",
"version": "1.6.5",
"version": "1.6.6",
"description": "A vue multianalytics tool",

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

@@ -19,4 +19,8 @@ import { MODULE_MPARTICLE } from '../analyticsTypes'

})
this.config.debug = initConf.debug
this.config.sandbox = initConf.sandbox;
window.mParticle = {
config: {
isDebug: initConf.debug,
isSandbox: initConf.sandbox
}
};
// name of gloval variable changed from analytics to segment

@@ -48,4 +52,2 @@ (function (apiKey) {

try {
mParticle.isSandbox = this.config.sandbox
mParticle.isDebug = this.config.debug
let fullProperties = Object.assign(this.superProperties, properties)

@@ -76,4 +78,2 @@ mParticle.logPageView(viewName, properties, customFlags)

let fullProperties = Object.assign(this.superProperties, properties)
mParticle.isSandbox = this.config.sandbox
mParticle.isDebug = this.config.debug
mParticle.logEvent(action, eventType, fullProperties)

@@ -102,4 +102,2 @@ } catch (e) {

let mProduct = mParticle.eCommerce.createProduct(product.name, product.sku || performance.now(), product.price, product.quantity);
mParticle.isSandbox = this.config.sandbox
mParticle.isDebug = this.config.debug
let fullProperties = Object.assign(this.superProperties, properties)

@@ -125,4 +123,2 @@ mParticle.eCommerce.logProductAction(productActionType, mProduct, fullProperties)

}
mParticle.isSandbox = this.config.sandbox
mParticle.isDebug = this.config.debug
if (properties.userId) {

@@ -129,0 +125,0 @@ mParticle.setUserIdentity(properties.userId, properties.identityType || mParticle.IdentityType.CustomerId)

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