@gooddata/sdk-ui-pluggable-application 11.43.0-alpha.1 → 11.43.0-alpha.2

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.
@@ -68,12 +68,13 @@ export declare function AppProviders({ ctx, packageName, resolveMessages: resolv
68
68
  export declare function createBackendForModule(auth: IAuthCredentials, options: ICreateBackendForModuleOptions): IAnalyticalBackend;
69
69
 
70
70
  /**
71
- * Wraps host telemetry callbacks so every `trackEvent` call also reports the module's runtime metadata.
71
+ * Wraps host telemetry callbacks so every `trackEvent` / `trackPageView` / `trackTiming` call also reports
72
+ * the module's runtime metadata.
72
73
  *
73
74
  * @remarks
74
- * The metadata is merged into the event `data` before the host's own `data` keys, so an explicit key in
75
- * the call site's `data` wins on collision (mirroring how the host merges its common properties).
76
- * `trackPageView` and `trackTiming` are passed through unchanged they carry no `data` slot today.
75
+ * The metadata is merged into the `data` argument before the call site's own keys, so an explicit key in
76
+ * `data` wins on collision (mirroring how the host merges its common properties). This applies to all three
77
+ * methods so module React / SDK versions are stamped on events, page views and timings alike.
77
78
  * Returns `undefined` when given `undefined`, so a standalone module (mounted outside the host) stays a no-op.
78
79
  *
79
80
  * @alpha
@@ -27,12 +27,13 @@ export interface IModuleTelemetryMetadata {
27
27
  moduleSdkVersion?: string;
28
28
  }
29
29
  /**
30
- * Wraps host telemetry callbacks so every `trackEvent` call also reports the module's runtime metadata.
30
+ * Wraps host telemetry callbacks so every `trackEvent` / `trackPageView` / `trackTiming` call also reports
31
+ * the module's runtime metadata.
31
32
  *
32
33
  * @remarks
33
- * The metadata is merged into the event `data` before the host's own `data` keys, so an explicit key in
34
- * the call site's `data` wins on collision (mirroring how the host merges its common properties).
35
- * `trackPageView` and `trackTiming` are passed through unchanged they carry no `data` slot today.
34
+ * The metadata is merged into the `data` argument before the call site's own keys, so an explicit key in
35
+ * `data` wins on collision (mirroring how the host merges its common properties). This applies to all three
36
+ * methods so module React / SDK versions are stamped on events, page views and timings alike.
36
37
  * Returns `undefined` when given `undefined`, so a standalone module (mounted outside the host) stays a no-op.
37
38
  *
38
39
  * @alpha
@@ -1 +1 @@
1
- {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../src/telemetry.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAsC,MAAM,OAAO,CAAC;AAEnF,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,2CAA2C,CAAC;AAEjG;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,wBAAwB;IACrC;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACpC,SAAS,EAAE,+BAA+B,GAAG,SAAS,EACtD,QAAQ,EAAE,wBAAwB,GACnC,+BAA+B,GAAG,SAAS,CAU7C;AAaD;;;;GAIG;AACH,MAAM,WAAW,mCAAoC,SAAQ,iBAAiB,EAAE,wBAAwB;IACpG;;OAEG;IACH,gBAAgB,CAAC,EAAE,+BAA+B,CAAC;CACtD;AAED;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAAC,EAC1C,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,QAAQ,EACX,EAAE,mCAAmC,2CAarC;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,IAAI,+BAA+B,CAE1E"}
1
+ {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../src/telemetry.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAsC,MAAM,OAAO,CAAC;AAEnF,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,2CAA2C,CAAC;AAEjG;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,wBAAwB;IACrC;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CACpC,SAAS,EAAE,+BAA+B,GAAG,SAAS,EACtD,QAAQ,EAAE,wBAAwB,GACnC,+BAA+B,GAAG,SAAS,CAgB7C;AAaD;;;;GAIG;AACH,MAAM,WAAW,mCAAoC,SAAQ,iBAAiB,EAAE,wBAAwB;IACpG;;OAEG;IACH,gBAAgB,CAAC,EAAE,+BAA+B,CAAC;CACtD;AAED;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAAC,EAC1C,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,QAAQ,EACX,EAAE,mCAAmC,2CAarC;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,IAAI,+BAA+B,CAE1E"}
package/esm/telemetry.js CHANGED
@@ -2,12 +2,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  // (C) 2026 GoodData Corporation
3
3
  import { createContext, useContext, useMemo } from "react";
4
4
  /**
5
- * Wraps host telemetry callbacks so every `trackEvent` call also reports the module's runtime metadata.
5
+ * Wraps host telemetry callbacks so every `trackEvent` / `trackPageView` / `trackTiming` call also reports
6
+ * the module's runtime metadata.
6
7
  *
7
8
  * @remarks
8
- * The metadata is merged into the event `data` before the host's own `data` keys, so an explicit key in
9
- * the call site's `data` wins on collision (mirroring how the host merges its common properties).
10
- * `trackPageView` and `trackTiming` are passed through unchanged they carry no `data` slot today.
9
+ * The metadata is merged into the `data` argument before the call site's own keys, so an explicit key in
10
+ * `data` wins on collision (mirroring how the host merges its common properties). This applies to all three
11
+ * methods so module React / SDK versions are stamped on events, page views and timings alike.
11
12
  * Returns `undefined` when given `undefined`, so a standalone module (mounted outside the host) stays a no-op.
12
13
  *
13
14
  * @alpha
@@ -21,6 +22,12 @@ export function enrichTelemetryCallbacks(callbacks, metadata) {
21
22
  trackEvent(eventName, data, options) {
22
23
  callbacks.trackEvent(eventName, { ...metadata, ...data }, options);
23
24
  },
25
+ trackPageView(page, data) {
26
+ callbacks.trackPageView(page, { ...metadata, ...data });
27
+ },
28
+ trackTiming(variable, label, valueMs, data) {
29
+ callbacks.trackTiming(variable, label, valueMs, { ...metadata, ...data });
30
+ },
24
31
  };
25
32
  }
26
33
  const noop = () => undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-ui-pluggable-application",
3
- "version": "11.43.0-alpha.1",
3
+ "version": "11.43.0-alpha.2",
4
4
  "description": "GoodData SDK React helpers for pluggable applications",
5
5
  "license": "MIT",
6
6
  "author": "GoodData Corporation",
@@ -24,12 +24,12 @@
24
24
  "react-intl": "7.1.11",
25
25
  "ts-invariant": "0.10.3",
26
26
  "tslib": "2.8.1",
27
- "@gooddata/sdk-backend-base": "11.43.0-alpha.1",
28
- "@gooddata/sdk-backend-spi": "11.43.0-alpha.1",
29
- "@gooddata/sdk-model": "11.43.0-alpha.1",
30
- "@gooddata/sdk-ui": "11.43.0-alpha.1",
31
- "@gooddata/sdk-backend-tiger": "11.43.0-alpha.1",
32
- "@gooddata/sdk-pluggable-application-model": "11.43.0-alpha.1"
27
+ "@gooddata/sdk-backend-base": "11.43.0-alpha.2",
28
+ "@gooddata/sdk-backend-spi": "11.43.0-alpha.2",
29
+ "@gooddata/sdk-backend-tiger": "11.43.0-alpha.2",
30
+ "@gooddata/sdk-model": "11.43.0-alpha.2",
31
+ "@gooddata/sdk-pluggable-application-model": "11.43.0-alpha.2",
32
+ "@gooddata/sdk-ui": "11.43.0-alpha.2"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@microsoft/api-documenter": "^7.17.0",
@@ -61,8 +61,8 @@
61
61
  "react-dom": "19.1.1",
62
62
  "typescript": "5.9.3",
63
63
  "vitest": "4.1.8",
64
- "@gooddata/eslint-config": "11.43.0-alpha.1",
65
- "@gooddata/oxlint-config": "11.43.0-alpha.1"
64
+ "@gooddata/oxlint-config": "11.43.0-alpha.2",
65
+ "@gooddata/eslint-config": "11.43.0-alpha.2"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "react": "^18.0.0 || ^19.0.0",