@mundogamernetwork/shared-ui 1.1.33 → 1.1.34
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/package.json +1 -1
- package/services/httpService.ts +8 -0
package/package.json
CHANGED
package/services/httpService.ts
CHANGED
|
@@ -85,6 +85,14 @@ export function getHttpService(): AxiosInstance {
|
|
|
85
85
|
config.headers.set("X-Timezone", Intl.DateTimeFormat().resolvedOptions().timeZone);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
// Live Analytics: send current page route and platform ID so the
|
|
89
|
+
// GeoAnalyticsMiddleware on each service-api can record session activity.
|
|
90
|
+
if (typeof window !== "undefined") {
|
|
91
|
+
config.headers.set("X-Page-Route", window.location.pathname);
|
|
92
|
+
const systemId = import.meta.env.VITE_SYSTEM_ID;
|
|
93
|
+
if (systemId) config.headers.set("X-System-Id", String(systemId));
|
|
94
|
+
}
|
|
95
|
+
|
|
88
96
|
return config;
|
|
89
97
|
});
|
|
90
98
|
|