rozmova-analytics 1.1.47 → 1.1.49
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.cjs +160 -0
- package/dist/index.d.cts +127 -0
- package/dist/index.d.ts +73 -3
- package/dist/index.js +118 -31990
- package/dist/index.umd.js +151 -2
- package/package.json +41 -42
- package/dist/analytics.d.ts +0 -21
- package/dist/constants.d.ts +0 -12
- package/dist/cookieConsentBanner.d.ts +0 -1
- package/dist/helpers.d.ts +0 -21
- package/dist/index.esm.js +0 -32030
- package/dist/types.d.ts +0 -68
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { Config, Dict } from 'mixpanel-browser';
|
|
2
|
+
|
|
3
|
+
type AnalyticsCommonParams = {
|
|
4
|
+
utm_source: string;
|
|
5
|
+
utm_medium: string;
|
|
6
|
+
utm_campaign: string;
|
|
7
|
+
utm_campaign_id: string;
|
|
8
|
+
utm_advertiser_id: string;
|
|
9
|
+
utm_adset_id: string;
|
|
10
|
+
utm_adset_name: string;
|
|
11
|
+
utm_ad_id: string;
|
|
12
|
+
utm_ad_name: string;
|
|
13
|
+
utm_keyword: string;
|
|
14
|
+
referrer: string;
|
|
15
|
+
search_query: string;
|
|
16
|
+
landing_page_url: string;
|
|
17
|
+
fbp?: string;
|
|
18
|
+
fbc?: string;
|
|
19
|
+
session_id: string | null;
|
|
20
|
+
user_pseudo_id: string;
|
|
21
|
+
funnel_name?: string;
|
|
22
|
+
language: string;
|
|
23
|
+
platform: string;
|
|
24
|
+
url: string;
|
|
25
|
+
device: string;
|
|
26
|
+
browser: string;
|
|
27
|
+
system: string;
|
|
28
|
+
rid: string;
|
|
29
|
+
locale: string;
|
|
30
|
+
logged_in: boolean;
|
|
31
|
+
user_id: string;
|
|
32
|
+
};
|
|
33
|
+
type EventParams = Record<string, unknown>;
|
|
34
|
+
interface UserAttributionProperties {
|
|
35
|
+
funnelInfo?: {
|
|
36
|
+
funnelType?: string | null;
|
|
37
|
+
funnelName?: string | null;
|
|
38
|
+
platform: string;
|
|
39
|
+
listName: string | null;
|
|
40
|
+
index: number | string | null;
|
|
41
|
+
placement: string | null;
|
|
42
|
+
rankingSessionId?: string | null;
|
|
43
|
+
};
|
|
44
|
+
trackingParams?: {
|
|
45
|
+
source: string;
|
|
46
|
+
medium: string;
|
|
47
|
+
advertiserId: string;
|
|
48
|
+
campaignId: string;
|
|
49
|
+
campaignName: string;
|
|
50
|
+
adsetId: string;
|
|
51
|
+
adId: string;
|
|
52
|
+
adName: string;
|
|
53
|
+
keyword: string;
|
|
54
|
+
searchQuery: string;
|
|
55
|
+
referrer: string;
|
|
56
|
+
landingPageUrl: string;
|
|
57
|
+
};
|
|
58
|
+
externalAnalyticsUserInfo?: {
|
|
59
|
+
gaSessionId: string | null;
|
|
60
|
+
gaClientId: string | null;
|
|
61
|
+
rid: string;
|
|
62
|
+
fbp?: string;
|
|
63
|
+
fbc?: string;
|
|
64
|
+
mxDistinctId?: string | null;
|
|
65
|
+
cioAnonId?: string;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
type ForcedAttributionProperties = {
|
|
69
|
+
funnelName?: string;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
type GConfig = {
|
|
73
|
+
userId?: string;
|
|
74
|
+
email?: string;
|
|
75
|
+
};
|
|
76
|
+
declare class Analytics {
|
|
77
|
+
private initialized;
|
|
78
|
+
private locale;
|
|
79
|
+
private platform;
|
|
80
|
+
private isProd;
|
|
81
|
+
private dataLayer;
|
|
82
|
+
private lastGConfig;
|
|
83
|
+
private mxDistinctId;
|
|
84
|
+
init({ isProd, locale, platform, isClearly, config, trackPageScroll, mixpanelConfig, }?: {
|
|
85
|
+
isProd?: boolean;
|
|
86
|
+
locale?: string;
|
|
87
|
+
platform?: string;
|
|
88
|
+
isClearly?: boolean;
|
|
89
|
+
config?: GConfig;
|
|
90
|
+
trackPageScroll?: boolean;
|
|
91
|
+
mixpanelConfig?: Partial<Config>;
|
|
92
|
+
}): Promise<void>;
|
|
93
|
+
private processDataLayer;
|
|
94
|
+
getGAClientId(): Promise<string | null>;
|
|
95
|
+
setGAClientId: (clientId: string) => void;
|
|
96
|
+
trackEvent(eventName: string, properties?: EventParams, services?: {
|
|
97
|
+
ga?: boolean;
|
|
98
|
+
mixpanel?: boolean;
|
|
99
|
+
customerIO?: boolean;
|
|
100
|
+
}): Promise<void>;
|
|
101
|
+
private setConfig;
|
|
102
|
+
trackPageView({ referrer }?: {
|
|
103
|
+
referrer?: string;
|
|
104
|
+
}): void;
|
|
105
|
+
setUser(userId: string, userParams: {
|
|
106
|
+
email: string;
|
|
107
|
+
name: string;
|
|
108
|
+
numberOfSessions: number;
|
|
109
|
+
locale: string;
|
|
110
|
+
phone?: string;
|
|
111
|
+
isB2B?: boolean;
|
|
112
|
+
CIOParams?: EventParams;
|
|
113
|
+
mixpanelParams?: Dict;
|
|
114
|
+
}): void;
|
|
115
|
+
getCommonParams(): AnalyticsCommonParams;
|
|
116
|
+
setLocale(newLocale: string): void;
|
|
117
|
+
resetUser(): void;
|
|
118
|
+
getUserId: () => string;
|
|
119
|
+
getAttributionProperties(forcedAttributionProperties?: ForcedAttributionProperties): Promise<UserAttributionProperties>;
|
|
120
|
+
trackPageScroll(customElement?: HTMLElement): () => void;
|
|
121
|
+
start_session_recording: () => void;
|
|
122
|
+
stop_session_recording: () => void;
|
|
123
|
+
trackFirstPartyEvent(eventName: string, properties?: EventParams, forcedAttributionProperties?: ForcedAttributionProperties): Promise<Response>;
|
|
124
|
+
}
|
|
125
|
+
declare const _default: Analytics;
|
|
126
|
+
|
|
127
|
+
export { _default as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,74 @@
|
|
|
1
|
-
import { Config, Dict } from
|
|
2
|
-
|
|
1
|
+
import { Config, Dict } from 'mixpanel-browser';
|
|
2
|
+
|
|
3
|
+
type AnalyticsCommonParams = {
|
|
4
|
+
utm_source: string;
|
|
5
|
+
utm_medium: string;
|
|
6
|
+
utm_campaign: string;
|
|
7
|
+
utm_campaign_id: string;
|
|
8
|
+
utm_advertiser_id: string;
|
|
9
|
+
utm_adset_id: string;
|
|
10
|
+
utm_adset_name: string;
|
|
11
|
+
utm_ad_id: string;
|
|
12
|
+
utm_ad_name: string;
|
|
13
|
+
utm_keyword: string;
|
|
14
|
+
referrer: string;
|
|
15
|
+
search_query: string;
|
|
16
|
+
landing_page_url: string;
|
|
17
|
+
fbp?: string;
|
|
18
|
+
fbc?: string;
|
|
19
|
+
session_id: string | null;
|
|
20
|
+
user_pseudo_id: string;
|
|
21
|
+
funnel_name?: string;
|
|
22
|
+
language: string;
|
|
23
|
+
platform: string;
|
|
24
|
+
url: string;
|
|
25
|
+
device: string;
|
|
26
|
+
browser: string;
|
|
27
|
+
system: string;
|
|
28
|
+
rid: string;
|
|
29
|
+
locale: string;
|
|
30
|
+
logged_in: boolean;
|
|
31
|
+
user_id: string;
|
|
32
|
+
};
|
|
33
|
+
type EventParams = Record<string, unknown>;
|
|
34
|
+
interface UserAttributionProperties {
|
|
35
|
+
funnelInfo?: {
|
|
36
|
+
funnelType?: string | null;
|
|
37
|
+
funnelName?: string | null;
|
|
38
|
+
platform: string;
|
|
39
|
+
listName: string | null;
|
|
40
|
+
index: number | string | null;
|
|
41
|
+
placement: string | null;
|
|
42
|
+
rankingSessionId?: string | null;
|
|
43
|
+
};
|
|
44
|
+
trackingParams?: {
|
|
45
|
+
source: string;
|
|
46
|
+
medium: string;
|
|
47
|
+
advertiserId: string;
|
|
48
|
+
campaignId: string;
|
|
49
|
+
campaignName: string;
|
|
50
|
+
adsetId: string;
|
|
51
|
+
adId: string;
|
|
52
|
+
adName: string;
|
|
53
|
+
keyword: string;
|
|
54
|
+
searchQuery: string;
|
|
55
|
+
referrer: string;
|
|
56
|
+
landingPageUrl: string;
|
|
57
|
+
};
|
|
58
|
+
externalAnalyticsUserInfo?: {
|
|
59
|
+
gaSessionId: string | null;
|
|
60
|
+
gaClientId: string | null;
|
|
61
|
+
rid: string;
|
|
62
|
+
fbp?: string;
|
|
63
|
+
fbc?: string;
|
|
64
|
+
mxDistinctId?: string | null;
|
|
65
|
+
cioAnonId?: string;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
type ForcedAttributionProperties = {
|
|
69
|
+
funnelName?: string;
|
|
70
|
+
};
|
|
71
|
+
|
|
3
72
|
type GConfig = {
|
|
4
73
|
userId?: string;
|
|
5
74
|
email?: string;
|
|
@@ -54,4 +123,5 @@ declare class Analytics {
|
|
|
54
123
|
trackFirstPartyEvent(eventName: string, properties?: EventParams, forcedAttributionProperties?: ForcedAttributionProperties): Promise<Response>;
|
|
55
124
|
}
|
|
56
125
|
declare const _default: Analytics;
|
|
57
|
-
|
|
126
|
+
|
|
127
|
+
export { _default as default };
|