@backstage-community/plugin-analytics-module-matomo 1.18.1 → 1.19.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  ### Dependencies
2
2
 
3
+ ## 1.19.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 2258b1a: Backstage version bump to v1.43.2
8
+
9
+ ### Patch Changes
10
+
11
+ - eac91f6: Added support for Backstage's New Frontend System.
12
+
13
+ If you're migrating to the new frontend system, you no longer need to wire up an API implementation in `apis.ts`. Instead, pass the module in to the `createApp()` function:
14
+
15
+ ```tsx
16
+ import matomoModule from '@backstage-community/plugin-analytics-module-matomo/alpha';
17
+
18
+ const app = createApp({
19
+ features: [matomoModule],
20
+ });
21
+ ```
22
+
23
+ This can be skipped if you have feature discovery enabled.
24
+
3
25
  ## 1.18.1
4
26
 
5
27
  ### Patch Changes
package/README.md CHANGED
@@ -17,6 +17,21 @@ yarn workspace app add @backstage-community/plugin-analytics-module-matomo
17
17
 
18
18
  2. Wire up the API implementation to your App:
19
19
 
20
+ If your App is built using the New Frontend System, it's enough to supply this
21
+ module to `createApp()`:
22
+
23
+ ```tsx
24
+ import matomoModule from '@backstage-community/plugin-analytics-module-matomo/alpha';
25
+
26
+ const app = createApp({
27
+ features: [matomoModule],
28
+ });
29
+ ```
30
+
31
+ This can be skipped entirely if you have feature discovery enabled.
32
+
33
+ For all other Backstage apps, wire up the API implementation like this:
34
+
20
35
  ```tsx
21
36
  // packages/app/src/apis.ts
22
37
  import {
@@ -0,0 +1,8 @@
1
+ import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
2
+
3
+ /**
4
+ * @public
5
+ */
6
+ declare const matomoModule: _backstage_frontend_plugin_api.FrontendModule;
7
+
8
+ export { matomoModule as default };
@@ -0,0 +1,2 @@
1
+ export { matomoModule as default } from './module.esm.js';
2
+ //# sourceMappingURL=alpha.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alpha.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -35,7 +35,7 @@ class MatomoAnalytics {
35
35
  const { context, action, subject, value } = event;
36
36
  window._paq.push([
37
37
  "trackEvent",
38
- context.extension || "App",
38
+ context.extensionId || context.extension || "App",
39
39
  action,
40
40
  subject,
41
41
  value
@@ -1 +1 @@
1
- {"version":3,"file":"Matomo.esm.js","sources":["../../src/api/Matomo.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n AnalyticsApi,\n AnalyticsEvent,\n ConfigApi,\n IdentityApi,\n} from '@backstage/core-plugin-api';\n\nimport { loadMatomo } from './loadMatomo';\n\ndeclare const window: Window &\n typeof globalThis & {\n _paq: any[];\n };\n\n/**\n * @public\n */\nexport class MatomoAnalytics implements AnalyticsApi {\n private constructor(options: {\n matomoUrl: string;\n siteId: number;\n identity: string;\n identityApi?: IdentityApi;\n sendPlainUserId?: boolean;\n }) {\n loadMatomo(options.matomoUrl, options.siteId);\n\n /* Add user tracking if identity is enabled and identityApi is provided */\n if (options.identity !== 'disabled' && options.identityApi) {\n this.setUserFrom(options.identityApi, options.sendPlainUserId).catch(\n () => {\n return;\n },\n );\n }\n }\n\n static fromConfig(\n config: ConfigApi,\n options?: {\n identityApi?: IdentityApi;\n },\n ) {\n const identity =\n config.getOptionalString('app.analytics.matomo.identity') || 'disabled';\n\n const sendPlainUserId = config.getOptionalBoolean(\n 'app.analytics.matomo.sendPlainUserId',\n );\n\n const matomoUrl = config.getString('app.analytics.matomo.host');\n const siteId = config.getNumber('app.analytics.matomo.siteId');\n\n if (identity === 'required' && !options?.identityApi) {\n throw new Error(\n 'Invalid config: identity API must be provided to deps when app.matomo.identity is required',\n );\n }\n\n return new MatomoAnalytics({\n matomoUrl,\n siteId,\n identity,\n identityApi: options?.identityApi,\n sendPlainUserId,\n });\n }\n\n captureEvent(event: AnalyticsEvent) {\n const { context, action, subject, value } = event;\n // REF: https://github.com/backstage/community-plugins/blob/main/workspaces/analytics/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.ts#L160\n // REF: https://matomo.org/faq/reports/implement-event-tracking-with-matomo/\n window._paq.push([\n 'trackEvent',\n context.extension || 'App',\n action,\n subject,\n value,\n ]);\n }\n\n private async setUserFrom(\n identityApi: IdentityApi,\n sendPlainUserId?: boolean,\n ) {\n const { userEntityRef } = await identityApi.getBackstageIdentity();\n\n if (sendPlainUserId) {\n window._paq.push(['setUserId', userEntityRef]);\n } else {\n // Prevent PII from being passed to Matomo\n const userId = await this.getPrivateUserId(userEntityRef);\n\n window._paq.push(['setUserId', userId]);\n }\n }\n\n private getPrivateUserId(userEntityRef: string): Promise<string> {\n return this.hash(userEntityRef);\n }\n\n private async hash(value: string): Promise<string> {\n const digest = await window.crypto.subtle.digest(\n 'sha-256',\n new TextEncoder().encode(value),\n );\n const hashArray = Array.from(new Uint8Array(digest));\n return hashArray.map(b => b.toString(16).padStart(2, '0')).join('');\n }\n}\n"],"names":[],"mappings":";;AAgCO,MAAM,eAAwC,CAAA;AAAA,EAC3C,YAAY,OAMjB,EAAA;AACD,IAAW,UAAA,CAAA,OAAA,CAAQ,SAAW,EAAA,OAAA,CAAQ,MAAM,CAAA;AAG5C,IAAA,IAAI,OAAQ,CAAA,QAAA,KAAa,UAAc,IAAA,OAAA,CAAQ,WAAa,EAAA;AAC1D,MAAA,IAAA,CAAK,WAAY,CAAA,OAAA,CAAQ,WAAa,EAAA,OAAA,CAAQ,eAAe,CAAE,CAAA,KAAA;AAAA,QAC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GAAA,MAAM,IAAK,CAAA,gBAAA,CAAiB,aAAa,CAAA;AAExD,MAAA,MAAA,CAAO,IAAK,CAAA,IAAA,CAAK,CAAC,WAAA,EAAa,MAAM,CAAC,CAAA;AAAA;AACxC;AACF,EAEQ,iBAAiB,aAAwC,EAAA;AAC/D,IAAO,OAAA,IAAA,CAAK,KAAK,aAAa,CAAA;AAAA;AAChC,EAEA,MAAc,KAAK,KAAgC,EAAA;AACjD,IAAA,MAAM,MAAS,GAAA,MAAM,MAAO,CAAA,MAAA,CAAO,MAAO,CAAA,MAAA;AAAA,MACxC,SAAA;AAAA,MACA,IAAI,WAAA,EAAc,CAAA,MAAA,CAAO,KAAK;AAAA,KAChC;AACA,IAAA,MAAM,YAAY,KAAM,CAAA,IAAA,CAAK,IAAI,UAAA,CAAW,MAAM,CAAC,CAAA;AACnD,IAAA,OAAO,SAAU,CAAA,GAAA,CAAI,CAAK,CAAA,KAAA,CAAA,CAAE,QAAS,CAAA,EAAE,CAAE,CAAA,QAAA,CAAS,CAAG,EAAA,GAAG,CAAC,CAAA,CAAE,KAAK,EAAE,CAAA;AAAA;AAEtE;;;;"}
1
+ {"version":3,"file":"Matomo.esm.js","sources":["../../src/api/Matomo.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n AnalyticsApi,\n AnalyticsEvent as LegacyAnalyticsEvent,\n ConfigApi,\n IdentityApi,\n} from '@backstage/core-plugin-api';\nimport {\n AnalyticsImplementation,\n AnalyticsEvent,\n} from '@backstage/frontend-plugin-api';\n\nimport { loadMatomo } from './loadMatomo';\n\ndeclare const window: Window &\n typeof globalThis & {\n _paq: any[];\n };\n\n/**\n * @public\n */\nexport class MatomoAnalytics implements AnalyticsApi, AnalyticsImplementation {\n private constructor(options: {\n matomoUrl: string;\n siteId: number;\n identity: string;\n identityApi?: IdentityApi;\n sendPlainUserId?: boolean;\n }) {\n loadMatomo(options.matomoUrl, options.siteId);\n\n /* Add user tracking if identity is enabled and identityApi is provided */\n if (options.identity !== 'disabled' && options.identityApi) {\n this.setUserFrom(options.identityApi, options.sendPlainUserId).catch(\n () => {\n return;\n },\n );\n }\n }\n\n static fromConfig(\n config: ConfigApi,\n options?: {\n identityApi?: IdentityApi;\n },\n ) {\n const identity =\n config.getOptionalString('app.analytics.matomo.identity') || 'disabled';\n\n const sendPlainUserId = config.getOptionalBoolean(\n 'app.analytics.matomo.sendPlainUserId',\n );\n\n const matomoUrl = config.getString('app.analytics.matomo.host');\n const siteId = config.getNumber('app.analytics.matomo.siteId');\n\n if (identity === 'required' && !options?.identityApi) {\n throw new Error(\n 'Invalid config: identity API must be provided to deps when app.matomo.identity is required',\n );\n }\n\n return new MatomoAnalytics({\n matomoUrl,\n siteId,\n identity,\n identityApi: options?.identityApi,\n sendPlainUserId,\n });\n }\n\n captureEvent(event: AnalyticsEvent | LegacyAnalyticsEvent) {\n const { context, action, subject, value } = event;\n // REF: https://github.com/backstage/community-plugins/blob/main/workspaces/analytics/plugins/analytics-module-ga/src/apis/implementations/AnalyticsApi/GoogleAnalytics.ts#L160\n // REF: https://matomo.org/faq/reports/implement-event-tracking-with-matomo/\n window._paq.push([\n 'trackEvent',\n context.extensionId || context.extension || 'App',\n action,\n subject,\n value,\n ]);\n }\n\n private async setUserFrom(\n identityApi: IdentityApi,\n sendPlainUserId?: boolean,\n ) {\n const { userEntityRef } = await identityApi.getBackstageIdentity();\n\n if (sendPlainUserId) {\n window._paq.push(['setUserId', userEntityRef]);\n } else {\n // Prevent PII from being passed to Matomo\n const userId = await this.getPrivateUserId(userEntityRef);\n\n window._paq.push(['setUserId', userId]);\n }\n }\n\n private getPrivateUserId(userEntityRef: string): Promise<string> {\n return this.hash(userEntityRef);\n }\n\n private async hash(value: string): Promise<string> {\n const digest = await window.crypto.subtle.digest(\n 'sha-256',\n new TextEncoder().encode(value),\n );\n const hashArray = Array.from(new Uint8Array(digest));\n return hashArray.map(b => b.toString(16).padStart(2, '0')).join('');\n }\n}\n"],"names":[],"mappings":";;AAoCO,MAAM,eAAiE,CAAA;AAAA,EACpE,YAAY,OAMjB,EAAA;AACD,IAAW,UAAA,CAAA,OAAA,CAAQ,SAAW,EAAA,OAAA,CAAQ,MAAM,CAAA;AAG5C,IAAA,IAAI,OAAQ,CAAA,QAAA,KAAa,UAAc,IAAA,OAAA,CAAQ,WAAa,EAAA;AAC1D,MAAA,IAAA,CAAK,WAAY,CAAA,OAAA,CAAQ,WAAa,EAAA,OAAA,CAAQ,eAAe,CAAE,CAAA,KAAA;AAAA,QAC7D,MAAM;AACJ,UAAA;AAAA;AACF,OACF;AAAA;AACF;AACF,EAEA,OAAO,UACL,CAAA,MAAA,EACA,OAGA,EAAA;AACA,IAAA,MAAM,QACJ,GAAA,MAAA,CAAO,iBAAkB,CAAA,+BAA+B,CAAK,IAAA,UAAA;AAE/D,IAAA,MAAM,kBAAkB,MAAO,CAAA,kBAAA;AAAA,MAC7B;AAAA,KACF;AAEA,IAAM,MAAA,SAAA,GAAY,MAAO,CAAA,SAAA,CAAU,2BAA2B,CAAA;AAC9D,IAAM,MAAA,MAAA,GAAS,MAAO,CAAA,SAAA,CAAU,6BAA6B,CAAA;AAE7D,IAAA,IAAI,QAAa,KAAA,UAAA,IAAc,CAAC,OAAA,EAAS,WAAa,EAAA;AACpD,MAAA,MAAM,IAAI,KAAA;AAAA,QACR;AAAA,OACF;AAAA;AAGF,IAAA,OAAO,IAAI,eAAgB,CAAA;AAAA,MACzB,SAAA;AAAA,MACA,MAAA;AAAA,MACA,QAAA;AAAA,MACA,aAAa,OAAS,EAAA,WAAA;AAAA,MAC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AAA,CAAS,CAAG,EAAA,GAAG,CAAC,CAAA,CAAE,KAAK,EAAE,CAAA;AAAA;AAEtE;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,16 +1,17 @@
1
1
  import * as _backstage_config from '@backstage/config';
2
2
  import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
3
- import { AnalyticsApi, ConfigApi, IdentityApi, AnalyticsEvent } from '@backstage/core-plugin-api';
3
+ import { AnalyticsApi, ConfigApi, IdentityApi, AnalyticsEvent as AnalyticsEvent$1 } from '@backstage/core-plugin-api';
4
+ import { AnalyticsImplementation, AnalyticsEvent } from '@backstage/frontend-plugin-api';
4
5
 
5
6
  /**
6
7
  * @public
7
8
  */
8
- declare class MatomoAnalytics implements AnalyticsApi {
9
+ declare class MatomoAnalytics implements AnalyticsApi, AnalyticsImplementation {
9
10
  private constructor();
10
11
  static fromConfig(config: ConfigApi, options?: {
11
12
  identityApi?: IdentityApi;
12
13
  }): MatomoAnalytics;
13
- captureEvent(event: AnalyticsEvent): void;
14
+ captureEvent(event: AnalyticsEvent | AnalyticsEvent$1): void;
14
15
  private setUserFrom;
15
16
  private getPrivateUserId;
16
17
  private hash;
@@ -0,0 +1,17 @@
1
+ import { AnalyticsImplementationBlueprint, configApiRef, identityApiRef, createFrontendModule } from '@backstage/frontend-plugin-api';
2
+ import { MatomoAnalytics } from './api/Matomo.esm.js';
3
+
4
+ const matomoImplementation = AnalyticsImplementationBlueprint.make({
5
+ name: "matomo",
6
+ params: (defineParams) => defineParams({
7
+ deps: { configApi: configApiRef, identityApi: identityApiRef },
8
+ factory: ({ configApi, identityApi }) => MatomoAnalytics.fromConfig(configApi, { identityApi })
9
+ })
10
+ });
11
+ const matomoModule = createFrontendModule({
12
+ pluginId: "app",
13
+ extensions: [matomoImplementation]
14
+ });
15
+
16
+ export { matomoModule };
17
+ //# sourceMappingURL=module.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.esm.js","sources":["../src/module.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n AnalyticsImplementationBlueprint,\n configApiRef,\n createFrontendModule,\n identityApiRef,\n} from '@backstage/frontend-plugin-api';\nimport { MatomoAnalytics } from './api';\n\nconst matomoImplementation = AnalyticsImplementationBlueprint.make({\n name: 'matomo',\n params: defineParams =>\n defineParams({\n deps: { configApi: configApiRef, identityApi: identityApiRef },\n factory: ({ configApi, identityApi }) =>\n MatomoAnalytics.fromConfig(configApi, { identityApi }),\n }),\n});\n\n/**\n * @public\n */\nexport const matomoModule = createFrontendModule({\n pluginId: 'app',\n extensions: [matomoImplementation],\n});\n"],"names":[],"mappings":";;;AAuBA,MAAM,oBAAA,GAAuB,iCAAiC,IAAK,CAAA;AAAA,EACjE,IAAM,EAAA,QAAA;AAAA,EACN,MAAA,EAAQ,kBACN,YAAa,CAAA;AAAA,IACX,IAAM,EAAA,EAAE,SAAW,EAAA,YAAA,EAAc,aAAa,cAAe,EAAA;AAAA,IAC7D,OAAA,EAAS,CAAC,EAAE,SAAW,EAAA,WAAA,EACrB,KAAA,eAAA,CAAgB,UAAW,CAAA,SAAA,EAAW,EAAE,WAAA,EAAa;AAAA,GACxD;AACL,CAAC,CAAA;AAKM,MAAM,eAAe,oBAAqB,CAAA;AAAA,EAC/C,QAAU,EAAA,KAAA;AAAA,EACV,UAAA,EAAY,CAAC,oBAAoB;AACnC,CAAC;;;;"}
package/package.json CHANGED
@@ -1,18 +1,43 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-analytics-module-matomo",
3
- "version": "1.18.1",
4
- "main": "dist/index.esm.js",
5
- "types": "dist/index.d.ts",
3
+ "version": "1.19.0",
4
+ "main": "./dist/index.esm.js",
5
+ "types": "./dist/index.d.ts",
6
6
  "license": "Apache-2.0",
7
7
  "publishConfig": {
8
- "access": "public",
9
- "main": "dist/index.esm.js",
10
- "types": "dist/index.d.ts"
8
+ "access": "public"
9
+ },
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/index.esm.js",
13
+ "types": "./dist/index.d.ts",
14
+ "default": "./dist/index.esm.js"
15
+ },
16
+ "./alpha": {
17
+ "backstage": "@backstage/FrontendModule",
18
+ "import": "./dist/alpha.esm.js",
19
+ "types": "./dist/alpha.d.ts",
20
+ "default": "./dist/alpha.esm.js"
21
+ },
22
+ "./package.json": "./package.json"
23
+ },
24
+ "typesVersions": {
25
+ "*": {
26
+ "alpha": [
27
+ "dist/alpha.d.ts"
28
+ ],
29
+ "package.json": [
30
+ "package.json"
31
+ ]
32
+ }
11
33
  },
12
34
  "backstage": {
13
35
  "role": "frontend-plugin-module",
14
36
  "pluginId": "app",
15
- "pluginPackage": "@backstage/plugin-app-backend"
37
+ "pluginPackage": "@backstage/plugin-app-backend",
38
+ "features": {
39
+ "./alpha": "@backstage/FrontendModule"
40
+ }
16
41
  },
17
42
  "sideEffects": false,
18
43
  "scripts": {
@@ -34,16 +59,17 @@
34
59
  "directory": "workspaces/analytics/plugins/analytics-module-matomo"
35
60
  },
36
61
  "dependencies": {
37
- "@backstage/core-plugin-api": "^1.10.9"
62
+ "@backstage/core-plugin-api": "^1.11.0",
63
+ "@backstage/frontend-plugin-api": "^0.12.0"
38
64
  },
39
65
  "peerDependencies": {
40
66
  "react": "^16.13.1 || ^17.0.0 || ^18.0.0"
41
67
  },
42
68
  "devDependencies": {
43
- "@backstage/cli": "^0.34.1",
44
- "@backstage/core-app-api": "^1.18.0",
45
- "@backstage/core-components": "^0.17.5",
46
- "@backstage/dev-utils": "^1.1.13",
69
+ "@backstage/cli": "^0.34.3",
70
+ "@backstage/core-app-api": "^1.19.0",
71
+ "@backstage/core-components": "^0.18.1",
72
+ "@backstage/dev-utils": "^1.1.14",
47
73
  "@testing-library/jest-dom": "6.8.0",
48
74
  "@types/node": "22.15.29",
49
75
  "cross-fetch": "4.0.0",
@@ -61,12 +87,5 @@
61
87
  ],
62
88
  "author": "The Backstage Community",
63
89
  "bugs": "https://github.com/backstage/community-plugins/issues",
64
- "typesVersions": {
65
- "*": {
66
- "package.json": [
67
- "package.json"
68
- ]
69
- }
70
- },
71
90
  "module": "./dist/index.esm.js"
72
91
  }