@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
|
|
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
|
+
"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": "
|
|
10
|
+
"@cronapp/framework-analytics": "4.0.1"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@types/angular": "1.8.1",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var
|
|
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})})();
|