@posthog/browser 0.1.1 → 0.2.0
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/ARCHITECTURE.md +28 -22
- package/README.md +65 -29
- package/dist/analytics-api.d.ts +26 -0
- package/dist/analytics-api.js +18 -0
- package/dist/analytics-api.mjs +1 -0
- package/dist/analytics-buffer.d.ts +3 -3
- package/dist/analytics-buffer.js +2 -161
- package/dist/analytics-buffer.mjs +2 -161
- package/dist/analytics-extension.d.ts +76 -0
- package/dist/analytics-extension.js +589 -0
- package/dist/analytics-extension.mjs +551 -0
- package/dist/analytics-internal.d.ts +32 -18
- package/dist/analytics-options.d.ts +7 -2
- package/dist/analytics-options.js +38 -1
- package/dist/analytics-options.mjs +17 -1
- package/dist/analytics.d.ts +4 -3
- package/dist/autocapture.d.ts +2 -2
- package/dist/autocapture.js +21 -10
- package/dist/autocapture.mjs +21 -10
- package/dist/automatic-analytics.d.ts +2 -2
- package/dist/browser-client.d.ts +44 -4
- package/dist/capture-properties.d.ts +9 -0
- package/dist/capture-properties.js +68 -0
- package/dist/capture-properties.mjs +30 -0
- package/dist/capture-v1.js +7 -19
- package/dist/capture-v1.mjs +1 -13
- package/dist/core.d.ts +7 -5
- package/dist/extensions/registry.d.ts +42 -7
- package/dist/extensions/registry.js +194 -37
- package/dist/extensions/registry.mjs +194 -37
- package/dist/flags-token.d.ts +4 -4
- package/dist/flags.js +15 -2
- package/dist/flags.mjs +15 -2
- package/dist/immutable.d.ts +1 -0
- package/dist/immutable.js +46 -0
- package/dist/immutable.mjs +8 -0
- package/dist/index.d.ts +7 -5
- package/dist/index.js +3 -67
- package/dist/index.mjs +3 -67
- package/dist/logs-internal.d.ts +2 -2
- package/dist/logs.js +5 -2
- package/dist/logs.mjs +5 -2
- package/dist/person-processing.d.ts +11 -0
- package/dist/person-processing.js +84 -0
- package/dist/person-processing.mjs +37 -0
- package/dist/posthog.d.ts +4 -3
- package/dist/posthog.js +153 -353
- package/dist/posthog.mjs +153 -353
- package/dist/root-composition.d.ts +11 -0
- package/dist/root-composition.js +138 -0
- package/dist/root-composition.mjs +100 -0
- package/dist/state.d.ts +1 -0
- package/dist/state.js +4 -0
- package/dist/state.mjs +4 -0
- package/dist/surveys-extension.js +11 -6
- package/dist/surveys-extension.mjs +11 -6
- package/dist/surveys-internal.d.ts +3 -2
- package/dist/types.d.ts +13 -19
- package/dist/utf8.d.ts +1 -0
- package/dist/utf8.js +52 -0
- package/dist/utf8.mjs +14 -0
- package/dist/version.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +5 -5
package/dist/analytics-buffer.js
CHANGED
|
@@ -30,167 +30,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30
30
|
__webpack_require__.d(__webpack_exports__, {
|
|
31
31
|
createAnalyticsExtension: ()=>createAnalyticsExtension
|
|
32
32
|
});
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const external_capture_summary_js_namespaceObject = require("./capture-summary.js");
|
|
36
|
-
const numberOption = (read, fallback, minimum, maximum)=>{
|
|
37
|
-
try {
|
|
38
|
-
const value = read();
|
|
39
|
-
return Math.max(minimum, Math.min(maximum, Math.floor(Number.isFinite(value) ? value : fallback)));
|
|
40
|
-
} catch {
|
|
41
|
-
return fallback;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
const createAnalyticsExtension = (options = {}, load, deliveryFactory)=>{
|
|
45
|
-
let eager = false;
|
|
46
|
-
if (load) try {
|
|
47
|
-
eager = 'eager' === options.load;
|
|
48
|
-
} catch {}
|
|
49
|
-
const scheduling = {
|
|
50
|
-
flushAt: numberOption(()=>options.flushAt, 20, 1, external_analytics_internal_js_namespaceObject.MAX_ANALYTICS_BATCH_EVENTS),
|
|
51
|
-
flushInterval: numberOption(()=>options.flushInterval, 3000, 0, Number.MAX_SAFE_INTEGER)
|
|
52
|
-
};
|
|
53
|
-
let client;
|
|
54
|
-
let host;
|
|
55
|
-
let driver;
|
|
56
|
-
let loading;
|
|
57
|
-
let disposed = false;
|
|
58
|
-
const disposalWaiters = new Set();
|
|
59
|
-
const teardownCallbacks = new Set();
|
|
60
|
-
let isTearingDown = false;
|
|
61
|
-
const beforeTeardown = ()=>{
|
|
62
|
-
isTearingDown = true;
|
|
63
|
-
try {
|
|
64
|
-
for (const callback of teardownCallbacks)try {
|
|
65
|
-
callback();
|
|
66
|
-
} catch (error) {
|
|
67
|
-
try {
|
|
68
|
-
host.reportFailure(error);
|
|
69
|
-
} catch {}
|
|
70
|
-
}
|
|
71
|
-
} finally{
|
|
72
|
-
isTearingDown = false;
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
let failures = 0;
|
|
76
|
-
const buffer = new external_event_buffer_js_namespaceObject.EventBuffer(1000, (total, count = 1, reason = 'overflow')=>host.reportWarning(`Analytics queue dropped ${count} ${reason} event${1 === count ? '' : 's'} (${total} total)`), external_analytics_internal_js_namespaceObject.MAX_ANALYTICS_BYTES, 3600000);
|
|
77
|
-
const ensureDelivery = async (reason, retryAfterPending = true)=>{
|
|
78
|
-
if (!load || disposed || driver) return;
|
|
79
|
-
if (loading) {
|
|
80
|
-
if ('capture' === reason || !retryAfterPending) return loading;
|
|
81
|
-
const previousFailures = failures;
|
|
82
|
-
await loading;
|
|
83
|
-
if (failures > previousFailures && buffer.hasPending()) await ensureDelivery(reason, false);
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
if ('capture' === reason && failures > 0) return;
|
|
87
|
-
const loadDelivery = async ()=>{
|
|
88
|
-
await Promise.resolve();
|
|
89
|
-
try {
|
|
90
|
-
const createDelivery = await load();
|
|
91
|
-
if (disposed) return;
|
|
92
|
-
driver = createDelivery(buffer, client, host, scheduling, beforeTeardown);
|
|
93
|
-
} catch (error) {
|
|
94
|
-
if (!driver) {
|
|
95
|
-
failures++;
|
|
96
|
-
client.logger.error('Automatic analytics loading failed', error);
|
|
97
|
-
}
|
|
98
|
-
} finally{
|
|
99
|
-
if (loading === pending) loading = void 0;
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
const pending = loadDelivery();
|
|
103
|
-
loading = pending;
|
|
104
|
-
return pending;
|
|
105
|
-
};
|
|
106
|
-
return {
|
|
107
|
-
name: external_analytics_internal_js_namespaceObject.Analytics,
|
|
108
|
-
get isTearingDown () {
|
|
109
|
-
return isTearingDown;
|
|
110
|
-
},
|
|
111
|
-
setup (value) {
|
|
112
|
-
client = value;
|
|
113
|
-
},
|
|
114
|
-
initialize (value) {
|
|
115
|
-
host = value;
|
|
116
|
-
if (deliveryFactory) driver = deliveryFactory(buffer, client, host, scheduling, beforeTeardown);
|
|
117
|
-
},
|
|
118
|
-
enqueue: (message, bytes)=>buffer.enqueue(message, bytes),
|
|
119
|
-
discardQueued: (message)=>{
|
|
120
|
-
buffer.discardQueued(message);
|
|
121
|
-
},
|
|
122
|
-
admitted () {
|
|
123
|
-
ensureDelivery('capture');
|
|
124
|
-
},
|
|
125
|
-
start: ()=>eager ? ensureDelivery('eager') : Promise.resolve(),
|
|
126
|
-
onBeforeTeardown (callback) {
|
|
127
|
-
if (!disposed) teardownCallbacks.add(callback);
|
|
128
|
-
return {
|
|
129
|
-
get deliveryAvailable () {
|
|
130
|
-
return !disposed && !!driver;
|
|
131
|
-
},
|
|
132
|
-
dispose () {
|
|
133
|
-
teardownCallbacks.delete(callback);
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
},
|
|
137
|
-
async flush (reason = 'flush') {
|
|
138
|
-
if (disposed) return;
|
|
139
|
-
if ('shutdown' === reason && loading) await loading;
|
|
140
|
-
else if (buffer.hasPending()) await ensureDelivery(reason);
|
|
141
|
-
await driver?.flush();
|
|
142
|
-
},
|
|
143
|
-
async deliverImmediate (message, canContinue) {
|
|
144
|
-
let release;
|
|
145
|
-
const disposal = new Promise((resolve)=>{
|
|
146
|
-
release = resolve;
|
|
147
|
-
disposalWaiters.add(resolve);
|
|
148
|
-
});
|
|
149
|
-
try {
|
|
150
|
-
await Promise.race([
|
|
151
|
-
ensureDelivery('immediate'),
|
|
152
|
-
disposal
|
|
153
|
-
]);
|
|
154
|
-
} finally{
|
|
155
|
-
disposalWaiters.delete(release);
|
|
156
|
-
}
|
|
157
|
-
let deliverImmediate;
|
|
158
|
-
try {
|
|
159
|
-
deliverImmediate = driver?.deliverImmediate;
|
|
160
|
-
} catch {
|
|
161
|
-
deliverImmediate = void 0;
|
|
162
|
-
}
|
|
163
|
-
if (!canContinue()) return (0, external_capture_summary_js_namespaceObject.captureFailure)(new Error('Immediate analytics delivery was cancelled'));
|
|
164
|
-
if (!driver || 'function' != typeof deliverImmediate || disposed) return (0, external_capture_summary_js_namespaceObject.captureFailure)(new Error('Immediate analytics delivery is unavailable'));
|
|
165
|
-
return deliverImmediate.call(driver, [
|
|
166
|
-
message
|
|
167
|
-
], canContinue);
|
|
168
|
-
},
|
|
169
|
-
deliverUnload (message, canContinue) {
|
|
170
|
-
const send = ()=>{
|
|
171
|
-
if (disposed || !canContinue()) return;
|
|
172
|
-
try {
|
|
173
|
-
driver?.deliverUnload([
|
|
174
|
-
message
|
|
175
|
-
]);
|
|
176
|
-
} catch (error) {
|
|
177
|
-
host.reportFailure(error);
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
if (driver) send();
|
|
181
|
-
else ensureDelivery('immediate').then(send, (error)=>host.reportFailure(error));
|
|
182
|
-
},
|
|
183
|
-
purge: ()=>buffer.purge(),
|
|
184
|
-
dispose () {
|
|
185
|
-
disposed = true;
|
|
186
|
-
for (const release of disposalWaiters)release();
|
|
187
|
-
disposalWaiters.clear();
|
|
188
|
-
teardownCallbacks.clear();
|
|
189
|
-
if (driver) return driver.dispose();
|
|
190
|
-
buffer.dispose();
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
};
|
|
33
|
+
const external_analytics_extension_js_namespaceObject = require("./analytics-extension.js");
|
|
34
|
+
const createAnalyticsExtension = (options = {}, load, deliveryFactory)=>new external_analytics_extension_js_namespaceObject.Analytics(options, load, deliveryFactory);
|
|
194
35
|
exports.createAnalyticsExtension = __webpack_exports__.createAnalyticsExtension;
|
|
195
36
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
196
37
|
"createAnalyticsExtension"
|
|
@@ -1,162 +1,3 @@
|
|
|
1
|
-
import { Analytics
|
|
2
|
-
|
|
3
|
-
import { captureFailure } from "./capture-summary.mjs";
|
|
4
|
-
const numberOption = (read, fallback, minimum, maximum)=>{
|
|
5
|
-
try {
|
|
6
|
-
const value = read();
|
|
7
|
-
return Math.max(minimum, Math.min(maximum, Math.floor(Number.isFinite(value) ? value : fallback)));
|
|
8
|
-
} catch {
|
|
9
|
-
return fallback;
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
const createAnalyticsExtension = (options = {}, load, deliveryFactory)=>{
|
|
13
|
-
let eager = false;
|
|
14
|
-
if (load) try {
|
|
15
|
-
eager = 'eager' === options.load;
|
|
16
|
-
} catch {}
|
|
17
|
-
const scheduling = {
|
|
18
|
-
flushAt: numberOption(()=>options.flushAt, 20, 1, MAX_ANALYTICS_BATCH_EVENTS),
|
|
19
|
-
flushInterval: numberOption(()=>options.flushInterval, 3000, 0, Number.MAX_SAFE_INTEGER)
|
|
20
|
-
};
|
|
21
|
-
let client;
|
|
22
|
-
let host;
|
|
23
|
-
let driver;
|
|
24
|
-
let loading;
|
|
25
|
-
let disposed = false;
|
|
26
|
-
const disposalWaiters = new Set();
|
|
27
|
-
const teardownCallbacks = new Set();
|
|
28
|
-
let isTearingDown = false;
|
|
29
|
-
const beforeTeardown = ()=>{
|
|
30
|
-
isTearingDown = true;
|
|
31
|
-
try {
|
|
32
|
-
for (const callback of teardownCallbacks)try {
|
|
33
|
-
callback();
|
|
34
|
-
} catch (error) {
|
|
35
|
-
try {
|
|
36
|
-
host.reportFailure(error);
|
|
37
|
-
} catch {}
|
|
38
|
-
}
|
|
39
|
-
} finally{
|
|
40
|
-
isTearingDown = false;
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
let failures = 0;
|
|
44
|
-
const buffer = new EventBuffer(1000, (total, count = 1, reason = 'overflow')=>host.reportWarning(`Analytics queue dropped ${count} ${reason} event${1 === count ? '' : 's'} (${total} total)`), MAX_ANALYTICS_BYTES, 3600000);
|
|
45
|
-
const ensureDelivery = async (reason, retryAfterPending = true)=>{
|
|
46
|
-
if (!load || disposed || driver) return;
|
|
47
|
-
if (loading) {
|
|
48
|
-
if ('capture' === reason || !retryAfterPending) return loading;
|
|
49
|
-
const previousFailures = failures;
|
|
50
|
-
await loading;
|
|
51
|
-
if (failures > previousFailures && buffer.hasPending()) await ensureDelivery(reason, false);
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
if ('capture' === reason && failures > 0) return;
|
|
55
|
-
const loadDelivery = async ()=>{
|
|
56
|
-
await Promise.resolve();
|
|
57
|
-
try {
|
|
58
|
-
const createDelivery = await load();
|
|
59
|
-
if (disposed) return;
|
|
60
|
-
driver = createDelivery(buffer, client, host, scheduling, beforeTeardown);
|
|
61
|
-
} catch (error) {
|
|
62
|
-
if (!driver) {
|
|
63
|
-
failures++;
|
|
64
|
-
client.logger.error('Automatic analytics loading failed', error);
|
|
65
|
-
}
|
|
66
|
-
} finally{
|
|
67
|
-
if (loading === pending) loading = void 0;
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
const pending = loadDelivery();
|
|
71
|
-
loading = pending;
|
|
72
|
-
return pending;
|
|
73
|
-
};
|
|
74
|
-
return {
|
|
75
|
-
name: Analytics,
|
|
76
|
-
get isTearingDown () {
|
|
77
|
-
return isTearingDown;
|
|
78
|
-
},
|
|
79
|
-
setup (value) {
|
|
80
|
-
client = value;
|
|
81
|
-
},
|
|
82
|
-
initialize (value) {
|
|
83
|
-
host = value;
|
|
84
|
-
if (deliveryFactory) driver = deliveryFactory(buffer, client, host, scheduling, beforeTeardown);
|
|
85
|
-
},
|
|
86
|
-
enqueue: (message, bytes)=>buffer.enqueue(message, bytes),
|
|
87
|
-
discardQueued: (message)=>{
|
|
88
|
-
buffer.discardQueued(message);
|
|
89
|
-
},
|
|
90
|
-
admitted () {
|
|
91
|
-
ensureDelivery('capture');
|
|
92
|
-
},
|
|
93
|
-
start: ()=>eager ? ensureDelivery('eager') : Promise.resolve(),
|
|
94
|
-
onBeforeTeardown (callback) {
|
|
95
|
-
if (!disposed) teardownCallbacks.add(callback);
|
|
96
|
-
return {
|
|
97
|
-
get deliveryAvailable () {
|
|
98
|
-
return !disposed && !!driver;
|
|
99
|
-
},
|
|
100
|
-
dispose () {
|
|
101
|
-
teardownCallbacks.delete(callback);
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
},
|
|
105
|
-
async flush (reason = 'flush') {
|
|
106
|
-
if (disposed) return;
|
|
107
|
-
if ('shutdown' === reason && loading) await loading;
|
|
108
|
-
else if (buffer.hasPending()) await ensureDelivery(reason);
|
|
109
|
-
await driver?.flush();
|
|
110
|
-
},
|
|
111
|
-
async deliverImmediate (message, canContinue) {
|
|
112
|
-
let release;
|
|
113
|
-
const disposal = new Promise((resolve)=>{
|
|
114
|
-
release = resolve;
|
|
115
|
-
disposalWaiters.add(resolve);
|
|
116
|
-
});
|
|
117
|
-
try {
|
|
118
|
-
await Promise.race([
|
|
119
|
-
ensureDelivery('immediate'),
|
|
120
|
-
disposal
|
|
121
|
-
]);
|
|
122
|
-
} finally{
|
|
123
|
-
disposalWaiters.delete(release);
|
|
124
|
-
}
|
|
125
|
-
let deliverImmediate;
|
|
126
|
-
try {
|
|
127
|
-
deliverImmediate = driver?.deliverImmediate;
|
|
128
|
-
} catch {
|
|
129
|
-
deliverImmediate = void 0;
|
|
130
|
-
}
|
|
131
|
-
if (!canContinue()) return captureFailure(new Error('Immediate analytics delivery was cancelled'));
|
|
132
|
-
if (!driver || 'function' != typeof deliverImmediate || disposed) return captureFailure(new Error('Immediate analytics delivery is unavailable'));
|
|
133
|
-
return deliverImmediate.call(driver, [
|
|
134
|
-
message
|
|
135
|
-
], canContinue);
|
|
136
|
-
},
|
|
137
|
-
deliverUnload (message, canContinue) {
|
|
138
|
-
const send = ()=>{
|
|
139
|
-
if (disposed || !canContinue()) return;
|
|
140
|
-
try {
|
|
141
|
-
driver?.deliverUnload([
|
|
142
|
-
message
|
|
143
|
-
]);
|
|
144
|
-
} catch (error) {
|
|
145
|
-
host.reportFailure(error);
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
if (driver) send();
|
|
149
|
-
else ensureDelivery('immediate').then(send, (error)=>host.reportFailure(error));
|
|
150
|
-
},
|
|
151
|
-
purge: ()=>buffer.purge(),
|
|
152
|
-
dispose () {
|
|
153
|
-
disposed = true;
|
|
154
|
-
for (const release of disposalWaiters)release();
|
|
155
|
-
disposalWaiters.clear();
|
|
156
|
-
teardownCallbacks.clear();
|
|
157
|
-
if (driver) return driver.dispose();
|
|
158
|
-
buffer.dispose();
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
};
|
|
1
|
+
import { Analytics } from "./analytics-extension.mjs";
|
|
2
|
+
const createAnalyticsExtension = (options = {}, load, deliveryFactory)=>new Analytics(options, load, deliveryFactory);
|
|
162
3
|
export { createAnalyticsExtension };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { CaptureOptions, CapturedEventInfo, Disposable, Listener } from '@posthog/browser-common';
|
|
2
|
+
import { type AnalyticsCaptureHost, type AnalyticsDeliveryFactory, type IAnalyticsExtension, type CaptureHost } from './analytics-internal';
|
|
3
|
+
import type { IPostHogInternal } from './browser-client';
|
|
4
|
+
import type { AutomaticAnalyticsOptions } from './analytics-options';
|
|
5
|
+
import type { CaptureSummary } from './types';
|
|
6
|
+
/** One product instance owns analytics operations, admission, buffering and delivery coordination. */
|
|
7
|
+
export declare class Analytics implements IAnalyticsExtension {
|
|
8
|
+
readonly name: import("@posthog/browser-common").ExtensionToken<IAnalyticsExtension>;
|
|
9
|
+
readonly isRateLimited: boolean;
|
|
10
|
+
private _host;
|
|
11
|
+
private _client;
|
|
12
|
+
private _deliveryHost;
|
|
13
|
+
private _driver;
|
|
14
|
+
private _loading;
|
|
15
|
+
private _disposed;
|
|
16
|
+
private _isTearingDown;
|
|
17
|
+
private _failures;
|
|
18
|
+
private _kv;
|
|
19
|
+
private _lastPersonProperties;
|
|
20
|
+
private readonly _personProfiles;
|
|
21
|
+
private readonly _rateLimiter;
|
|
22
|
+
private readonly _dynamicEventProperties;
|
|
23
|
+
private readonly _disposalWaiters;
|
|
24
|
+
private readonly _teardownCallbacks;
|
|
25
|
+
private readonly _buffer;
|
|
26
|
+
private readonly _scheduling;
|
|
27
|
+
private readonly _eager;
|
|
28
|
+
private readonly _load;
|
|
29
|
+
private readonly _deliveryFactory;
|
|
30
|
+
constructor(options?: AutomaticAnalyticsOptions, load?: () => Promise<AnalyticsDeliveryFactory>, deliveryFactory?: AnalyticsDeliveryFactory);
|
|
31
|
+
readonly bindCaptureHost: (host: AnalyticsCaptureHost) => void;
|
|
32
|
+
readonly setup: (value: IPostHogInternal) => void;
|
|
33
|
+
readonly initialize: (host: CaptureHost) => void;
|
|
34
|
+
readonly start: () => Promise<void>;
|
|
35
|
+
readonly onBeforeTeardown: NonNullable<IAnalyticsExtension['onBeforeTeardown']>;
|
|
36
|
+
readonly flush: IAnalyticsExtension['flush'];
|
|
37
|
+
readonly purge: () => void;
|
|
38
|
+
readonly dispose: () => Promise<void> | undefined;
|
|
39
|
+
private readonly _beforeTeardown;
|
|
40
|
+
private _ensureDelivery;
|
|
41
|
+
private _deliverImmediate;
|
|
42
|
+
private _deliverUnload;
|
|
43
|
+
readonly onEvent: Listener<CapturedEventInfo>;
|
|
44
|
+
readonly captureInitialPageview: () => boolean;
|
|
45
|
+
readonly capture: (event: string, properties?: Record<string, unknown> | null, options?: CaptureOptions) => boolean;
|
|
46
|
+
private _captureUnload;
|
|
47
|
+
readonly captureImmediate: (event: string, properties?: Record<string, unknown> | null, options?: CaptureOptions) => Promise<CaptureSummary>;
|
|
48
|
+
private _capture;
|
|
49
|
+
private _admitCapture;
|
|
50
|
+
private _acceptRateLimit;
|
|
51
|
+
private _reportRateLimit;
|
|
52
|
+
private _dynamicProperties;
|
|
53
|
+
private _snapshotProperties;
|
|
54
|
+
private _prepareCapture;
|
|
55
|
+
private _measureCapture;
|
|
56
|
+
private _warnOversized;
|
|
57
|
+
private _enqueueCapture;
|
|
58
|
+
private _commitCapture;
|
|
59
|
+
private _publishCapture;
|
|
60
|
+
private _hasPersonProcessing;
|
|
61
|
+
private _requirePersonProcessing;
|
|
62
|
+
readonly createPersonProfile: () => void;
|
|
63
|
+
readonly setPersonProperties: (set?: Record<string, unknown>, setOnce?: Record<string, unknown>) => void;
|
|
64
|
+
private _setPersonProperties;
|
|
65
|
+
readonly unsetPersonProperties: (names: string | readonly string[]) => void;
|
|
66
|
+
readonly setInternalOrTestUser: () => void;
|
|
67
|
+
readonly identify: (distinctId: string, set?: Record<string, unknown>, setOnce?: Record<string, unknown>) => Promise<void>;
|
|
68
|
+
private _identifyOptions;
|
|
69
|
+
private _captureIdentification;
|
|
70
|
+
readonly alias: (alias: string) => void;
|
|
71
|
+
readonly group: (type: string, key: string, properties?: Record<string, unknown>) => Promise<void>;
|
|
72
|
+
readonly groupIdentify: (type: string, key: string | number, properties?: Record<string, unknown>, options?: CaptureOptions) => void;
|
|
73
|
+
readonly resetGroups: () => void;
|
|
74
|
+
readonly reset: () => void;
|
|
75
|
+
readonly registerDynamicEventProperties: (producer: () => Record<string, unknown>) => Disposable;
|
|
76
|
+
}
|