@backstage-community/plugin-analytics-module-ga4 0.9.0 → 0.11.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 +28 -0
- package/README.md +15 -0
- package/dist/alpha.d.ts +8 -0
- package/dist/alpha.esm.js +2 -0
- package/dist/alpha.esm.js.map +1 -0
- package/dist/module.esm.js +17 -0
- package/dist/module.esm.js.map +1 -0
- package/package.json +38 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @backstage-community/plugin-analytics-module-ga4
|
|
2
2
|
|
|
3
|
+
## 0.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2258b1a: Backstage version bump to v1.43.2
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 409370a: 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 ga4Module from '@backstage-community/plugin-analytics-module-ga4/alpha';
|
|
17
|
+
|
|
18
|
+
const app = createApp({
|
|
19
|
+
features: [ga4Module],
|
|
20
|
+
});
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
This can be skipped if you have feature discovery enabled.
|
|
24
|
+
|
|
25
|
+
## 0.10.0
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- 3d6351f: Backstage version bump to v1.42.4
|
|
30
|
+
|
|
3
31
|
## 0.9.0
|
|
4
32
|
|
|
5
33
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -17,6 +17,21 @@ yarn --cwd packages/app add @backstage-community/plugin-analytics-module-ga4
|
|
|
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 ga4Module from '@backstage-community/plugin-analytics-module-ga4/alpha';
|
|
25
|
+
|
|
26
|
+
const app = createApp({
|
|
27
|
+
features: [ga4Module],
|
|
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 {
|
package/dist/alpha.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alpha.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AnalyticsImplementationBlueprint, configApiRef, identityApiRef, createFrontendModule } from '@backstage/frontend-plugin-api';
|
|
2
|
+
import { GoogleAnalytics4 } from './apis/implementations/AnalyticsApi/GoogleAnalytics4.esm.js';
|
|
3
|
+
|
|
4
|
+
const ga4Implementation = AnalyticsImplementationBlueprint.make({
|
|
5
|
+
name: "ga4",
|
|
6
|
+
params: (defineParams) => defineParams({
|
|
7
|
+
deps: { configApi: configApiRef, identityApi: identityApiRef },
|
|
8
|
+
factory: ({ configApi, identityApi }) => GoogleAnalytics4.fromConfig(configApi, { identityApi })
|
|
9
|
+
})
|
|
10
|
+
});
|
|
11
|
+
const ga4Module = createFrontendModule({
|
|
12
|
+
pluginId: "app",
|
|
13
|
+
extensions: [ga4Implementation]
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export { ga4Module };
|
|
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 identityApiRef,\n createFrontendModule,\n} from '@backstage/frontend-plugin-api';\nimport { GoogleAnalytics4 } from './apis/implementations/AnalyticsApi';\n\nconst ga4Implementation = AnalyticsImplementationBlueprint.make({\n name: 'ga4',\n params: defineParams =>\n defineParams({\n deps: { configApi: configApiRef, identityApi: identityApiRef },\n factory: ({ configApi, identityApi }) =>\n GoogleAnalytics4.fromConfig(configApi, { identityApi }),\n }),\n});\n\n/**\n * @public\n */\nexport const ga4Module = createFrontendModule({\n pluginId: 'app',\n extensions: [ga4Implementation],\n});\n"],"names":[],"mappings":";;;AAuBA,MAAM,iBAAA,GAAoB,iCAAiC,IAAK,CAAA;AAAA,EAC9D,IAAM,EAAA,KAAA;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,gBAAA,CAAiB,UAAW,CAAA,SAAA,EAAW,EAAE,WAAA,EAAa;AAAA,GACzD;AACL,CAAC,CAAA;AAKM,MAAM,YAAY,oBAAqB,CAAA;AAAA,EAC5C,QAAU,EAAA,KAAA;AAAA,EACV,UAAA,EAAY,CAAC,iBAAiB;AAChC,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,15 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage-community/plugin-analytics-module-ga4",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"backstage": {
|
|
5
5
|
"role": "frontend-plugin-module",
|
|
6
6
|
"pluginId": "app",
|
|
7
|
-
"pluginPackage": "@backstage/plugin-app-backend"
|
|
7
|
+
"pluginPackage": "@backstage/plugin-app-backend",
|
|
8
|
+
"features": {
|
|
9
|
+
"./alpha": "@backstage/FrontendModule"
|
|
10
|
+
}
|
|
8
11
|
},
|
|
9
12
|
"publishConfig": {
|
|
10
|
-
"access": "public"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"import": "./dist/index.esm.js",
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"default": "./dist/index.esm.js"
|
|
20
|
+
},
|
|
21
|
+
"./alpha": {
|
|
22
|
+
"backstage": "@backstage/FrontendModule",
|
|
23
|
+
"import": "./dist/alpha.esm.js",
|
|
24
|
+
"types": "./dist/alpha.d.ts",
|
|
25
|
+
"default": "./dist/alpha.esm.js"
|
|
26
|
+
},
|
|
27
|
+
"./package.json": "./package.json"
|
|
28
|
+
},
|
|
29
|
+
"typesVersions": {
|
|
30
|
+
"*": {
|
|
31
|
+
"alpha": [
|
|
32
|
+
"dist/alpha.d.ts"
|
|
33
|
+
],
|
|
34
|
+
"package.json": [
|
|
35
|
+
"package.json"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
13
38
|
},
|
|
14
39
|
"homepage": "https://backstage.io",
|
|
15
40
|
"repository": {
|
|
@@ -19,8 +44,8 @@
|
|
|
19
44
|
},
|
|
20
45
|
"license": "Apache-2.0",
|
|
21
46
|
"sideEffects": false,
|
|
22
|
-
"main": "dist/index.esm.js",
|
|
23
|
-
"types": "dist/index.d.ts",
|
|
47
|
+
"main": "./dist/index.esm.js",
|
|
48
|
+
"types": "./dist/index.d.ts",
|
|
24
49
|
"files": [
|
|
25
50
|
"dist",
|
|
26
51
|
"config.d.ts"
|
|
@@ -35,15 +60,15 @@
|
|
|
35
60
|
"test": "backstage-cli package test"
|
|
36
61
|
},
|
|
37
62
|
"dependencies": {
|
|
38
|
-
"@backstage/config": "^1.3.
|
|
39
|
-
"@backstage/core-components": "^0.
|
|
40
|
-
"@backstage/core-plugin-api": "^1.
|
|
41
|
-
"@backstage/frontend-plugin-api": "^0.
|
|
63
|
+
"@backstage/config": "^1.3.3",
|
|
64
|
+
"@backstage/core-components": "^0.18.1",
|
|
65
|
+
"@backstage/core-plugin-api": "^1.11.0",
|
|
66
|
+
"@backstage/frontend-plugin-api": "^0.12.0",
|
|
42
67
|
"react-ga4": "^2.0.0"
|
|
43
68
|
},
|
|
44
69
|
"devDependencies": {
|
|
45
|
-
"@backstage/cli": "^0.
|
|
46
|
-
"@backstage/dev-utils": "^1.1.
|
|
70
|
+
"@backstage/cli": "^0.34.3",
|
|
71
|
+
"@backstage/dev-utils": "^1.1.14",
|
|
47
72
|
"@testing-library/dom": "^10.0.0",
|
|
48
73
|
"@testing-library/jest-dom": "^6.0.0",
|
|
49
74
|
"@testing-library/react": "^15.0.0",
|
|
@@ -60,12 +85,5 @@
|
|
|
60
85
|
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
61
86
|
},
|
|
62
87
|
"configSchema": "config.d.ts",
|
|
63
|
-
"typesVersions": {
|
|
64
|
-
"*": {
|
|
65
|
-
"package.json": [
|
|
66
|
-
"package.json"
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
88
|
"module": "./dist/index.esm.js"
|
|
71
89
|
}
|