@intlayer/analytics 9.4.2 → 9.4.4
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/types/core/AnalyticsClient.d.ts +7 -8
- package/dist/types/core/AnalyticsClient.d.ts.map +1 -1
- package/dist/types/core/abTesting.d.ts +1 -2
- package/dist/types/core/abTesting.d.ts.map +1 -1
- package/dist/types/core/eventBuffer.d.ts +2 -3
- package/dist/types/core/eventBuffer.d.ts.map +1 -1
- package/dist/types/core/globalManager.d.ts +4 -5
- package/dist/types/core/globalManager.d.ts.map +1 -1
- package/dist/types/core/initAnalyticsClient.d.ts +2 -3
- package/dist/types/core/initAnalyticsClient.d.ts.map +1 -1
- package/dist/types/core/publicToken.d.ts +3 -4
- package/dist/types/core/publicToken.d.ts.map +1 -1
- package/dist/types/core/sampling.d.ts +1 -2
- package/dist/types/core/sampling.d.ts.map +1 -1
- package/dist/types/core/session.d.ts +1 -2
- package/dist/types/core/session.d.ts.map +1 -1
- package/dist/types/core/transport.d.ts +1 -2
- package/dist/types/core/transport.d.ts.map +1 -1
- package/dist/types/core/types.d.ts +9 -10
- package/dist/types/core/types.d.ts.map +1 -1
- package/dist/types/events/contentExposure.d.ts +2 -3
- package/dist/types/events/contentExposure.d.ts.map +1 -1
- package/dist/types/isEnabled.d.ts +1 -2
- package/dist/types/isEnabled.d.ts.map +1 -1
- package/dist/types/utils/hash.d.ts +1 -2
- package/dist/types/utils/hash.d.ts.map +1 -1
- package/dist/types/utils/idle.d.ts +1 -2
- package/dist/types/utils/idle.d.ts.map +1 -1
- package/dist/types/utils/isBot.d.ts +3 -4
- package/dist/types/utils/isBot.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -4,7 +4,7 @@ import { AnalyticsClientConfig, ContentExposureEvent, ConversionEvent, PageViewE
|
|
|
4
4
|
* Caller-supplied fields for a page view. Everything is optional — the client
|
|
5
5
|
* fills `url`, `locale`, viewport, and referrer from the environment when omitted.
|
|
6
6
|
*/
|
|
7
|
-
type PageViewInput = {
|
|
7
|
+
export type PageViewInput = {
|
|
8
8
|
/** Explicit pathname / screen name (native runtimes have no `location`). */
|
|
9
9
|
url?: string;
|
|
10
10
|
/** Explicit locale; falls back to the client's ambient locale. */
|
|
@@ -19,21 +19,21 @@ type PageViewInput = {
|
|
|
19
19
|
reason?: PageViewEvent['reason'];
|
|
20
20
|
};
|
|
21
21
|
/** Default flush cadence — one network request per 20 seconds. */
|
|
22
|
-
declare const DEFAULT_FLUSH_INTERVAL = 20000;
|
|
22
|
+
export declare const DEFAULT_FLUSH_INTERVAL = 20000;
|
|
23
23
|
/** Default cap on distinct buffered events before an early flush. */
|
|
24
|
-
declare const DEFAULT_MAX_BUFFER_SIZE = 500;
|
|
24
|
+
export declare const DEFAULT_MAX_BUFFER_SIZE = 500;
|
|
25
25
|
/** Default sampling — keep every session. */
|
|
26
|
-
declare const DEFAULT_SAMPLE_RATE = 1;
|
|
26
|
+
export declare const DEFAULT_SAMPLE_RATE = 1;
|
|
27
27
|
/**
|
|
28
28
|
* Maximum events per network request. `sendBeacon` and `fetch(keepalive)`
|
|
29
29
|
* reject bodies over ~64KB, so large batches are split into multiple sends.
|
|
30
30
|
*/
|
|
31
|
-
declare const MAX_EVENTS_PER_SEND = 200;
|
|
31
|
+
export declare const MAX_EVENTS_PER_SEND = 200;
|
|
32
32
|
/**
|
|
33
33
|
* The public surface of the analytics client singleton. Framework bindings hold
|
|
34
34
|
* a reference to this and forward provider/node/conversion signals into it.
|
|
35
35
|
*/
|
|
36
|
-
type AnalyticsClient = {
|
|
36
|
+
export type AnalyticsClient = {
|
|
37
37
|
/** Sets the ambient locale stamped onto subsequent events. */
|
|
38
38
|
setLocale: (locale: string) => void;
|
|
39
39
|
/** Records a page/locale view (provider level). */
|
|
@@ -58,7 +58,6 @@ type AnalyticsClient = {
|
|
|
58
58
|
* @param config - Resolved client configuration.
|
|
59
59
|
* @returns A started-on-demand {@link AnalyticsClient}.
|
|
60
60
|
*/
|
|
61
|
-
declare const createAnalyticsClient: (config: AnalyticsClientConfig) => AnalyticsClient;
|
|
61
|
+
export declare const createAnalyticsClient: (config: AnalyticsClientConfig) => AnalyticsClient;
|
|
62
62
|
//#endregion
|
|
63
|
-
export { AnalyticsClient, DEFAULT_FLUSH_INTERVAL, DEFAULT_MAX_BUFFER_SIZE, DEFAULT_SAMPLE_RATE, MAX_EVENTS_PER_SEND, PageViewInput, createAnalyticsClient };
|
|
64
63
|
//# sourceMappingURL=AnalyticsClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnalyticsClient.d.ts","names":[],"sources":["../../../src/core/AnalyticsClient.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"AnalyticsClient.d.ts","names":[],"sources":["../../../src/core/AnalyticsClient.ts"],"mappings":";;;;;;YAqBY;;EAEV;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,SAAS;;;qBAIE;;qBAEA;;qBAEA;;;;;qBAKA;;;;;YAQD;;EAEV,YAAY;;EAEZ,gBAAgB,QAAQ;;EAExB,uBACE,OAAO,KAAK,eAAe;;EAG7B,kBACE,OAAO,KAAK,eAAe;;EAG7B,aACE,uBACA,oBACA;;EAGF,QAAQ;;EAER;;EAEA;;;;;;;;;qBA+BW,wBAAqB,QACxB,0BACP"}
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
* assignVariant('sid-1', 'homepage-hero', ['a', 'b']); // stable 'a' | 'b'
|
|
18
18
|
* assignVariant('sid-1', 'homepage-hero', ['a', 'b'], [9, 1]); // ~90% 'a'
|
|
19
19
|
*/
|
|
20
|
-
declare const assignVariant: (sessionId: string, experimentKey: string, variants: string[], weights?: number[]) => string;
|
|
20
|
+
export declare const assignVariant: (sessionId: string, experimentKey: string, variants: string[], weights?: number[]) => string;
|
|
21
21
|
//#endregion
|
|
22
|
-
export { assignVariant };
|
|
23
22
|
//# sourceMappingURL=abTesting.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abTesting.d.ts","names":[],"sources":["../../../src/core/abTesting.ts"],"mappings":";;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"abTesting.d.ts","names":[],"sources":["../../../src/core/abTesting.ts"],"mappings":";;;;;;;;;;;;;;;;;;;qBAoBa,gBAAa,mBACP,uBACI,oBACH"}
|
|
@@ -12,7 +12,7 @@ import { AnalyticsEvent } from "./types.js";
|
|
|
12
12
|
* the expendable signal). Discrete events are only dropped once no exposures
|
|
13
13
|
* remain.
|
|
14
14
|
*/
|
|
15
|
-
type EventBuffer = {
|
|
15
|
+
export type EventBuffer = {
|
|
16
16
|
/** Adds an event, coalescing content exposures. Returns the current size. */
|
|
17
17
|
push: (event: AnalyticsEvent) => number;
|
|
18
18
|
/** Removes and returns every buffered event. */
|
|
@@ -27,9 +27,8 @@ type EventBuffer = {
|
|
|
27
27
|
* @param options.max - Maximum number of distinct events to retain.
|
|
28
28
|
* @returns A new buffer instance.
|
|
29
29
|
*/
|
|
30
|
-
declare const createEventBuffer: ({ max }: {
|
|
30
|
+
export declare const createEventBuffer: ({ max }: {
|
|
31
31
|
max: number;
|
|
32
32
|
}) => EventBuffer;
|
|
33
33
|
//#endregion
|
|
34
|
-
export { EventBuffer, createEventBuffer };
|
|
35
34
|
//# sourceMappingURL=eventBuffer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventBuffer.d.ts","names":[],"sources":["../../../src/core/eventBuffer.ts"],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"eventBuffer.d.ts","names":[],"sources":["../../../src/core/eventBuffer.ts"],"mappings":";;;;;;;;;;;;;;YAgCY;;EAEV,OAAO,OAAO;;EAEd,aAAa;;EAEb;;;;;;;;;qBAUW,sBAAiB;EAAe;MAAgB"}
|
|
@@ -3,25 +3,24 @@ import { AnalyticsClient } from "./AnalyticsClient.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* Returns the global analytics client, or `null` in SSR or before init.
|
|
5
5
|
*/
|
|
6
|
-
declare const getGlobalAnalyticsClient: () => AnalyticsClient | null;
|
|
6
|
+
export declare const getGlobalAnalyticsClient: () => AnalyticsClient | null;
|
|
7
7
|
/**
|
|
8
8
|
* Sets (or clears) the global analytics client singleton.
|
|
9
9
|
*
|
|
10
10
|
* @param client - The client to store globally, or `null` to clear it.
|
|
11
11
|
*/
|
|
12
|
-
declare const setGlobalAnalyticsClient: (client: AnalyticsClient | null) => void;
|
|
12
|
+
export declare const setGlobalAnalyticsClient: (client: AnalyticsClient | null) => void;
|
|
13
13
|
/**
|
|
14
14
|
* Increments the shared provider reference count.
|
|
15
15
|
*
|
|
16
16
|
* @returns The count after incrementing (`0` in SSR, where nothing is stored).
|
|
17
17
|
*/
|
|
18
|
-
declare const incrementAnalyticsClientRefCount: () => number;
|
|
18
|
+
export declare const incrementAnalyticsClientRefCount: () => number;
|
|
19
19
|
/**
|
|
20
20
|
* Decrements the shared provider reference count, clamping at zero.
|
|
21
21
|
*
|
|
22
22
|
* @returns The count after decrementing (`0` in SSR, where nothing is stored).
|
|
23
23
|
*/
|
|
24
|
-
declare const decrementAnalyticsClientRefCount: () => number;
|
|
24
|
+
export declare const decrementAnalyticsClientRefCount: () => number;
|
|
25
25
|
//#endregion
|
|
26
|
-
export { decrementAnalyticsClientRefCount, getGlobalAnalyticsClient, incrementAnalyticsClientRefCount, setGlobalAnalyticsClient };
|
|
27
26
|
//# sourceMappingURL=globalManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalManager.d.ts","names":[],"sources":["../../../src/core/globalManager.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"globalManager.d.ts","names":[],"sources":["../../../src/core/globalManager.ts"],"mappings":";;;;;qBA2Ba,gCAA+B;;;;;;qBAU/B,2BAAwB,QAC3B;;;;;;qBAWG;;;;;;qBAYA"}
|
|
@@ -13,7 +13,7 @@ import { AnalyticsClient } from "./AnalyticsClient.js";
|
|
|
13
13
|
*
|
|
14
14
|
* @returns The started analytics client singleton.
|
|
15
15
|
*/
|
|
16
|
-
declare const initAnalyticsClient: () => AnalyticsClient;
|
|
16
|
+
export declare const initAnalyticsClient: () => AnalyticsClient;
|
|
17
17
|
/**
|
|
18
18
|
* Decrements the shared reference count and stops the global analytics client
|
|
19
19
|
* only when the last provider unmounts (flushing any remaining events).
|
|
@@ -21,7 +21,6 @@ declare const initAnalyticsClient: () => AnalyticsClient;
|
|
|
21
21
|
* Callers must pair each `stopAnalyticsClient` with a prior
|
|
22
22
|
* `initAnalyticsClient` — never call it when init was skipped or cancelled.
|
|
23
23
|
*/
|
|
24
|
-
declare const stopAnalyticsClient: () => void;
|
|
24
|
+
export declare const stopAnalyticsClient: () => void;
|
|
25
25
|
//#endregion
|
|
26
|
-
export { initAnalyticsClient, stopAnalyticsClient };
|
|
27
26
|
//# sourceMappingURL=initAnalyticsClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initAnalyticsClient.d.ts","names":[],"sources":["../../../src/core/initAnalyticsClient.ts"],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"initAnalyticsClient.d.ts","names":[],"sources":["../../../src/core/initAnalyticsClient.ts"],"mappings":";;;;;;;;;;;;;;;qBA4Ba,2BAA0B;;;;;;;;qBA2B1B"}
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
* exchanges once per tab rather than once per navigation.
|
|
14
14
|
*/
|
|
15
15
|
/** Options accepted by {@link createPublicTokenManager}. */
|
|
16
|
-
type PublicTokenManagerOptions = {
|
|
16
|
+
export type PublicTokenManagerOptions = {
|
|
17
17
|
/** Backend base URL, without a trailing slash. */
|
|
18
18
|
backendURL: string;
|
|
19
19
|
/** The project's public key (`editor.clientId`). */
|
|
20
20
|
clientId?: string;
|
|
21
21
|
};
|
|
22
22
|
/** Synchronous accessor + background refresher for the ingest token. */
|
|
23
|
-
type PublicTokenManager = {
|
|
23
|
+
export type PublicTokenManager = {
|
|
24
24
|
/**
|
|
25
25
|
* The currently valid token, or `undefined` when none has been obtained yet.
|
|
26
26
|
* Never blocks and never triggers a request.
|
|
@@ -42,7 +42,6 @@ type PublicTokenManager = {
|
|
|
42
42
|
* @param options - Backend URL and the public project key.
|
|
43
43
|
* @returns A manager exposing a synchronous {@link PublicTokenManager.getToken}.
|
|
44
44
|
*/
|
|
45
|
-
declare const createPublicTokenManager: ({ backendURL, clientId }: PublicTokenManagerOptions) => PublicTokenManager;
|
|
45
|
+
export declare const createPublicTokenManager: ({ backendURL, clientId }: PublicTokenManagerOptions) => PublicTokenManager;
|
|
46
46
|
//#endregion
|
|
47
|
-
export { PublicTokenManager, PublicTokenManagerOptions, createPublicTokenManager };
|
|
48
47
|
//# sourceMappingURL=publicToken.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publicToken.d.ts","names":[],"sources":["../../../src/core/publicToken.ts"],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"publicToken.d.ts","names":[],"sources":["../../../src/core/publicToken.ts"],"mappings":";;;;;;;;;;;;;;;YAyDY;;EAEV;;EAEA;;;YAIU;;;;;EAKV;;;;;EAKA;;;;;;;;;;;;qBAaW,6BAAwB,YAAA,YAGlC,8BAA4B"}
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
* isSampledIn('abc', 0); // always false
|
|
15
15
|
* isSampledIn('abc', 0.5); // stable per session
|
|
16
16
|
*/
|
|
17
|
-
declare const isSampledIn: (sessionId: string, sampleRate: number) => boolean;
|
|
17
|
+
export declare const isSampledIn: (sessionId: string, sampleRate: number) => boolean;
|
|
18
18
|
//#endregion
|
|
19
|
-
export { isSampledIn };
|
|
20
19
|
//# sourceMappingURL=sampling.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampling.d.ts","names":[],"sources":["../../../src/core/sampling.ts"],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"sampling.d.ts","names":[],"sources":["../../../src/core/sampling.ts"],"mappings":";;;;;;;;;;;;;;;;qBAiBa,cAAW,mBAAqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","names":[],"sources":["../../../src/core/session.ts"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"session.d.ts","names":[],"sources":["../../../src/core/session.ts"],"mappings":";;;;;;;;;;;;;qBAkCa"}
|
|
@@ -23,10 +23,9 @@ import { AnalyticsIngestBody } from "./types.js";
|
|
|
23
23
|
* the body.
|
|
24
24
|
* @returns `true` when a send was dispatched, `false` otherwise.
|
|
25
25
|
*/
|
|
26
|
-
declare const sendEvents: (endpoint: string, body: AnalyticsIngestBody, { useBeacon, token }?: {
|
|
26
|
+
export declare const sendEvents: (endpoint: string, body: AnalyticsIngestBody, { useBeacon, token }?: {
|
|
27
27
|
useBeacon?: boolean;
|
|
28
28
|
token?: string;
|
|
29
29
|
}) => boolean;
|
|
30
30
|
//#endregion
|
|
31
|
-
export { sendEvents };
|
|
32
31
|
//# sourceMappingURL=transport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","names":[],"sources":["../../../src/core/transport.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"transport.d.ts","names":[],"sources":["../../../src/core/transport.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;qBAyBa,aAAU,kBACL,MACV,uBAAmB,WAAA;EACO;EAAqB"}
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
/**
|
|
8
8
|
* The kind of signal an event carries.
|
|
9
9
|
*/
|
|
10
|
-
type AnalyticsEventType = 'page_view' | 'content_exposure' | 'conversion';
|
|
10
|
+
export type AnalyticsEventType = 'page_view' | 'content_exposure' | 'conversion';
|
|
11
11
|
/**
|
|
12
12
|
* Fields present on every event regardless of its type.
|
|
13
13
|
*/
|
|
14
|
-
type BaseAnalyticsEvent = {
|
|
14
|
+
export type BaseAnalyticsEvent = {
|
|
15
15
|
/** Client timestamp in milliseconds since epoch. */
|
|
16
16
|
t: number;
|
|
17
17
|
/** Current locale being displayed when the event was captured. */
|
|
@@ -23,7 +23,7 @@ type BaseAnalyticsEvent = {
|
|
|
23
23
|
* A page/locale level event, emitted at the provider level on first mount,
|
|
24
24
|
* on client-side navigation, and on locale change.
|
|
25
25
|
*/
|
|
26
|
-
type PageViewEvent = BaseAnalyticsEvent & {
|
|
26
|
+
export type PageViewEvent = BaseAnalyticsEvent & {
|
|
27
27
|
type: 'page_view';
|
|
28
28
|
/** Referrer host only (never the full URL) — omitted when unavailable. */
|
|
29
29
|
ref?: string;
|
|
@@ -39,7 +39,7 @@ type PageViewEvent = BaseAnalyticsEvent & {
|
|
|
39
39
|
* resolved for display. Coalesced by the buffer so repeated exposures of the
|
|
40
40
|
* same node within a flush window collapse into a single event with a `count`.
|
|
41
41
|
*/
|
|
42
|
-
type ContentExposureEvent = BaseAnalyticsEvent & {
|
|
42
|
+
export type ContentExposureEvent = BaseAnalyticsEvent & {
|
|
43
43
|
type: 'content_exposure';
|
|
44
44
|
/** The dictionary the resolved node belongs to. */
|
|
45
45
|
dictionaryKey: string;
|
|
@@ -57,7 +57,7 @@ type ContentExposureEvent = BaseAnalyticsEvent & {
|
|
|
57
57
|
/**
|
|
58
58
|
* A conversion event tying a goal to the A/B variant the session was exposed to.
|
|
59
59
|
*/
|
|
60
|
-
type ConversionEvent = BaseAnalyticsEvent & {
|
|
60
|
+
export type ConversionEvent = BaseAnalyticsEvent & {
|
|
61
61
|
type: 'conversion';
|
|
62
62
|
/** The experiment this conversion is attributed to. */
|
|
63
63
|
experimentKey: string;
|
|
@@ -71,19 +71,19 @@ type ConversionEvent = BaseAnalyticsEvent & {
|
|
|
71
71
|
/**
|
|
72
72
|
* The union of every event the client can emit.
|
|
73
73
|
*/
|
|
74
|
-
type AnalyticsEvent = PageViewEvent | ContentExposureEvent | ConversionEvent;
|
|
74
|
+
export type AnalyticsEvent = PageViewEvent | ContentExposureEvent | ConversionEvent;
|
|
75
75
|
/**
|
|
76
76
|
* An event as it is handed to the client trackers, before the buffer stamps the
|
|
77
77
|
* shared `BaseAnalyticsEvent` fields (`t`, `url`, and the ambient `locale`).
|
|
78
78
|
*/
|
|
79
|
-
type TrackableEvent<E extends AnalyticsEvent = AnalyticsEvent> = Omit<E, 't' | 'url' | 'locale'> & {
|
|
79
|
+
export type TrackableEvent<E extends AnalyticsEvent = AnalyticsEvent> = Omit<E, 't' | 'url' | 'locale'> & {
|
|
80
80
|
/** Optional explicit locale; falls back to the client's ambient locale. */
|
|
81
81
|
locale?: string;
|
|
82
82
|
};
|
|
83
83
|
/**
|
|
84
84
|
* The batched request body sent to `POST /api/analytics/events`.
|
|
85
85
|
*/
|
|
86
|
-
type AnalyticsIngestBody = {
|
|
86
|
+
export type AnalyticsIngestBody = {
|
|
87
87
|
/**
|
|
88
88
|
* Short-lived, ingest-scoped token obtained by exchanging the public
|
|
89
89
|
* `clientId`. Sent in the body rather than an `Authorization` header because
|
|
@@ -108,7 +108,7 @@ type AnalyticsIngestBody = {
|
|
|
108
108
|
* Resolved runtime options for the analytics client. All values have safe
|
|
109
109
|
* defaults so the client can run with only a `backendURL`.
|
|
110
110
|
*/
|
|
111
|
-
type AnalyticsClientConfig = {
|
|
111
|
+
export type AnalyticsClientConfig = {
|
|
112
112
|
/** Base URL of the Intlayer backend — reused from `editor.backendURL`. */
|
|
113
113
|
backendURL: string;
|
|
114
114
|
/** Public project key — reused from `editor.clientId`. */
|
|
@@ -121,5 +121,4 @@ type AnalyticsClientConfig = {
|
|
|
121
121
|
sampleRate: number;
|
|
122
122
|
};
|
|
123
123
|
//#endregion
|
|
124
|
-
export { AnalyticsClientConfig, AnalyticsEvent, AnalyticsEventType, AnalyticsIngestBody, BaseAnalyticsEvent, ContentExposureEvent, ConversionEvent, PageViewEvent, TrackableEvent };
|
|
125
124
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/core/types.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/core/types.ts"],"mappings":";;;;;;;;;YASY;;;;YAQA;;EAEV;;EAEA;;EAEA;;;;;;YAOU,gBAAgB;EAC1B;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;YAQU,uBAAuB;EACjC;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;YAMU,kBAAkB;EAC5B;;EAEA;;EAEA;;EAEA;;EAEA;;;;;YAMU,iBACR,gBACA,uBACA;;;;;YAMQ,eAAe,UAAU,iBAAiB,kBAAkB,KACtE;;EAIA;;;;;YAMU;;;;;;;EAOV;;;;;;EAMA;;EAEA;;EAEA;;EAEA,QAAQ;;;;;;YAOE;;EAEV;;EAEA;;EAEA;;EAEA;;EAEA"}
|
|
@@ -15,7 +15,7 @@ import { KeyPath } from "@intlayer/types/keyPath";
|
|
|
15
15
|
* serializeKeyPath([{ type: 'object', key: 'faq' }, { type: 'array', key: 2 }]);
|
|
16
16
|
* // "faq.2"
|
|
17
17
|
*/
|
|
18
|
-
declare const serializeKeyPath: (keyPath: KeyPath[]) => string;
|
|
18
|
+
export declare const serializeKeyPath: (keyPath: KeyPath[]) => string;
|
|
19
19
|
/**
|
|
20
20
|
* Builds a content-exposure payload from interpreter node metadata. Shared by
|
|
21
21
|
* every framework binding's analytics node plugin so the wire shape stays
|
|
@@ -24,7 +24,7 @@ declare const serializeKeyPath: (keyPath: KeyPath[]) => string;
|
|
|
24
24
|
* @param params - Node metadata available on `NodeProps`.
|
|
25
25
|
* @returns A trackable content-exposure event (minus buffer-stamped fields).
|
|
26
26
|
*/
|
|
27
|
-
declare const buildContentExposure: (params: {
|
|
27
|
+
export declare const buildContentExposure: (params: {
|
|
28
28
|
dictionaryKey: string;
|
|
29
29
|
keyPath: KeyPath[];
|
|
30
30
|
locale?: string;
|
|
@@ -33,5 +33,4 @@ declare const buildContentExposure: (params: {
|
|
|
33
33
|
variant?: string;
|
|
34
34
|
}) => Omit<TrackableEvent<ContentExposureEvent>, 'type'>;
|
|
35
35
|
//#endregion
|
|
36
|
-
export { buildContentExposure, serializeKeyPath };
|
|
37
36
|
//# sourceMappingURL=contentExposure.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contentExposure.d.ts","names":[],"sources":["../../../src/events/contentExposure.ts"],"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"contentExposure.d.ts","names":[],"sources":["../../../src/events/contentExposure.ts"],"mappings":";;;;;;;;;;;;;;;;;qBAiBa,mBAAgB,SAAa;;;;;;;;;qBAa7B,uBAAoB;EAC/B;EACA,SAAS;EACT;EACA;EACA;EACA;MACE,KAAK,eAAe"}
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
* - we are the top window (not embedded in the editor), and
|
|
14
14
|
* - the visitor is not a bot, crawler or automation runtime.
|
|
15
15
|
*/
|
|
16
|
-
declare const isEnabled: boolean;
|
|
16
|
+
export declare const isEnabled: boolean;
|
|
17
17
|
//#endregion
|
|
18
|
-
export { isEnabled };
|
|
19
18
|
//# sourceMappingURL=isEnabled.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isEnabled.d.ts","names":[],"sources":["../../src/isEnabled.ts"],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"isEnabled.d.ts","names":[],"sources":["../../src/isEnabled.ts"],"mappings":";;;;;;;;;;;;;;;qBA0Ba"}
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* @example
|
|
11
11
|
* hashString('session-1:homepage-hero'); // 3039336720
|
|
12
12
|
*/
|
|
13
|
-
declare const hashString: (input: string) => number;
|
|
13
|
+
export declare const hashString: (input: string) => number;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { hashString };
|
|
16
15
|
//# sourceMappingURL=hash.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash.d.ts","names":[],"sources":["../../../src/utils/hash.ts"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"hash.d.ts","names":[],"sources":["../../../src/utils/hash.ts"],"mappings":";;;;;;;;;;;;qBAWa,aAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idle.d.ts","names":[],"sources":["../../../src/utils/idle.ts"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"idle.d.ts","names":[],"sources":["../../../src/utils/idle.ts"],"mappings":";;;;;;;;;;;qBAUa,SAAM"}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* - social link-preview fetchers
|
|
20
20
|
* - AI / LLM crawlers and agents
|
|
21
21
|
*/
|
|
22
|
-
declare const BOT_USER_AGENT_PATTERN: RegExp;
|
|
22
|
+
export declare const BOT_USER_AGENT_PATTERN: RegExp;
|
|
23
23
|
/**
|
|
24
24
|
* Tells whether a user agent string identifies a bot, crawler or automation
|
|
25
25
|
* runtime rather than a human visitor.
|
|
@@ -34,7 +34,7 @@ declare const BOT_USER_AGENT_PATTERN: RegExp;
|
|
|
34
34
|
* isBotUserAgent('Mozilla/5.0 (compatible; Googlebot/2.1)'); // true
|
|
35
35
|
* isBotUserAgent('Mozilla/5.0 (Macintosh) Chrome/120'); // false
|
|
36
36
|
*/
|
|
37
|
-
declare const isBotUserAgent: (userAgent?: string | null) => boolean;
|
|
37
|
+
export declare const isBotUserAgent: (userAgent?: string | null) => boolean;
|
|
38
38
|
/**
|
|
39
39
|
* Tells whether the current browser environment is automated, combining the
|
|
40
40
|
* user agent with automation fingerprints (`navigator.webdriver`, runtime
|
|
@@ -48,7 +48,6 @@ declare const isBotUserAgent: (userAgent?: string | null) => boolean;
|
|
|
48
48
|
* @example
|
|
49
49
|
* if (isBotEnvironment()) return; // never start the client for a crawler
|
|
50
50
|
*/
|
|
51
|
-
declare const isBotEnvironment: () => boolean;
|
|
51
|
+
export declare const isBotEnvironment: () => boolean;
|
|
52
52
|
//#endregion
|
|
53
|
-
export { BOT_USER_AGENT_PATTERN, isBotEnvironment, isBotUserAgent };
|
|
54
53
|
//# sourceMappingURL=isBot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isBot.d.ts","names":[],"sources":["../../../src/utils/isBot.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"isBot.d.ts","names":[],"sources":["../../../src/utils/isBot.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;qBA4Ba,wBAAsB;;;;;;;;;;;;;;;qBAiBtB,iBAAc;;;;;;;;;;;;;;qBAmCd"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/analytics",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Collects which Intlayer content is shown (page/locale + node-level) and powers content A/B testing. Optional, lazily-imported companion to @intlayer/editor.",
|
|
6
6
|
"keywords": [
|
|
@@ -85,9 +85,9 @@
|
|
|
85
85
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@intlayer/config": "9.4.
|
|
89
|
-
"@intlayer/core": "9.4.
|
|
90
|
-
"@intlayer/types": "9.4.
|
|
88
|
+
"@intlayer/config": "9.4.4",
|
|
89
|
+
"@intlayer/core": "9.4.4",
|
|
90
|
+
"@intlayer/types": "9.4.4"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
93
|
"@types/node": "26.4.1",
|
|
@@ -95,9 +95,9 @@
|
|
|
95
95
|
"@utils/ts-config-types": "1.0.4",
|
|
96
96
|
"@utils/tsdown-config": "1.0.4",
|
|
97
97
|
"rimraf": "6.1.3",
|
|
98
|
-
"tsdown": "0.
|
|
98
|
+
"tsdown": "0.23.0",
|
|
99
99
|
"typescript": "7.0.2",
|
|
100
|
-
"vitest": "
|
|
100
|
+
"vitest": "5.0.0"
|
|
101
101
|
},
|
|
102
102
|
"engines": {
|
|
103
103
|
"node": ">=14.18"
|