@aranova/tracking-react 0.7.0 → 0.7.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.
- package/dist/index.d.mts +9 -3
- package/dist/index.d.ts +9 -3
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -81,8 +81,14 @@ interface TrackingClientContext {
|
|
|
81
81
|
page_title: string | null;
|
|
82
82
|
/** Browser document referrer at client creation time. */
|
|
83
83
|
referrer: string | null;
|
|
84
|
-
/**
|
|
85
|
-
|
|
84
|
+
/**
|
|
85
|
+
* Deployment environment label, e.g. `'production'`, `'development'`.
|
|
86
|
+
*
|
|
87
|
+
* Always set — defaults to `'production'` when the consumer doesn't
|
|
88
|
+
* pass `environment` to the factory. Sending `null` would fail the
|
|
89
|
+
* backend's strict enum validation.
|
|
90
|
+
*/
|
|
91
|
+
environment: TrackingEnvironment;
|
|
86
92
|
/** All active gtag IDs loaded on this page, keyed by label. */
|
|
87
93
|
active_gtag_ids: Record<string, string> | null;
|
|
88
94
|
}
|
|
@@ -188,7 +194,7 @@ interface TrackingContextInput {
|
|
|
188
194
|
referrer?: string | null;
|
|
189
195
|
sdkVersion?: string | null;
|
|
190
196
|
siteOrigin?: string | null;
|
|
191
|
-
environment?: TrackingEnvironment
|
|
197
|
+
environment?: TrackingEnvironment;
|
|
192
198
|
activeGtagIds?: Record<string, string> | null;
|
|
193
199
|
}
|
|
194
200
|
interface TrackingEventInput {
|
package/dist/index.d.ts
CHANGED
|
@@ -81,8 +81,14 @@ interface TrackingClientContext {
|
|
|
81
81
|
page_title: string | null;
|
|
82
82
|
/** Browser document referrer at client creation time. */
|
|
83
83
|
referrer: string | null;
|
|
84
|
-
/**
|
|
85
|
-
|
|
84
|
+
/**
|
|
85
|
+
* Deployment environment label, e.g. `'production'`, `'development'`.
|
|
86
|
+
*
|
|
87
|
+
* Always set — defaults to `'production'` when the consumer doesn't
|
|
88
|
+
* pass `environment` to the factory. Sending `null` would fail the
|
|
89
|
+
* backend's strict enum validation.
|
|
90
|
+
*/
|
|
91
|
+
environment: TrackingEnvironment;
|
|
86
92
|
/** All active gtag IDs loaded on this page, keyed by label. */
|
|
87
93
|
active_gtag_ids: Record<string, string> | null;
|
|
88
94
|
}
|
|
@@ -188,7 +194,7 @@ interface TrackingContextInput {
|
|
|
188
194
|
referrer?: string | null;
|
|
189
195
|
sdkVersion?: string | null;
|
|
190
196
|
siteOrigin?: string | null;
|
|
191
|
-
environment?: TrackingEnvironment
|
|
197
|
+
environment?: TrackingEnvironment;
|
|
192
198
|
activeGtagIds?: Record<string, string> | null;
|
|
193
199
|
}
|
|
194
200
|
interface TrackingEventInput {
|
package/dist/index.js
CHANGED
|
@@ -82,7 +82,7 @@ function createTrackingClientContext(surface, input = {}) {
|
|
|
82
82
|
site_origin: input.siteOrigin ?? (typeof window === "undefined" ? null : window.location.origin),
|
|
83
83
|
page_title: input.pageTitle ?? (typeof document === "undefined" ? null : document.title || null),
|
|
84
84
|
referrer: input.referrer ?? (typeof document === "undefined" ? null : document.referrer || null),
|
|
85
|
-
environment: input.environment ??
|
|
85
|
+
environment: input.environment ?? "production",
|
|
86
86
|
active_gtag_ids: input.activeGtagIds ?? null
|
|
87
87
|
};
|
|
88
88
|
}
|
|
@@ -572,7 +572,7 @@ function createTrackingClient(config) {
|
|
|
572
572
|
const maxQueueSize = Math.min(config.maxQueueSize ?? DEFAULT_MAX_QUEUE_SIZE, HARD_MAX_BATCH);
|
|
573
573
|
const sdkVersion = config.sdkVersion ?? null;
|
|
574
574
|
const packageName = config.packageName ?? null;
|
|
575
|
-
const environment = config.environment ??
|
|
575
|
+
const environment = config.environment ?? "production";
|
|
576
576
|
const activeGtagIds = config.activeGtagIds ?? null;
|
|
577
577
|
const endpointBase = config.endpoint.replace(/\/$/, "");
|
|
578
578
|
const eventsUrl = `${endpointBase}/events`;
|
|
@@ -1375,7 +1375,7 @@ function useConsentState() {
|
|
|
1375
1375
|
var import_react4 = require("react");
|
|
1376
1376
|
|
|
1377
1377
|
// package.json
|
|
1378
|
-
var version = "0.7.
|
|
1378
|
+
var version = "0.7.1";
|
|
1379
1379
|
|
|
1380
1380
|
// src/factory.tsx
|
|
1381
1381
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|