@cronapp/framework-analytics-matomo 3.2.1 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (()=>{var e=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t={};(()=>{"use strict";e(t);var r=cronapp.configuration.IConfigurationService,i=cronapp.ioc.component,o=cronapp.ioc.qualifier,n=cronapp.ioc.bindSingleton,a=cronapp.analytics.IAnalyticsPluginFactory;class c{constructor(e,t){this.matomoUrl=e,this.siteId=t}get name(){return"matomo"}get tracker(){return null==this._tracker&&(this._tracker=Matomo.getTracker(`${this.matomoUrl}/matomo.php`,this.siteId)),this._tracker}page({payload:e}){this.tracker.deleteCustomVariables("page"),this.tracker.setCustomUrl(e.properties.path+e.properties.hash),this.tracker.trackPageView(e.properties.title)}identify({payload:e}){this.tracker.setUserId(e.userId)}track({payload:e}){if(e.properties){const t=e.properties,{category:r,value:i,action:o}=t,n=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r}(t,["category","value","action"]);this.tracker.trackEvent(r,o,e.event,i,n,void 0)}else this.tracker.trackEvent(e.event,e.event,void 0,void 0,void 0,void 0)}}let s=class{constructor(e){this.configurationService=e,this._initializationPromise=new Promise((e=>this._initializationComplete=e))}createAnalyticsPlugin(){return e=this,t=void 0,i=function*(){const e=((yield this.configurationService.getValue("cronapp.framework.matomo.url"))||"").replace(/\/$/,""),t=yield this.configurationService.getValue("cronapp.framework.matomo.siteId"),r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src=`${e}/matomo.js`;const i=document.getElementsByTagName("script")[0];return i.parentNode.insertBefore(r,i),this.initialize(),yield this._initializationPromise,new c(e,t)},new((r=void 0)||(r=Promise))((function(o,n){function a(e){try{s(i.next(e))}catch(e){n(e)}}function c(e){try{s(i.throw(e))}catch(e){n(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,c)}s((i=i.apply(e,t||[])).next())}));var e,t,r,i}initialize(){"undefined"==typeof Matomo?setTimeout((()=>this.initialize()),100):this._initializationComplete()}};var l,p;s=function(e,t,r,i){var o,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(n<3?o(a):n>3?o(t,r,a):o(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a}([i(),(l=0,p=o(r),function(e,t){p(e,t,l)}),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Object])],s),n(a,s)})();var r=cronapp="undefined"==typeof cronapp?{}:cronapp;for(var i in t)r[i]=t[i];t.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
1
+ (()=>{var t={};(()=>{"use strict";var t=cronapp.configuration.IConfigurationService,e=cronapp.ioc.component,i=cronapp.ioc.qualifier,r=cronapp.ioc.bindSingleton,o=cronapp.analytics.IAnalyticsPluginFactory;class n{get name(){return"matomo"}get tracker(){return null==this._tracker&&(this._tracker=Matomo.getTracker(`${this.matomoUrl}/matomo.php`,this.siteId)),this._tracker}constructor(t,e){this.matomoUrl=t,this.siteId=e}page({payload:t}){this.tracker.deleteCustomVariables("page"),this.tracker.setCustomUrl(t.properties.path+t.properties.hash),this.tracker.trackPageView(t.properties.title)}identify({payload:t}){this.tracker.setUserId(t.userId)}track({payload:t}){if(t.properties){const e=t.properties,{category:i,value:r,action:o}=e,n=function(t,e){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(i[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(i[r[o]]=t[r[o]])}return i}(e,["category","value","action"]);this.tracker.trackEvent(i,o,t.event,r,n,void 0)}else this.tracker.trackEvent(t.event,t.event,void 0,void 0,void 0,void 0)}}let a=class{constructor(t){this.configurationService=t,this._initializationPromise=new Promise((t=>this._initializationComplete=t))}createAnalyticsPlugin(){return t=this,e=void 0,r=function*(){const t=((yield this.configurationService.getValue("cronapp.framework.matomo.url"))||"").replace(/\/$/,""),e=yield this.configurationService.getValue("cronapp.framework.matomo.siteId"),i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=`${t}/matomo.js`;const r=document.getElementsByTagName("script")[0];return r.parentNode.insertBefore(i,r),this.initialize(),yield this._initializationPromise,new n(t,e)},new((i=void 0)||(i=Promise))((function(o,n){function a(t){try{s(r.next(t))}catch(t){n(t)}}function c(t){try{s(r.throw(t))}catch(t){n(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}));var t,e,i,r}initialize(){"undefined"==typeof Matomo?setTimeout((()=>this.initialize()),100):this._initializationComplete()}};var c,s;a=function(t,e,i,r){var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,r);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a}([e(),(c=0,s=i(t),function(t,e){s(t,e,c)}),function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}("design:paramtypes",[Object])],a),r(o,a)})();var e=cronapp="undefined"==typeof cronapp?{}:cronapp;for(var i in t)e[i]=t[i];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})})();
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@cronapp/framework-analytics-matomo",
3
- "version": "3.2.1",
3
+ "version": "4.0.1",
4
4
  "scripts": {
5
5
  "build": "npx webpack --progress --config webpack.config.js",
6
6
  "watch": "npx webpack -d eval-source-map --progress --watch --config webpack.config.js",
7
7
  "prepack": "npm run build -p && cp target/browser/* ."
8
8
  },
9
9
  "dependencies": {
10
- "@cronapp/framework-analytics": "3.2.1"
10
+ "@cronapp/framework-analytics": "4.0.1"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@types/angular": "1.8.1",
@@ -1 +1 @@
1
- (()=>{var e=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t={};(()=>{"use strict";e(t);var r=cronapp.configuration.IConfigurationService,i=cronapp.ioc.component,o=cronapp.ioc.qualifier,n=cronapp.ioc.bindSingleton,a=cronapp.analytics.IAnalyticsPluginFactory;class c{constructor(e,t){this.matomoUrl=e,this.siteId=t}get name(){return"matomo"}get tracker(){return null==this._tracker&&(this._tracker=Matomo.getTracker(`${this.matomoUrl}/matomo.php`,this.siteId)),this._tracker}page({payload:e}){this.tracker.deleteCustomVariables("page"),this.tracker.setCustomUrl(e.properties.path+e.properties.hash),this.tracker.trackPageView(e.properties.title)}identify({payload:e}){this.tracker.setUserId(e.userId)}track({payload:e}){if(e.properties){const t=e.properties,{category:r,value:i,action:o}=t,n=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r}(t,["category","value","action"]);this.tracker.trackEvent(r,o,e.event,i,n,void 0)}else this.tracker.trackEvent(e.event,e.event,void 0,void 0,void 0,void 0)}}let s=class{constructor(e){this.configurationService=e,this._initializationPromise=new Promise((e=>this._initializationComplete=e))}createAnalyticsPlugin(){return e=this,t=void 0,i=function*(){const e=((yield this.configurationService.getValue("cronapp.framework.matomo.url"))||"").replace(/\/$/,""),t=yield this.configurationService.getValue("cronapp.framework.matomo.siteId"),r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src=`${e}/matomo.js`;const i=document.getElementsByTagName("script")[0];return i.parentNode.insertBefore(r,i),this.initialize(),yield this._initializationPromise,new c(e,t)},new((r=void 0)||(r=Promise))((function(o,n){function a(e){try{s(i.next(e))}catch(e){n(e)}}function c(e){try{s(i.throw(e))}catch(e){n(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,c)}s((i=i.apply(e,t||[])).next())}));var e,t,r,i}initialize(){"undefined"==typeof Matomo?setTimeout((()=>this.initialize()),100):this._initializationComplete()}};var l,p;s=function(e,t,r,i){var o,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(n<3?o(a):n>3?o(t,r,a):o(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a}([i(),(l=0,p=o(r),function(e,t){p(e,t,l)}),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Object])],s),n(a,s)})();var r=cronapp="undefined"==typeof cronapp?{}:cronapp;for(var i in t)r[i]=t[i];t.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
1
+ (()=>{var t={};(()=>{"use strict";var t=cronapp.configuration.IConfigurationService,e=cronapp.ioc.component,i=cronapp.ioc.qualifier,r=cronapp.ioc.bindSingleton,o=cronapp.analytics.IAnalyticsPluginFactory;class n{get name(){return"matomo"}get tracker(){return null==this._tracker&&(this._tracker=Matomo.getTracker(`${this.matomoUrl}/matomo.php`,this.siteId)),this._tracker}constructor(t,e){this.matomoUrl=t,this.siteId=e}page({payload:t}){this.tracker.deleteCustomVariables("page"),this.tracker.setCustomUrl(t.properties.path+t.properties.hash),this.tracker.trackPageView(t.properties.title)}identify({payload:t}){this.tracker.setUserId(t.userId)}track({payload:t}){if(t.properties){const e=t.properties,{category:i,value:r,action:o}=e,n=function(t,e){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(i[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(i[r[o]]=t[r[o]])}return i}(e,["category","value","action"]);this.tracker.trackEvent(i,o,t.event,r,n,void 0)}else this.tracker.trackEvent(t.event,t.event,void 0,void 0,void 0,void 0)}}let a=class{constructor(t){this.configurationService=t,this._initializationPromise=new Promise((t=>this._initializationComplete=t))}createAnalyticsPlugin(){return t=this,e=void 0,r=function*(){const t=((yield this.configurationService.getValue("cronapp.framework.matomo.url"))||"").replace(/\/$/,""),e=yield this.configurationService.getValue("cronapp.framework.matomo.siteId"),i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=`${t}/matomo.js`;const r=document.getElementsByTagName("script")[0];return r.parentNode.insertBefore(i,r),this.initialize(),yield this._initializationPromise,new n(t,e)},new((i=void 0)||(i=Promise))((function(o,n){function a(t){try{s(r.next(t))}catch(t){n(t)}}function c(t){try{s(r.throw(t))}catch(t){n(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}));var t,e,i,r}initialize(){"undefined"==typeof Matomo?setTimeout((()=>this.initialize()),100):this._initializationComplete()}};var c,s;a=function(t,e,i,r){var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,r);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a}([e(),(c=0,s=i(t),function(t,e){s(t,e,c)}),function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}("design:paramtypes",[Object])],a),r(o,a)})();var e=cronapp="undefined"==typeof cronapp?{}:cronapp;for(var i in t)e[i]=t[i];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})})();