@shware/analytics 8.12.0 → 8.13.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/attribution/classify.cjs +35 -26
- package/dist/attribution/classify.cjs.map +1 -1
- package/dist/attribution/classify.d.cts +15 -9
- package/dist/attribution/classify.d.cts.map +1 -1
- package/dist/attribution/classify.d.mts +15 -9
- package/dist/attribution/classify.d.mts.map +1 -1
- package/dist/attribution/classify.mjs +36 -27
- package/dist/attribution/classify.mjs.map +1 -1
- package/dist/attribution/index.cjs +2 -0
- package/dist/attribution/index.d.cts +2 -2
- package/dist/attribution/index.d.mts +2 -2
- package/dist/attribution/index.mjs +2 -2
- package/dist/attribution/vocabulary.cjs +207 -34
- package/dist/attribution/vocabulary.cjs.map +1 -1
- package/dist/attribution/vocabulary.d.cts +75 -31
- package/dist/attribution/vocabulary.d.cts.map +1 -1
- package/dist/attribution/vocabulary.d.mts +75 -31
- package/dist/attribution/vocabulary.d.mts.map +1 -1
- package/dist/attribution/vocabulary.mjs +206 -35
- package/dist/attribution/vocabulary.mjs.map +1 -1
- package/dist/click-id/index.d.cts +18 -19
- package/dist/click-id/index.d.cts.map +1 -1
- package/dist/click-id/index.d.mts +18 -19
- package/dist/click-id/index.d.mts.map +1 -1
- package/dist/constants/storage.d.cts +1 -2
- package/dist/constants/storage.d.cts.map +1 -1
- package/dist/constants/storage.d.mts +1 -2
- package/dist/constants/storage.d.mts.map +1 -1
- package/dist/feedback/index.d.cts +1 -2
- package/dist/feedback/index.d.cts.map +1 -1
- package/dist/feedback/index.d.mts +1 -2
- package/dist/feedback/index.d.mts.map +1 -1
- package/dist/hooks/use-app-analytics.d.cts +1 -2
- package/dist/hooks/use-app-analytics.d.cts.map +1 -1
- package/dist/hooks/use-app-analytics.d.mts +1 -2
- package/dist/hooks/use-app-analytics.d.mts.map +1 -1
- package/dist/hooks/use-outbound-click-analytics.d.cts +1 -2
- package/dist/hooks/use-outbound-click-analytics.d.cts.map +1 -1
- package/dist/hooks/use-outbound-click-analytics.d.mts +1 -2
- package/dist/hooks/use-outbound-click-analytics.d.mts.map +1 -1
- package/dist/hooks/use-previous.d.cts +1 -2
- package/dist/hooks/use-previous.d.cts.map +1 -1
- package/dist/hooks/use-previous.d.mts +1 -2
- package/dist/hooks/use-previous.d.mts.map +1 -1
- package/dist/hooks/use-report-web-vitals.d.cts +1 -2
- package/dist/hooks/use-report-web-vitals.d.cts.map +1 -1
- package/dist/hooks/use-report-web-vitals.d.mts +1 -2
- package/dist/hooks/use-report-web-vitals.d.mts.map +1 -1
- package/dist/hooks/use-track-impression.d.cts +1 -2
- package/dist/hooks/use-track-impression.d.cts.map +1 -1
- package/dist/hooks/use-track-impression.d.mts +1 -2
- package/dist/hooks/use-track-impression.d.mts.map +1 -1
- package/dist/hooks/use-uet-id-sync.d.cts +1 -2
- package/dist/hooks/use-uet-id-sync.d.cts.map +1 -1
- package/dist/hooks/use-uet-id-sync.d.mts +1 -2
- package/dist/hooks/use-uet-id-sync.d.mts.map +1 -1
- package/dist/hooks/use-web-analytics.d.cts +1 -2
- package/dist/hooks/use-web-analytics.d.cts.map +1 -1
- package/dist/hooks/use-web-analytics.d.mts +1 -2
- package/dist/hooks/use-web-analytics.d.mts.map +1 -1
- package/dist/link/index.d.cts +3 -4
- package/dist/link/index.d.cts.map +1 -1
- package/dist/link/index.d.mts +3 -4
- package/dist/link/index.d.mts.map +1 -1
- package/dist/native/fbsdk.d.cts +1 -2
- package/dist/native/fbsdk.d.cts.map +1 -1
- package/dist/native/fbsdk.d.mts +1 -2
- package/dist/native/fbsdk.d.mts.map +1 -1
- package/dist/native/fingerprint.d.cts +4 -5
- package/dist/native/fingerprint.d.cts.map +1 -1
- package/dist/native/fingerprint.d.mts +4 -5
- package/dist/native/fingerprint.d.mts.map +1 -1
- package/dist/native/firebase.d.cts +1 -2
- package/dist/native/firebase.d.cts.map +1 -1
- package/dist/native/firebase.d.mts +1 -2
- package/dist/native/firebase.d.mts.map +1 -1
- package/dist/native/posthog.d.cts +1 -2
- package/dist/native/posthog.d.cts.map +1 -1
- package/dist/native/posthog.d.mts +1 -2
- package/dist/native/posthog.d.mts.map +1 -1
- package/dist/native/setup.d.cts +4 -5
- package/dist/native/setup.d.cts.map +1 -1
- package/dist/native/setup.d.mts +4 -5
- package/dist/native/setup.d.mts.map +1 -1
- package/dist/next/index.cjs +14 -14
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.d.cts +1 -2
- package/dist/next/index.d.cts.map +1 -1
- package/dist/next/index.d.mts +1 -2
- package/dist/next/index.d.mts.map +1 -1
- package/dist/next/index.mjs +3 -3
- package/dist/react-router/index.d.cts +1 -2
- package/dist/react-router/index.d.cts.map +1 -1
- package/dist/react-router/index.d.mts +1 -2
- package/dist/react-router/index.d.mts.map +1 -1
- package/dist/schema/index.d.cts +16 -17
- package/dist/schema/index.d.cts.map +1 -1
- package/dist/schema/index.d.mts +16 -17
- package/dist/schema/index.d.mts.map +1 -1
- package/dist/server/action-source.d.cts +3 -4
- package/dist/server/action-source.d.cts.map +1 -1
- package/dist/server/action-source.d.mts +3 -4
- package/dist/server/action-source.d.mts.map +1 -1
- package/dist/server/google-data-manager.d.cts +9 -10
- package/dist/server/google-data-manager.d.cts.map +1 -1
- package/dist/server/google-data-manager.d.mts +9 -10
- package/dist/server/google-data-manager.d.mts.map +1 -1
- package/dist/server/linkedin-conversions-api.d.cts +4 -5
- package/dist/server/linkedin-conversions-api.d.cts.map +1 -1
- package/dist/server/linkedin-conversions-api.d.mts +4 -5
- package/dist/server/linkedin-conversions-api.d.mts.map +1 -1
- package/dist/server/meta-capi.d.cts +5 -6
- package/dist/server/meta-capi.d.cts.map +1 -1
- package/dist/server/meta-capi.d.mts +5 -6
- package/dist/server/meta-capi.d.mts.map +1 -1
- package/dist/server/meta-conversions-api.d.cts +4 -5
- package/dist/server/meta-conversions-api.d.cts.map +1 -1
- package/dist/server/meta-conversions-api.d.mts +4 -5
- package/dist/server/meta-conversions-api.d.mts.map +1 -1
- package/dist/server/microsoft-conversions-api.d.cts +11 -12
- package/dist/server/microsoft-conversions-api.d.cts.map +1 -1
- package/dist/server/microsoft-conversions-api.d.mts +11 -12
- package/dist/server/microsoft-conversions-api.d.mts.map +1 -1
- package/dist/server/openai-conversions-api.d.cts +5 -6
- package/dist/server/openai-conversions-api.d.cts.map +1 -1
- package/dist/server/openai-conversions-api.d.mts +5 -6
- package/dist/server/openai-conversions-api.d.mts.map +1 -1
- package/dist/server/page-location.d.cts +1 -2
- package/dist/server/page-location.d.cts.map +1 -1
- package/dist/server/page-location.d.mts +1 -2
- package/dist/server/page-location.d.mts.map +1 -1
- package/dist/server/reddit-conversions-api.d.cts +4 -5
- package/dist/server/reddit-conversions-api.d.cts.map +1 -1
- package/dist/server/reddit-conversions-api.d.mts +4 -5
- package/dist/server/reddit-conversions-api.d.mts.map +1 -1
- package/dist/setup/index.d.cts +5 -6
- package/dist/setup/index.d.cts.map +1 -1
- package/dist/setup/index.d.mts +5 -6
- package/dist/setup/index.d.mts.map +1 -1
- package/dist/setup/session.d.cts +2 -3
- package/dist/setup/session.d.cts.map +1 -1
- package/dist/setup/session.d.mts +2 -3
- package/dist/setup/session.d.mts.map +1 -1
- package/dist/tanstack/analytics.d.cts +1 -2
- package/dist/tanstack/analytics.d.cts.map +1 -1
- package/dist/tanstack/analytics.d.mts +1 -2
- package/dist/tanstack/analytics.d.mts.map +1 -1
- package/dist/tanstack/middleware.d.cts +3 -4
- package/dist/tanstack/middleware.d.cts.map +1 -1
- package/dist/tanstack/middleware.d.mts +3 -4
- package/dist/tanstack/middleware.d.mts.map +1 -1
- package/dist/test/setup.d.cts +3 -4
- package/dist/test/setup.d.cts.map +1 -1
- package/dist/test/setup.d.mts +3 -4
- package/dist/test/setup.d.mts.map +1 -1
- package/dist/third-parties/google-analytics.d.cts +2 -3
- package/dist/third-parties/google-analytics.d.cts.map +1 -1
- package/dist/third-parties/google-analytics.d.mts +2 -3
- package/dist/third-parties/google-analytics.d.mts.map +1 -1
- package/dist/third-parties/ignored-events.d.cts +1 -2
- package/dist/third-parties/ignored-events.d.cts.map +1 -1
- package/dist/third-parties/ignored-events.d.mts +1 -2
- package/dist/third-parties/ignored-events.d.mts.map +1 -1
- package/dist/third-parties/linkedin-insight-tag.d.cts +3 -4
- package/dist/third-parties/linkedin-insight-tag.d.cts.map +1 -1
- package/dist/third-parties/linkedin-insight-tag.d.mts +3 -4
- package/dist/third-parties/linkedin-insight-tag.d.mts.map +1 -1
- package/dist/third-parties/meta-pixel.d.cts +2 -3
- package/dist/third-parties/meta-pixel.d.cts.map +1 -1
- package/dist/third-parties/meta-pixel.d.mts +2 -3
- package/dist/third-parties/meta-pixel.d.mts.map +1 -1
- package/dist/third-parties/microsoft-uet.d.cts +6 -7
- package/dist/third-parties/microsoft-uet.d.cts.map +1 -1
- package/dist/third-parties/microsoft-uet.d.mts +6 -7
- package/dist/third-parties/microsoft-uet.d.mts.map +1 -1
- package/dist/third-parties/openai-pixel.d.cts +2 -3
- package/dist/third-parties/openai-pixel.d.cts.map +1 -1
- package/dist/third-parties/openai-pixel.d.mts +2 -3
- package/dist/third-parties/openai-pixel.d.mts.map +1 -1
- package/dist/third-parties/posthog.d.cts +2 -3
- package/dist/third-parties/posthog.d.cts.map +1 -1
- package/dist/third-parties/posthog.d.mts +2 -3
- package/dist/third-parties/posthog.d.mts.map +1 -1
- package/dist/third-parties/reddit-pixel.d.cts +2 -3
- package/dist/third-parties/reddit-pixel.d.cts.map +1 -1
- package/dist/third-parties/reddit-pixel.d.mts +2 -3
- package/dist/third-parties/reddit-pixel.d.mts.map +1 -1
- package/dist/track/fbq.d.cts +10 -11
- package/dist/track/fbq.d.cts.map +1 -1
- package/dist/track/fbq.d.mts +10 -11
- package/dist/track/fbq.d.mts.map +1 -1
- package/dist/track/gtag.d.cts +26 -27
- package/dist/track/gtag.d.cts.map +1 -1
- package/dist/track/gtag.d.mts +26 -27
- package/dist/track/gtag.d.mts.map +1 -1
- package/dist/track/index.d.cts +4 -5
- package/dist/track/index.d.cts.map +1 -1
- package/dist/track/index.d.mts +4 -5
- package/dist/track/index.d.mts.map +1 -1
- package/dist/track/lintrk.d.cts +1 -2
- package/dist/track/lintrk.d.cts.map +1 -1
- package/dist/track/lintrk.d.mts +1 -2
- package/dist/track/lintrk.d.mts.map +1 -1
- package/dist/track/oaiq.d.cts +17 -18
- package/dist/track/oaiq.d.cts.map +1 -1
- package/dist/track/oaiq.d.mts +17 -18
- package/dist/track/oaiq.d.mts.map +1 -1
- package/dist/track/rdt.d.cts +10 -11
- package/dist/track/rdt.d.cts.map +1 -1
- package/dist/track/rdt.d.mts +10 -11
- package/dist/track/rdt.d.mts.map +1 -1
- package/dist/track/types.d.cts +20 -21
- package/dist/track/types.d.cts.map +1 -1
- package/dist/track/types.d.mts +20 -21
- package/dist/track/types.d.mts.map +1 -1
- package/dist/track/uetq.d.cts +8 -9
- package/dist/track/uetq.d.cts.map +1 -1
- package/dist/track/uetq.d.mts +8 -9
- package/dist/track/uetq.d.mts.map +1 -1
- package/dist/utils/field.d.cts +1 -2
- package/dist/utils/field.d.cts.map +1 -1
- package/dist/utils/field.d.mts +1 -2
- package/dist/utils/field.d.mts.map +1 -1
- package/dist/utils/sha256.d.cts +1 -2
- package/dist/utils/sha256.d.cts.map +1 -1
- package/dist/utils/sha256.d.mts +1 -2
- package/dist/utils/sha256.d.mts.map +1 -1
- package/dist/utils/stripe.d.cts +2 -3
- package/dist/utils/stripe.d.cts.map +1 -1
- package/dist/utils/stripe.d.mts +2 -3
- package/dist/utils/stripe.d.mts.map +1 -1
- package/dist/visitor/index.d.cts +2 -3
- package/dist/visitor/index.d.cts.map +1 -1
- package/dist/visitor/index.d.mts +2 -3
- package/dist/visitor/index.d.mts.map +1 -1
- package/dist/visitor/types.d.cts +4 -5
- package/dist/visitor/types.d.cts.map +1 -1
- package/dist/visitor/types.d.mts +4 -5
- package/dist/visitor/types.d.mts.map +1 -1
- package/dist/web/index.d.cts +3 -4
- package/dist/web/index.d.cts.map +1 -1
- package/dist/web/index.d.mts +3 -4
- package/dist/web/index.d.mts.map +1 -1
- package/dist/web/page-key.d.cts +1 -2
- package/dist/web/page-key.d.cts.map +1 -1
- package/dist/web/page-key.d.mts +1 -2
- package/dist/web/page-key.d.mts.map +1 -1
- package/package.json +27 -27
package/dist/track/types.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { StandardEvents, UserProvidedData as UserProvidedData$1 } from "./gtag.mjs";
|
|
2
2
|
//#region src/track/types.d.ts
|
|
3
|
-
type AllowedPropertyValues = string | number | boolean | null;
|
|
4
|
-
type EventName = Lowercase<string> | 'CLS' | 'FCP' | 'INP' | 'LCP' | 'TTFB';
|
|
5
|
-
type TrackName<T extends EventName = EventName> = T extends keyof StandardEvents ? T : EventName;
|
|
3
|
+
export type AllowedPropertyValues = string | number | boolean | null;
|
|
4
|
+
export type EventName = Lowercase<string> | 'CLS' | 'FCP' | 'INP' | 'LCP' | 'TTFB';
|
|
5
|
+
export type TrackName<T extends EventName = EventName> = T extends keyof StandardEvents ? T : EventName;
|
|
6
6
|
/**
|
|
7
7
|
* Properties an application defines for its own events, keyed by event name.
|
|
8
8
|
*
|
|
@@ -29,7 +29,7 @@ type TrackName<T extends EventName = EventName> = T extends keyof StandardEvents
|
|
|
29
29
|
* Note what "custom" attaches to: the *properties*, not the event. `begin_checkout` is one
|
|
30
30
|
* of GA4's recommended events and stays one — only the properties added here are custom.
|
|
31
31
|
*/
|
|
32
|
-
interface CustomEventProperties {}
|
|
32
|
+
export interface CustomEventProperties {}
|
|
33
33
|
/**
|
|
34
34
|
* An application's declared properties for one event, or nothing if it declared none.
|
|
35
35
|
*
|
|
@@ -37,10 +37,10 @@ interface CustomEventProperties {}
|
|
|
37
37
|
* no declaration intersects to exactly the type it had before.
|
|
38
38
|
*/
|
|
39
39
|
type CustomPropertiesFor<T> = T extends keyof CustomEventProperties ? CustomEventProperties[T] : unknown;
|
|
40
|
-
type TrackProperties<T extends EventName = EventName> = T extends keyof StandardEvents ? StandardEvents[T] & CustomPropertiesFor<T> : T extends keyof CustomEventProperties ? CustomEventProperties[T] : Record<Lowercase<string>, AllowedPropertyValues>;
|
|
41
|
-
type Platform = 'ios' | 'android' | 'web' | 'macos' | 'windows' | 'linux' | 'unknown';
|
|
42
|
-
type Environment = 'development' | 'production';
|
|
43
|
-
interface UserData {
|
|
40
|
+
export type TrackProperties<T extends EventName = EventName> = T extends keyof StandardEvents ? StandardEvents[T] & CustomPropertiesFor<T> : T extends keyof CustomEventProperties ? CustomEventProperties[T] : Record<Lowercase<string>, AllowedPropertyValues>;
|
|
41
|
+
export type Platform = 'ios' | 'android' | 'web' | 'macos' | 'windows' | 'linux' | 'unknown';
|
|
42
|
+
export type Environment = 'development' | 'production';
|
|
43
|
+
export interface UserData {
|
|
44
44
|
userId: string;
|
|
45
45
|
email?: string;
|
|
46
46
|
firstName?: string;
|
|
@@ -53,7 +53,7 @@ interface UserData {
|
|
|
53
53
|
postal?: string;
|
|
54
54
|
country?: string;
|
|
55
55
|
}
|
|
56
|
-
interface UserProvidedData extends UserProvidedData$1 {
|
|
56
|
+
export interface UserProvidedData extends UserProvidedData$1 {
|
|
57
57
|
user_id?: string;
|
|
58
58
|
ip_address?: string;
|
|
59
59
|
user_agent?: string;
|
|
@@ -66,8 +66,8 @@ interface UserProvidedData extends UserProvidedData$1 {
|
|
|
66
66
|
fb_login_id?: string;
|
|
67
67
|
fb_page_id?: string;
|
|
68
68
|
}
|
|
69
|
-
type ThirdPartyTracker = <T extends EventName>(name: TrackName<T>, properties?: TrackProperties<T>, event_id?: string) => void;
|
|
70
|
-
interface PlatformInfo {
|
|
69
|
+
export type ThirdPartyTracker = <T extends EventName>(name: TrackName<T>, properties?: TrackProperties<T>, event_id?: string) => void;
|
|
70
|
+
export interface PlatformInfo {
|
|
71
71
|
os?: string;
|
|
72
72
|
os_name?: string;
|
|
73
73
|
os_version?: string;
|
|
@@ -75,7 +75,7 @@ interface PlatformInfo {
|
|
|
75
75
|
browser_name?: string;
|
|
76
76
|
browser_version?: string;
|
|
77
77
|
}
|
|
78
|
-
interface DeviceInfo {
|
|
78
|
+
export interface DeviceInfo {
|
|
79
79
|
device?: string;
|
|
80
80
|
device_id?: string;
|
|
81
81
|
device_type?: string;
|
|
@@ -86,12 +86,12 @@ interface DeviceInfo {
|
|
|
86
86
|
screen_height?: number;
|
|
87
87
|
screen_resolution?: `${number}x${number}`;
|
|
88
88
|
}
|
|
89
|
-
interface AppInfo {
|
|
89
|
+
export interface AppInfo {
|
|
90
90
|
/** iOS: IDFA, Android: Android Advertising ID */
|
|
91
91
|
advertising_id?: string;
|
|
92
92
|
install_referrer?: string;
|
|
93
93
|
}
|
|
94
|
-
interface EnvironmentInfo {
|
|
94
|
+
export interface EnvironmentInfo {
|
|
95
95
|
release?: string;
|
|
96
96
|
language?: string;
|
|
97
97
|
time_zone?: string;
|
|
@@ -104,7 +104,7 @@ interface EnvironmentInfo {
|
|
|
104
104
|
* Web only: a native app has no page. Meta's `event_source_url` and OpenAI's `source_url` are
|
|
105
105
|
* both fed from `page_location`.
|
|
106
106
|
*/
|
|
107
|
-
interface PageInfo {
|
|
107
|
+
export interface PageInfo {
|
|
108
108
|
page_location?: string;
|
|
109
109
|
page_referrer?: string;
|
|
110
110
|
page_title?: string;
|
|
@@ -122,7 +122,7 @@ interface PageInfo {
|
|
|
122
122
|
*/
|
|
123
123
|
source_url?: string;
|
|
124
124
|
}
|
|
125
|
-
interface AdvertisingInfo {
|
|
125
|
+
export interface AdvertisingInfo {
|
|
126
126
|
/**
|
|
127
127
|
* Meta pixel fields
|
|
128
128
|
* ref: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters#fbc
|
|
@@ -164,7 +164,7 @@ interface AdvertisingInfo {
|
|
|
164
164
|
* Value unions follow GA4 default channel group definitions:
|
|
165
165
|
* https://support.google.com/analytics/answer/9756891
|
|
166
166
|
*/
|
|
167
|
-
interface UTMParams {
|
|
167
|
+
export interface UTMParams {
|
|
168
168
|
/** Referrer of the traffic, matched against GA4 source lists (search/social/video/shopping sites) */
|
|
169
169
|
utm_source?: 'google' | 'bing' | 'baidu' | 'duckduckgo' | 'yahoo' | 'yandex' | 'meta' | 'facebook' | 'instagram' | 'twitter' | 'x' | 'linkedin' | 'tiktok' | 'pinterest' | 'reddit' | 'snapchat' | 'youtube' | 'vimeo' | 'twitch' | 'newsletter' | 'email' | 'sms' | 'firebase' | '(direct)' | (string & {});
|
|
170
170
|
/**
|
|
@@ -198,11 +198,11 @@ interface UTMParams {
|
|
|
198
198
|
/** Targeting criteria applied to the campaign */
|
|
199
199
|
utm_marketing_tactic?: 'remarketing' | 'prospecting' | (string & {});
|
|
200
200
|
}
|
|
201
|
-
interface TrackTags extends PlatformInfo, DeviceInfo, AppInfo, EnvironmentInfo, PageInfo, AdvertisingInfo, UTMParams {
|
|
201
|
+
export interface TrackTags extends PlatformInfo, DeviceInfo, AppInfo, EnvironmentInfo, PageInfo, AdvertisingInfo, UTMParams {
|
|
202
202
|
idempotency_key?: string;
|
|
203
203
|
[key: string]: string | number | boolean | null | undefined;
|
|
204
204
|
}
|
|
205
|
-
interface TrackEvent<T extends EventName = EventName> {
|
|
205
|
+
export interface TrackEvent<T extends EventName = EventName> {
|
|
206
206
|
id: string;
|
|
207
207
|
name: TrackName<T>;
|
|
208
208
|
tags: TrackTags;
|
|
@@ -213,10 +213,9 @@ interface TrackEvent<T extends EventName = EventName> {
|
|
|
213
213
|
properties?: TrackProperties<T>;
|
|
214
214
|
created_at: string;
|
|
215
215
|
}
|
|
216
|
-
type TrackEventResponse = {
|
|
216
|
+
export type TrackEventResponse = {
|
|
217
217
|
/** track event id: Meta Pixel will use event_id and event_name for deduplication */
|
|
218
218
|
id: string;
|
|
219
219
|
}[];
|
|
220
220
|
//#endregion
|
|
221
|
-
export { AdvertisingInfo, AllowedPropertyValues, AppInfo, CustomEventProperties, DeviceInfo, Environment, EnvironmentInfo, EventName, PageInfo, Platform, PlatformInfo, ThirdPartyTracker, TrackEvent, TrackEventResponse, TrackName, TrackProperties, TrackTags, UTMParams, UserData, UserProvidedData };
|
|
222
221
|
//# sourceMappingURL=types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","names":[],"sources":["../../src/track/types.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":["GAUserProvidedData"],"sources":["../../src/track/types.ts"],"mappings":";;YAEY;YACA,YAAY;YAEZ,UAAU,UAAU,YAAY,aAAa,gBAAgB,iBACrE,IACA;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+Ba;;;;;;;KAQZ,oBAAoB,KAAK,gBAAgB,wBAC1C,sBAAsB;YAGd,gBAAgB,UAAU,YAAY,aAAa,gBAAgB,iBAC3E,eAAe,KAAK,oBAAoB,KACxC,gBAAgB,wBACd,sBAAsB,KACtB,OAAO,mBAAmB;YAEpB;YACA;iBAEK;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe,yBAAyBA;EACxC;EACA;EACA;EACA;EACA;IAAa;IAAc;IAAe;;EAE1C;EACA;;YAGU,qBAAqB,UAAU,WACzC,MAAM,UAAU,IAChB,aAAa,gBAAgB,IAC7B;iBAGe;EACf;EACA;EACA;EACA;EACA;EACA;;iBAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe;;EAEf;EACA;;iBAGe;EACf;EACA;EACA;;;;;;;;;;iBAWe;EACf;EACA;EACA;;;;;;;EAOA;;;;;;EAMA;;iBAGe;;;;;;;EAOf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;;EAEA;EACA;;EAEA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;;iBAQe;;EAEf;;;;;;;;;;;;EAqCA;;;;;;EAuDA;;EAMA;;EAEA;;EAEA;;EAEA;;EAUA;;EAEA;;iBAGe,kBACP,cAAc,YAAY,SAAS,iBAAiB,UAAU,iBAAiB;EACvF;GACC;;iBAGc,WAAW,UAAU,YAAY;EAChD;EACA,MAAM,UAAU;EAChB,MAAM;EACN;EACA;EACA,UAAU;EACV,aAAa;EACb,aAAa,gBAAgB;EAC7B;;YAGU;;EAEV"}
|
package/dist/track/uetq.d.cts
CHANGED
|
@@ -20,9 +20,9 @@ import { EventName, TrackName, TrackProperties } from "./types.cjs";
|
|
|
20
20
|
* https://learn.microsoft.com/en-us/advertising/msa-help/hlp_ba_conc_uet_enhancedconversions
|
|
21
21
|
*/
|
|
22
22
|
/** The retail `ecomm_pagetype` values UET validates against. */
|
|
23
|
-
type UETPageType = 'home' | 'searchresults' | 'category' | 'product' | 'cart' | 'purchase' | 'other';
|
|
23
|
+
export type UETPageType = 'home' | 'searchresults' | 'category' | 'product' | 'cart' | 'purchase' | 'other';
|
|
24
24
|
/** One entry of the `items` array (`items.*` in bat.js's `knownParams`). */
|
|
25
|
-
interface UETItem {
|
|
25
|
+
export interface UETItem {
|
|
26
26
|
id?: string;
|
|
27
27
|
name?: string;
|
|
28
28
|
brand?: string;
|
|
@@ -39,12 +39,12 @@ interface UETItem {
|
|
|
39
39
|
* browser before anything leaves the page (bat.js `validatePid`), and rejects a phone that is
|
|
40
40
|
* not E.164 after stripping separators.
|
|
41
41
|
*/
|
|
42
|
-
interface UETPid {
|
|
42
|
+
export interface UETPid {
|
|
43
43
|
em?: string;
|
|
44
44
|
ph?: string;
|
|
45
45
|
}
|
|
46
46
|
/** The parameters of one `uetq.push('event', action, params)` call. */
|
|
47
|
-
interface UETEventParams {
|
|
47
|
+
export interface UETEventParams {
|
|
48
48
|
/** Deduplicates against the same event sent through the Conversions API. */
|
|
49
49
|
event_id?: string;
|
|
50
50
|
event_category?: string;
|
|
@@ -69,7 +69,7 @@ interface UETEventParams {
|
|
|
69
69
|
ecomm_category?: string;
|
|
70
70
|
pid?: UETPid;
|
|
71
71
|
}
|
|
72
|
-
type UETConsent = {
|
|
72
|
+
export type UETConsent = {
|
|
73
73
|
ad_storage: 'granted' | 'denied';
|
|
74
74
|
/**
|
|
75
75
|
* `default` only: milliseconds to hold events for an `update` before acting on the default,
|
|
@@ -83,7 +83,7 @@ type UETConsent = {
|
|
|
83
83
|
* `window.uetq` is a plain array until `bat.js` loads (the snippet does `w[u] = w[u] || []`), then
|
|
84
84
|
* a `UET` instance that drains the queue; both expose `push`, which is all this SDK uses.
|
|
85
85
|
*/
|
|
86
|
-
interface UETQ {
|
|
86
|
+
export interface UETQ {
|
|
87
87
|
push(command: 'event', action: string, params?: UETEventParams): void;
|
|
88
88
|
push(command: 'pageLoad'): void;
|
|
89
89
|
push(command: 'set', params: {
|
|
@@ -92,7 +92,7 @@ interface UETQ {
|
|
|
92
92
|
push(command: 'consent', mode: 'default' | 'update', consent: UETConsent): void;
|
|
93
93
|
}
|
|
94
94
|
/** GA4 `Item` → UET `items[]` entry. Undefined fields are left for the caller to strip. */
|
|
95
|
-
declare function mapItems(items?: Item[]): undefined | UETItem[];
|
|
95
|
+
export declare function mapItems(items?: Item[]): undefined | UETItem[];
|
|
96
96
|
/**
|
|
97
97
|
* Map an internal track event onto a UET action and its parameters.
|
|
98
98
|
*
|
|
@@ -105,7 +105,6 @@ declare function mapItems(items?: Item[]): undefined | UETItem[];
|
|
|
105
105
|
* one the snippet fires on load and `enableAutoSpaTracking` fires on history changes), so the
|
|
106
106
|
* browser tracker does not forward it — see `sendUETEvent`.
|
|
107
107
|
*/
|
|
108
|
-
declare function mapUETEvent<T extends EventName>(name: TrackName<T>, properties?: TrackProperties<T>, eventId?: string): [string, UETEventParams];
|
|
108
|
+
export declare function mapUETEvent<T extends EventName>(name: TrackName<T>, properties?: TrackProperties<T>, eventId?: string): [string, UETEventParams];
|
|
109
109
|
//#endregion
|
|
110
|
-
export { UETConsent, UETEventParams, UETItem, UETPageType, UETPid, UETQ, mapItems, mapUETEvent };
|
|
111
110
|
//# sourceMappingURL=uetq.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uetq.d.cts","names":[],"sources":["../../src/track/uetq.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"uetq.d.cts","names":[],"sources":["../../src/track/uetq.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;YAuBY;;iBAUK;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;;iBAQe;EACf;EACA;;;iBAIe;;EAEf;EACA;EACA;EACA;;EAEA;;EAEA;EACA;EACA;EACA;EACA;EACA,QAAQ;EACR;EACA;EACA;EACA;EACA;EACA,iBAAiB;EACjB;EACA;EACA,MAAM;;YAGI;EACV;;;;;;;EAOA;;;;;;iBAOe;EACf,KAAK,kBAAkB,gBAAgB,SAAS;EAChD,KAAK;EACL,KAAK,gBAAgB;IAAU,MAAM;;EACrC,KAAK,oBAAoB,4BAA4B,SAAS;;;wBAIhD,SAAS,QAAQ,qBAAqB;;;;;;;;;;;;;wBAuDtC,YAAY,UAAU,WACpC,MAAM,UAAU,IAChB,aAAa,gBAAgB,IAC7B,4BACU"}
|
package/dist/track/uetq.d.mts
CHANGED
|
@@ -20,9 +20,9 @@ import { EventName, TrackName, TrackProperties } from "./types.mjs";
|
|
|
20
20
|
* https://learn.microsoft.com/en-us/advertising/msa-help/hlp_ba_conc_uet_enhancedconversions
|
|
21
21
|
*/
|
|
22
22
|
/** The retail `ecomm_pagetype` values UET validates against. */
|
|
23
|
-
type UETPageType = 'home' | 'searchresults' | 'category' | 'product' | 'cart' | 'purchase' | 'other';
|
|
23
|
+
export type UETPageType = 'home' | 'searchresults' | 'category' | 'product' | 'cart' | 'purchase' | 'other';
|
|
24
24
|
/** One entry of the `items` array (`items.*` in bat.js's `knownParams`). */
|
|
25
|
-
interface UETItem {
|
|
25
|
+
export interface UETItem {
|
|
26
26
|
id?: string;
|
|
27
27
|
name?: string;
|
|
28
28
|
brand?: string;
|
|
@@ -39,12 +39,12 @@ interface UETItem {
|
|
|
39
39
|
* browser before anything leaves the page (bat.js `validatePid`), and rejects a phone that is
|
|
40
40
|
* not E.164 after stripping separators.
|
|
41
41
|
*/
|
|
42
|
-
interface UETPid {
|
|
42
|
+
export interface UETPid {
|
|
43
43
|
em?: string;
|
|
44
44
|
ph?: string;
|
|
45
45
|
}
|
|
46
46
|
/** The parameters of one `uetq.push('event', action, params)` call. */
|
|
47
|
-
interface UETEventParams {
|
|
47
|
+
export interface UETEventParams {
|
|
48
48
|
/** Deduplicates against the same event sent through the Conversions API. */
|
|
49
49
|
event_id?: string;
|
|
50
50
|
event_category?: string;
|
|
@@ -69,7 +69,7 @@ interface UETEventParams {
|
|
|
69
69
|
ecomm_category?: string;
|
|
70
70
|
pid?: UETPid;
|
|
71
71
|
}
|
|
72
|
-
type UETConsent = {
|
|
72
|
+
export type UETConsent = {
|
|
73
73
|
ad_storage: 'granted' | 'denied';
|
|
74
74
|
/**
|
|
75
75
|
* `default` only: milliseconds to hold events for an `update` before acting on the default,
|
|
@@ -83,7 +83,7 @@ type UETConsent = {
|
|
|
83
83
|
* `window.uetq` is a plain array until `bat.js` loads (the snippet does `w[u] = w[u] || []`), then
|
|
84
84
|
* a `UET` instance that drains the queue; both expose `push`, which is all this SDK uses.
|
|
85
85
|
*/
|
|
86
|
-
interface UETQ {
|
|
86
|
+
export interface UETQ {
|
|
87
87
|
push(command: 'event', action: string, params?: UETEventParams): void;
|
|
88
88
|
push(command: 'pageLoad'): void;
|
|
89
89
|
push(command: 'set', params: {
|
|
@@ -92,7 +92,7 @@ interface UETQ {
|
|
|
92
92
|
push(command: 'consent', mode: 'default' | 'update', consent: UETConsent): void;
|
|
93
93
|
}
|
|
94
94
|
/** GA4 `Item` → UET `items[]` entry. Undefined fields are left for the caller to strip. */
|
|
95
|
-
declare function mapItems(items?: Item[]): undefined | UETItem[];
|
|
95
|
+
export declare function mapItems(items?: Item[]): undefined | UETItem[];
|
|
96
96
|
/**
|
|
97
97
|
* Map an internal track event onto a UET action and its parameters.
|
|
98
98
|
*
|
|
@@ -105,7 +105,6 @@ declare function mapItems(items?: Item[]): undefined | UETItem[];
|
|
|
105
105
|
* one the snippet fires on load and `enableAutoSpaTracking` fires on history changes), so the
|
|
106
106
|
* browser tracker does not forward it — see `sendUETEvent`.
|
|
107
107
|
*/
|
|
108
|
-
declare function mapUETEvent<T extends EventName>(name: TrackName<T>, properties?: TrackProperties<T>, eventId?: string): [string, UETEventParams];
|
|
108
|
+
export declare function mapUETEvent<T extends EventName>(name: TrackName<T>, properties?: TrackProperties<T>, eventId?: string): [string, UETEventParams];
|
|
109
109
|
//#endregion
|
|
110
|
-
export { UETConsent, UETEventParams, UETItem, UETPageType, UETPid, UETQ, mapItems, mapUETEvent };
|
|
111
110
|
//# sourceMappingURL=uetq.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uetq.d.mts","names":[],"sources":["../../src/track/uetq.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"uetq.d.mts","names":[],"sources":["../../src/track/uetq.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;YAuBY;;iBAUK;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;;iBAQe;EACf;EACA;;;iBAIe;;EAEf;EACA;EACA;EACA;;EAEA;;EAEA;EACA;EACA;EACA;EACA;EACA,QAAQ;EACR;EACA;EACA;EACA;EACA;EACA,iBAAiB;EACjB;EACA;EACA,MAAM;;YAGI;EACV;;;;;;;EAOA;;;;;;iBAOe;EACf,KAAK,kBAAkB,gBAAgB,SAAS;EAChD,KAAK;EACL,KAAK,gBAAgB;IAAU,MAAM;;EACrC,KAAK,oBAAoB,4BAA4B,SAAS;;;wBAIhD,SAAS,QAAQ,qBAAqB;;;;;;;;;;;;;wBAuDtC,YAAY,UAAU,WACpC,MAAM,UAAU,IAChB,aAAa,gBAAgB,IAC7B,4BACU"}
|
package/dist/utils/field.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.d.cts","names":[],"sources":["../../src/utils/field.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"field.d.cts","names":[],"sources":["../../src/utils/field.ts"],"mappings":";wBAAgB,SAAS,GAAG,OAAO,IAAI,kBAAe"}
|
package/dist/utils/field.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.d.mts","names":[],"sources":["../../src/utils/field.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"field.d.mts","names":[],"sources":["../../src/utils/field.ts"],"mappings":";wBAAgB,SAAS,GAAG,OAAO,IAAI,kBAAe"}
|
package/dist/utils/sha256.d.cts
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* Asynchronous because `crypto.subtle.digest` is; it rejects where SubtleCrypto is unavailable
|
|
8
8
|
* (an insecure context), so callers decide what to send without the hash.
|
|
9
9
|
*/
|
|
10
|
-
declare function sha256(value: string): Promise<string>;
|
|
10
|
+
export declare function sha256(value: string): Promise<string>;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { sha256 };
|
|
13
12
|
//# sourceMappingURL=sha256.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sha256.d.cts","names":[],"sources":["../../src/utils/sha256.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"sha256.d.cts","names":[],"sources":["../../src/utils/sha256.ts"],"mappings":";;;;;;;;;wBAQsB,OAAO,gBAAgB"}
|
package/dist/utils/sha256.d.mts
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* Asynchronous because `crypto.subtle.digest` is; it rejects where SubtleCrypto is unavailable
|
|
8
8
|
* (an insecure context), so callers decide what to send without the hash.
|
|
9
9
|
*/
|
|
10
|
-
declare function sha256(value: string): Promise<string>;
|
|
10
|
+
export declare function sha256(value: string): Promise<string>;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { sha256 };
|
|
13
12
|
//# sourceMappingURL=sha256.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sha256.d.mts","names":[],"sources":["../../src/utils/sha256.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"sha256.d.mts","names":[],"sources":["../../src/utils/sha256.ts"],"mappings":";;;;;;;;;wBAQsB,OAAO,gBAAgB"}
|
package/dist/utils/stripe.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
//#region src/utils/stripe.d.ts
|
|
2
|
-
declare const ZERO_DECIMAL_CURRENCIES: string[];
|
|
2
|
+
export declare const ZERO_DECIMAL_CURRENCIES: string[];
|
|
3
3
|
/** reference: https://docs.stripe.com/currencies#zero-decimal */
|
|
4
|
-
declare function stripeMinorUnits(currency: string): 1 | 100;
|
|
4
|
+
export declare function stripeMinorUnits(currency: string): 1 | 100;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { ZERO_DECIMAL_CURRENCIES, stripeMinorUnits };
|
|
7
6
|
//# sourceMappingURL=stripe.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe.d.cts","names":[],"sources":["../../src/utils/stripe.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"stripe.d.cts","names":[],"sources":["../../src/utils/stripe.ts"],"mappings":";qBAAa;;wBAoBG,iBAAiB"}
|
package/dist/utils/stripe.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
//#region src/utils/stripe.d.ts
|
|
2
|
-
declare const ZERO_DECIMAL_CURRENCIES: string[];
|
|
2
|
+
export declare const ZERO_DECIMAL_CURRENCIES: string[];
|
|
3
3
|
/** reference: https://docs.stripe.com/currencies#zero-decimal */
|
|
4
|
-
declare function stripeMinorUnits(currency: string): 1 | 100;
|
|
4
|
+
export declare function stripeMinorUnits(currency: string): 1 | 100;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { ZERO_DECIMAL_CURRENCIES, stripeMinorUnits };
|
|
7
6
|
//# sourceMappingURL=stripe.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe.d.mts","names":[],"sources":["../../src/utils/stripe.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"stripe.d.mts","names":[],"sources":["../../src/utils/stripe.ts"],"mappings":";qBAAa;;wBAoBG,iBAAiB"}
|
package/dist/visitor/index.d.cts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { UpdateVisitorDTO } from "../schema/index.cjs";
|
|
2
2
|
import { Visitor } from "./types.cjs";
|
|
3
3
|
//#region src/visitor/index.d.ts
|
|
4
|
-
declare function getVisitor(): Promise<Visitor>;
|
|
5
|
-
declare function setVisitor(dto: Omit<UpdateVisitorDTO, 'tags'>): Promise<Visitor>;
|
|
4
|
+
export declare function getVisitor(): Promise<Visitor>;
|
|
5
|
+
export declare function setVisitor(dto: Omit<UpdateVisitorDTO, 'tags'>): Promise<Visitor>;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { getVisitor, setVisitor };
|
|
8
7
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/visitor/index.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/visitor/index.ts"],"mappings":";;;wBAkEsB,cAAc,QAAQ;wBAetB,WAAW,KAAK,KAAK,4BAAyB,QAAA"}
|
package/dist/visitor/index.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { UpdateVisitorDTO } from "../schema/index.mjs";
|
|
2
2
|
import { Visitor } from "./types.mjs";
|
|
3
3
|
//#region src/visitor/index.d.ts
|
|
4
|
-
declare function getVisitor(): Promise<Visitor>;
|
|
5
|
-
declare function setVisitor(dto: Omit<UpdateVisitorDTO, 'tags'>): Promise<Visitor>;
|
|
4
|
+
export declare function getVisitor(): Promise<Visitor>;
|
|
5
|
+
export declare function setVisitor(dto: Omit<UpdateVisitorDTO, 'tags'>): Promise<Visitor>;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { getVisitor, setVisitor };
|
|
8
7
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/visitor/index.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/visitor/index.ts"],"mappings":";;;wBAkEsB,cAAc,QAAQ;wBAetB,WAAW,KAAK,KAAK,4BAAyB,QAAA"}
|
package/dist/visitor/types.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Environment, Platform, TrackTags } from "../track/types.cjs";
|
|
2
2
|
import { UpdateVisitorDTO } from "../schema/index.cjs";
|
|
3
3
|
//#region src/visitor/types.d.ts
|
|
4
|
-
type VisitorProperties = Record<Lowercase<string>, string | number | boolean | null>;
|
|
5
|
-
interface Visitor {
|
|
4
|
+
export type VisitorProperties = Record<Lowercase<string>, string | number | boolean | null>;
|
|
5
|
+
export interface Visitor {
|
|
6
6
|
id: string;
|
|
7
7
|
/**
|
|
8
8
|
* The person this visitor belongs to, kept by the server: the visitor's own id until someone
|
|
@@ -20,8 +20,7 @@ interface Visitor {
|
|
|
20
20
|
* What a third-party user setter is handed after `setVisitor`: the payload that was sent, plus
|
|
21
21
|
* the server's `distinct_id` for the visitor as it now stands.
|
|
22
22
|
*/
|
|
23
|
-
type VisitorIdentity = UpdateVisitorDTO & Pick<Visitor, 'distinct_id'>;
|
|
24
|
-
type ThirdPartyUserSetter = (identity: VisitorIdentity) => void;
|
|
23
|
+
export type VisitorIdentity = UpdateVisitorDTO & Pick<Visitor, 'distinct_id'>;
|
|
24
|
+
export type ThirdPartyUserSetter = (identity: VisitorIdentity) => void;
|
|
25
25
|
//#endregion
|
|
26
|
-
export { ThirdPartyUserSetter, Visitor, VisitorIdentity, VisitorProperties };
|
|
27
26
|
//# sourceMappingURL=types.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","names":[],"sources":["../../src/visitor/types.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":[],"sources":["../../src/visitor/types.ts"],"mappings":";;;YAGY,oBAAoB,OAAO;iBAEtB;EACf;;;;;;;EAOA;EACA;EACA,UAAU;EACV,aAAa;EACb,MAAM;;;;;;YAOI,kBAAkB,mBAAmB,KAAK;YAE1C,wBAAwB,UAAU"}
|
package/dist/visitor/types.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Environment, Platform, TrackTags } from "../track/types.mjs";
|
|
2
2
|
import { UpdateVisitorDTO } from "../schema/index.mjs";
|
|
3
3
|
//#region src/visitor/types.d.ts
|
|
4
|
-
type VisitorProperties = Record<Lowercase<string>, string | number | boolean | null>;
|
|
5
|
-
interface Visitor {
|
|
4
|
+
export type VisitorProperties = Record<Lowercase<string>, string | number | boolean | null>;
|
|
5
|
+
export interface Visitor {
|
|
6
6
|
id: string;
|
|
7
7
|
/**
|
|
8
8
|
* The person this visitor belongs to, kept by the server: the visitor's own id until someone
|
|
@@ -20,8 +20,7 @@ interface Visitor {
|
|
|
20
20
|
* What a third-party user setter is handed after `setVisitor`: the payload that was sent, plus
|
|
21
21
|
* the server's `distinct_id` for the visitor as it now stands.
|
|
22
22
|
*/
|
|
23
|
-
type VisitorIdentity = UpdateVisitorDTO & Pick<Visitor, 'distinct_id'>;
|
|
24
|
-
type ThirdPartyUserSetter = (identity: VisitorIdentity) => void;
|
|
23
|
+
export type VisitorIdentity = UpdateVisitorDTO & Pick<Visitor, 'distinct_id'>;
|
|
24
|
+
export type ThirdPartyUserSetter = (identity: VisitorIdentity) => void;
|
|
25
25
|
//#endregion
|
|
26
|
-
export { ThirdPartyUserSetter, Visitor, VisitorIdentity, VisitorProperties };
|
|
27
26
|
//# sourceMappingURL=types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","names":[],"sources":["../../src/visitor/types.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":[],"sources":["../../src/visitor/types.ts"],"mappings":";;;YAGY,oBAAoB,OAAO;iBAEtB;EACf;;;;;;;EAOA;EACA;EACA,UAAU;EACV,aAAa;EACb,MAAM;;;;;;YAOI,kBAAkB,mBAAmB,KAAK;YAE1C,wBAAwB,UAAU"}
|
package/dist/web/index.d.cts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { TrackTags } from "../track/types.cjs";
|
|
2
2
|
import { Storage } from "../setup/index.cjs";
|
|
3
3
|
//#region src/web/index.d.ts
|
|
4
|
-
declare function getDeviceId(): string;
|
|
5
|
-
declare function getTags(): Promise<TrackTags>;
|
|
6
|
-
declare const storage: Storage;
|
|
4
|
+
export declare function getDeviceId(): string;
|
|
5
|
+
export declare function getTags(): Promise<TrackTags>;
|
|
6
|
+
export declare const storage: Storage;
|
|
7
7
|
//#endregion
|
|
8
|
-
export { getDeviceId, getTags, storage };
|
|
9
8
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/web/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/web/index.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/web/index.ts"],"mappings":";;;wBAgBgB;wBAiDM,WAAO,QAAA;qBAiGhB,SAAS"}
|
package/dist/web/index.d.mts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { TrackTags } from "../track/types.mjs";
|
|
2
2
|
import { Storage } from "../setup/index.mjs";
|
|
3
3
|
//#region src/web/index.d.ts
|
|
4
|
-
declare function getDeviceId(): string;
|
|
5
|
-
declare function getTags(): Promise<TrackTags>;
|
|
6
|
-
declare const storage: Storage;
|
|
4
|
+
export declare function getDeviceId(): string;
|
|
5
|
+
export declare function getTags(): Promise<TrackTags>;
|
|
6
|
+
export declare const storage: Storage;
|
|
7
7
|
//#endregion
|
|
8
|
-
export { getDeviceId, getTags, storage };
|
|
9
8
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/web/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/web/index.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/web/index.ts"],"mappings":";;;wBAgBgB;wBAiDM,WAAO,QAAA;qBAiGhB,SAAS"}
|
package/dist/web/page-key.d.cts
CHANGED
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
* `pathname` plus the query with tracking parameters removed and the rest sorted, so two URLs
|
|
19
19
|
* that differ only in tracking decoration or parameter order map to one key.
|
|
20
20
|
*/
|
|
21
|
-
declare function getPageKey(pathname: string, search?: string): string;
|
|
21
|
+
export declare function getPageKey(pathname: string, search?: string): string;
|
|
22
22
|
//#endregion
|
|
23
|
-
export { getPageKey };
|
|
24
23
|
//# sourceMappingURL=page-key.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-key.d.cts","names":[],"sources":["../../src/web/page-key.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"page-key.d.cts","names":[],"sources":["../../src/web/page-key.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;wBA2CgB,WAAW,kBAAkB"}
|
package/dist/web/page-key.d.mts
CHANGED
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
* `pathname` plus the query with tracking parameters removed and the rest sorted, so two URLs
|
|
19
19
|
* that differ only in tracking decoration or parameter order map to one key.
|
|
20
20
|
*/
|
|
21
|
-
declare function getPageKey(pathname: string, search?: string): string;
|
|
21
|
+
export declare function getPageKey(pathname: string, search?: string): string;
|
|
22
22
|
//#endregion
|
|
23
|
-
export { getPageKey };
|
|
24
23
|
//# sourceMappingURL=page-key.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-key.d.mts","names":[],"sources":["../../src/web/page-key.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"page-key.d.mts","names":[],"sources":["../../src/web/page-key.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;wBA2CgB,WAAW,kBAAkB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shware/analytics",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.13.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -146,45 +146,45 @@
|
|
|
146
146
|
"access": "public"
|
|
147
147
|
},
|
|
148
148
|
"dependencies": {
|
|
149
|
-
"@shware/utils": "^1.6.
|
|
150
|
-
"capi-param-builder-nodejs": "~1.3.
|
|
149
|
+
"@shware/utils": "^1.6.2",
|
|
150
|
+
"capi-param-builder-nodejs": "~1.3.2",
|
|
151
151
|
"cookie": "^2.0.1",
|
|
152
152
|
"uuid": "^14.0.2",
|
|
153
|
-
"web-vitals": "^6.2.
|
|
154
|
-
"zod": "^4.
|
|
153
|
+
"web-vitals": "^6.2.2",
|
|
154
|
+
"zod": "^4.6.5"
|
|
155
155
|
},
|
|
156
156
|
"devDependencies": {
|
|
157
157
|
"@repo/typescript-config": "0.0.0",
|
|
158
|
-
"@testing-library/react": "^16.3.
|
|
158
|
+
"@testing-library/react": "^16.3.3",
|
|
159
159
|
"@types/facebook-nodejs-business-sdk": "^24.0.0",
|
|
160
|
-
"@types/node": "^26.3
|
|
161
|
-
"@types/react": "^19.
|
|
162
|
-
"@vitest/coverage-v8": "^
|
|
160
|
+
"@types/node": "^26.6.3",
|
|
161
|
+
"@types/react": "^19.3.0",
|
|
162
|
+
"@vitest/coverage-v8": "^5.0.2",
|
|
163
163
|
"bowser": "^2.14.1",
|
|
164
|
-
"jsdom": "^30.
|
|
165
|
-
"react-dom": "^19.
|
|
164
|
+
"jsdom": "^30.1.1",
|
|
165
|
+
"react-dom": "^19.3.0",
|
|
166
166
|
"typescript": "^7.0.2",
|
|
167
|
-
"vitest": "^
|
|
167
|
+
"vitest": "^5.0.2"
|
|
168
168
|
},
|
|
169
169
|
"peerDependencies": {
|
|
170
|
-
"@react-native-firebase/analytics": "^26.
|
|
171
|
-
"@tanstack/react-router": "^1.170.
|
|
172
|
-
"@tanstack/react-start": "^1.168.
|
|
173
|
-
"expo-application": "^57.0.
|
|
174
|
-
"expo-clipboard": "^57.0.
|
|
175
|
-
"expo-crypto": "^57.0.
|
|
176
|
-
"expo-device": "^57.0.
|
|
177
|
-
"expo-localization": "^57.0.
|
|
178
|
-
"expo-sqlite": "^57.0.
|
|
179
|
-
"expo-tracking-transparency": "^57.0.
|
|
170
|
+
"@react-native-firebase/analytics": "^26.4.0",
|
|
171
|
+
"@tanstack/react-router": "^1.170.39",
|
|
172
|
+
"@tanstack/react-start": "^1.168.58",
|
|
173
|
+
"expo-application": "^57.0.3",
|
|
174
|
+
"expo-clipboard": "^57.0.2",
|
|
175
|
+
"expo-crypto": "^57.0.3",
|
|
176
|
+
"expo-device": "^57.0.2",
|
|
177
|
+
"expo-localization": "^57.0.2",
|
|
178
|
+
"expo-sqlite": "^57.0.3",
|
|
179
|
+
"expo-tracking-transparency": "^57.0.2",
|
|
180
180
|
"facebook-nodejs-business-sdk": "^24.0.1",
|
|
181
|
-
"next": "^16.3.
|
|
182
|
-
"posthog-js": "^1.
|
|
183
|
-
"react": "^19.
|
|
184
|
-
"react-native": "^0.87.
|
|
181
|
+
"next": "^16.3.6",
|
|
182
|
+
"posthog-js": "^1.434.15",
|
|
183
|
+
"react": "^19.3.0",
|
|
184
|
+
"react-native": "^0.87.1",
|
|
185
185
|
"react-native-fbsdk-next": "^13.4.3",
|
|
186
186
|
"react-native-url-polyfill": "^4.0.0",
|
|
187
|
-
"react-router": "^8.
|
|
187
|
+
"react-router": "^8.4.0"
|
|
188
188
|
},
|
|
189
189
|
"peerDependenciesMeta": {
|
|
190
190
|
"@react-native-firebase/analytics": {
|