zorihq 0.13.0 → 0.15.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/CHANGELOG.md +16 -0
- package/package.json +1 -1
- package/resources/v1/analytics/analytics.d.mts +44 -82
- package/resources/v1/analytics/analytics.d.mts.map +1 -1
- package/resources/v1/analytics/analytics.d.ts +44 -82
- package/resources/v1/analytics/analytics.d.ts.map +1 -1
- package/resources/v1/analytics/analytics.js +11 -9
- package/resources/v1/analytics/analytics.js.map +1 -1
- package/resources/v1/analytics/analytics.mjs +12 -10
- package/resources/v1/analytics/analytics.mjs.map +1 -1
- package/resources/v1/analytics/events.d.mts +8 -6
- package/resources/v1/analytics/events.d.mts.map +1 -1
- package/resources/v1/analytics/events.d.ts +8 -6
- package/resources/v1/analytics/events.d.ts.map +1 -1
- package/resources/v1/analytics/events.js +3 -2
- package/resources/v1/analytics/events.js.map +1 -1
- package/resources/v1/analytics/events.mjs +3 -2
- package/resources/v1/analytics/events.mjs.map +1 -1
- package/resources/v1/analytics/index.d.mts +6 -5
- package/resources/v1/analytics/index.d.mts.map +1 -1
- package/resources/v1/analytics/index.d.ts +6 -5
- package/resources/v1/analytics/index.d.ts.map +1 -1
- package/resources/v1/analytics/index.js +3 -1
- package/resources/v1/analytics/index.js.map +1 -1
- package/resources/v1/analytics/index.mjs +2 -1
- package/resources/v1/analytics/index.mjs.map +1 -1
- package/resources/v1/analytics/retention.d.mts +1 -25
- package/resources/v1/analytics/retention.d.mts.map +1 -1
- package/resources/v1/analytics/retention.d.ts +1 -25
- package/resources/v1/analytics/retention.d.ts.map +1 -1
- package/resources/v1/analytics/retention.js +0 -15
- package/resources/v1/analytics/retention.js.map +1 -1
- package/resources/v1/analytics/retention.mjs +0 -15
- package/resources/v1/analytics/retention.mjs.map +1 -1
- package/resources/v1/analytics/sessions.d.mts +0 -54
- package/resources/v1/analytics/sessions.d.mts.map +1 -1
- package/resources/v1/analytics/sessions.d.ts +0 -54
- package/resources/v1/analytics/sessions.d.ts.map +1 -1
- package/resources/v1/analytics/sessions.js +0 -30
- package/resources/v1/analytics/sessions.js.map +1 -1
- package/resources/v1/analytics/sessions.mjs +0 -30
- package/resources/v1/analytics/sessions.mjs.map +1 -1
- package/resources/v1/analytics/tiles.d.mts +401 -0
- package/resources/v1/analytics/tiles.d.mts.map +1 -0
- package/resources/v1/analytics/tiles.d.ts +401 -0
- package/resources/v1/analytics/tiles.d.ts.map +1 -0
- package/resources/v1/analytics/tiles.js +208 -0
- package/resources/v1/analytics/tiles.js.map +1 -0
- package/resources/v1/analytics/tiles.mjs +204 -0
- package/resources/v1/analytics/tiles.mjs.map +1 -0
- package/resources/v1/analytics/users.d.mts +0 -30
- package/resources/v1/analytics/users.d.mts.map +1 -1
- package/resources/v1/analytics/users.d.ts +0 -30
- package/resources/v1/analytics/users.d.ts.map +1 -1
- package/resources/v1/analytics/users.js +0 -15
- package/resources/v1/analytics/users.js.map +1 -1
- package/resources/v1/analytics/users.mjs +0 -15
- package/resources/v1/analytics/users.mjs.map +1 -1
- package/resources/v1/analytics/visitors.d.mts +4 -75
- package/resources/v1/analytics/visitors.d.mts.map +1 -1
- package/resources/v1/analytics/visitors.d.ts +4 -75
- package/resources/v1/analytics/visitors.d.ts.map +1 -1
- package/resources/v1/analytics/visitors.js +3 -47
- package/resources/v1/analytics/visitors.js.map +1 -1
- package/resources/v1/analytics/visitors.mjs +3 -47
- package/resources/v1/analytics/visitors.mjs.map +1 -1
- package/resources/v1/index.d.mts +1 -1
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +1 -1
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/v1.d.mts +2 -2
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +2 -2
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs.map +1 -1
- package/src/resources/v1/analytics/analytics.ts +119 -145
- package/src/resources/v1/analytics/events.ts +9 -6
- package/src/resources/v1/analytics/index.ts +33 -23
- package/src/resources/v1/analytics/retention.ts +0 -40
- package/src/resources/v1/analytics/sessions.ts +1 -89
- package/src/resources/v1/analytics/tiles.ts +663 -0
- package/src/resources/v1/analytics/users.ts +1 -44
- package/src/resources/v1/analytics/visitors.ts +3 -122
- package/src/resources/v1/index.ts +2 -13
- package/src/resources/v1/v1.ts +4 -26
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -4,24 +4,46 @@ import { APIResource } from '../../../core/resource';
|
|
|
4
4
|
import * as EventsAPI from './events';
|
|
5
5
|
import { EventFilterOptionsParams, EventRecentParams, Events } from './events';
|
|
6
6
|
import * as RetentionAPI from './retention';
|
|
7
|
-
import {
|
|
8
|
-
Retention,
|
|
9
|
-
RetentionChurnRateParams,
|
|
10
|
-
RetentionCohortsParams,
|
|
11
|
-
RetentionReturnRateParams,
|
|
12
|
-
} from './retention';
|
|
7
|
+
import { Retention, RetentionChurnRateParams, RetentionCohortsParams } from './retention';
|
|
13
8
|
import * as SessionsAPI from './sessions';
|
|
14
|
-
import {
|
|
9
|
+
import { Sessions } from './sessions';
|
|
10
|
+
import * as TilesAPI from './tiles';
|
|
11
|
+
import {
|
|
12
|
+
TileGetBounceRateParams,
|
|
13
|
+
TileGetBounceRateResponse,
|
|
14
|
+
TileGetDailyActiveUsersParams,
|
|
15
|
+
TileGetDailyActiveUsersResponse,
|
|
16
|
+
TileGetMonthlyActiveUsersParams,
|
|
17
|
+
TileGetMonthlyActiveUsersResponse,
|
|
18
|
+
TileGetPagesPerSessionParams,
|
|
19
|
+
TileGetPagesPerSessionResponse,
|
|
20
|
+
TileGetReturnRateParams,
|
|
21
|
+
TileGetReturnRateResponse,
|
|
22
|
+
TileGetSessionDurationParams,
|
|
23
|
+
TileGetSessionDurationResponse,
|
|
24
|
+
TileGetTimeBetweenVisitsParams,
|
|
25
|
+
TileGetTimeBetweenVisitsResponse,
|
|
26
|
+
TileGetTrafficByCountryParams,
|
|
27
|
+
TileGetTrafficByCountryResponse,
|
|
28
|
+
TileGetTrafficByRefererParams,
|
|
29
|
+
TileGetTrafficByRefererResponse,
|
|
30
|
+
TileGetTrafficByUtmParams,
|
|
31
|
+
TileGetTrafficByUtmResponse,
|
|
32
|
+
TileGetUniqueSessionsParams,
|
|
33
|
+
TileGetUniqueSessionsResponse,
|
|
34
|
+
TileGetUniqueVisitorsParams,
|
|
35
|
+
TileGetUniqueVisitorsResponse,
|
|
36
|
+
TileGetWeeklyActiveUsersParams,
|
|
37
|
+
TileGetWeeklyActiveUsersResponse,
|
|
38
|
+
Tiles,
|
|
39
|
+
} from './tiles';
|
|
15
40
|
import * as UsersAPI from './users';
|
|
16
|
-
import {
|
|
41
|
+
import { Users } from './users';
|
|
17
42
|
import * as VisitorsAPI from './visitors';
|
|
18
43
|
import {
|
|
19
|
-
VisitorByCountryParams,
|
|
20
44
|
VisitorByDeviceParams,
|
|
21
|
-
VisitorByOriginParams,
|
|
22
45
|
VisitorIdentifyParams,
|
|
23
46
|
VisitorProfileParams,
|
|
24
|
-
VisitorTimelineParams,
|
|
25
47
|
VisitorTopParams,
|
|
26
48
|
Visitors,
|
|
27
49
|
} from './visitors';
|
|
@@ -34,47 +56,27 @@ export class Analytics extends APIResource {
|
|
|
34
56
|
sessions: SessionsAPI.Sessions = new SessionsAPI.Sessions(this._client);
|
|
35
57
|
users: UsersAPI.Users = new UsersAPI.Users(this._client);
|
|
36
58
|
retention: RetentionAPI.Retention = new RetentionAPI.Retention(this._client);
|
|
59
|
+
tiles: TilesAPI.Tiles = new TilesAPI.Tiles(this._client);
|
|
37
60
|
|
|
38
61
|
/**
|
|
39
|
-
* Get
|
|
40
|
-
*
|
|
62
|
+
* Get unique visitor counts over time, split by mobile and desktop devices for
|
|
63
|
+
* chart visualization
|
|
41
64
|
*
|
|
42
65
|
* @example
|
|
43
66
|
* ```ts
|
|
44
|
-
* const
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* time_range: 'last_hour',
|
|
48
|
-
* });
|
|
67
|
+
* const response = await client.v1.analytics.retrieveTimeline(
|
|
68
|
+
* { project_id: 'project_id', time_range: 'last_hour' },
|
|
69
|
+
* );
|
|
49
70
|
* ```
|
|
50
71
|
*/
|
|
51
|
-
|
|
52
|
-
|
|
72
|
+
retrieveTimeline(
|
|
73
|
+
query: AnalyticsRetrieveTimelineParams,
|
|
74
|
+
options?: RequestOptions,
|
|
75
|
+
): APIPromise<AnalyticsRetrieveTimelineResponse> {
|
|
76
|
+
return this._client.get('/api/v1/analytics/timeline', { query, ...options });
|
|
53
77
|
}
|
|
54
78
|
}
|
|
55
79
|
|
|
56
|
-
export interface ActiveUsersResponse {
|
|
57
|
-
dau?: number;
|
|
58
|
-
|
|
59
|
-
mau?: number;
|
|
60
|
-
|
|
61
|
-
wau?: number;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface BounceRateByPageMetric {
|
|
65
|
-
bounce_rate?: number;
|
|
66
|
-
|
|
67
|
-
page?: string;
|
|
68
|
-
|
|
69
|
-
sessions?: number;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export interface BounceRateResponse {
|
|
73
|
-
by_page?: Array<BounceRateByPageMetric>;
|
|
74
|
-
|
|
75
|
-
overall_bounce_rate?: number;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
80
|
export interface ChurnRateResponse {
|
|
79
81
|
churn_rate_percent?: number;
|
|
80
82
|
|
|
@@ -107,41 +109,9 @@ export interface CohortData {
|
|
|
107
109
|
week_4_retention?: number;
|
|
108
110
|
}
|
|
109
111
|
|
|
110
|
-
export interface CountryDataPoint {
|
|
111
|
-
country_code?: string;
|
|
112
|
-
|
|
113
|
-
percentage?: number;
|
|
114
|
-
|
|
115
|
-
unique_visitors?: number;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export interface DashboardMetricsResponse {
|
|
119
|
-
avg_pages_per_session?: number;
|
|
120
|
-
|
|
121
|
-
avg_session_duration_seconds?: number;
|
|
122
|
-
|
|
123
|
-
bounce_rate?: number;
|
|
124
|
-
|
|
125
|
-
dau?: number;
|
|
126
|
-
|
|
127
|
-
mau?: number;
|
|
128
|
-
|
|
129
|
-
return_rate?: number;
|
|
130
|
-
|
|
131
|
-
sessions_today?: number;
|
|
132
|
-
|
|
133
|
-
total_events?: number;
|
|
134
|
-
|
|
135
|
-
total_sessions_in_period?: number;
|
|
136
|
-
|
|
137
|
-
unique_sessions?: number;
|
|
138
|
-
|
|
139
|
-
unique_visitors?: number;
|
|
140
|
-
|
|
141
|
-
wau?: number;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
112
|
export interface EventFilterOptionsResponse {
|
|
113
|
+
event_names?: Array<string>;
|
|
114
|
+
|
|
145
115
|
pages?: Array<string>;
|
|
146
116
|
|
|
147
117
|
traffic_origins?: Array<string>;
|
|
@@ -179,14 +149,6 @@ export interface ManualIdentifyResponse {
|
|
|
179
149
|
visitor_id?: string;
|
|
180
150
|
}
|
|
181
151
|
|
|
182
|
-
export interface OriginDataPoint {
|
|
183
|
-
origin?: string;
|
|
184
|
-
|
|
185
|
-
percentage?: number;
|
|
186
|
-
|
|
187
|
-
unique_visitors?: number;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
152
|
export interface RecentEvent {
|
|
191
153
|
browser_name?: string;
|
|
192
154
|
|
|
@@ -255,44 +217,42 @@ export interface RecentEventsResponse {
|
|
|
255
217
|
total?: number;
|
|
256
218
|
}
|
|
257
219
|
|
|
258
|
-
export interface ReturnRateResponse {
|
|
259
|
-
avg_time_between_sessions_hours?: number;
|
|
260
|
-
|
|
261
|
-
return_rate_percent?: number;
|
|
262
|
-
|
|
263
|
-
returning_users?: number;
|
|
264
|
-
|
|
265
|
-
total_users?: number;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
export interface SessionMetricsResponse {
|
|
269
|
-
average_pages_per_session?: number;
|
|
270
|
-
|
|
271
|
-
average_session_duration_seconds?: number;
|
|
272
|
-
|
|
273
|
-
total_sessions?: number;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
220
|
export interface TopVisitor {
|
|
277
221
|
browser_name?: string;
|
|
278
222
|
|
|
223
|
+
currency?: string;
|
|
224
|
+
|
|
279
225
|
device_type?: string;
|
|
280
226
|
|
|
227
|
+
distinct_payments?: number;
|
|
228
|
+
|
|
229
|
+
email?: string;
|
|
230
|
+
|
|
281
231
|
event_count?: number;
|
|
282
232
|
|
|
283
233
|
external_id?: string;
|
|
284
234
|
|
|
235
|
+
first_payment_date?: string;
|
|
236
|
+
|
|
285
237
|
first_seen?: string;
|
|
286
238
|
|
|
239
|
+
is_grouped?: boolean;
|
|
240
|
+
|
|
287
241
|
last_seen?: string;
|
|
288
242
|
|
|
289
243
|
location_city?: string;
|
|
290
244
|
|
|
291
245
|
location_country_iso?: string;
|
|
292
246
|
|
|
247
|
+
name?: string;
|
|
248
|
+
|
|
249
|
+
time_to_first_purchase_seconds?: number;
|
|
250
|
+
|
|
251
|
+
total_revenue?: number;
|
|
252
|
+
|
|
293
253
|
user_id?: string;
|
|
294
254
|
|
|
295
|
-
|
|
255
|
+
visitor_ids?: Array<string>;
|
|
296
256
|
}
|
|
297
257
|
|
|
298
258
|
export interface TopVisitorsResponse {
|
|
@@ -301,18 +261,6 @@ export interface TopVisitorsResponse {
|
|
|
301
261
|
visitors?: Array<TopVisitor>;
|
|
302
262
|
}
|
|
303
263
|
|
|
304
|
-
export interface UniqueVisitorsDataPoint {
|
|
305
|
-
desktop?: number;
|
|
306
|
-
|
|
307
|
-
mobile?: number;
|
|
308
|
-
|
|
309
|
-
timestamp?: string;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
export interface UniqueVisitorsTimelineResponse {
|
|
313
|
-
data?: Array<UniqueVisitorsDataPoint>;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
264
|
export interface VisitorDataPoint {
|
|
317
265
|
desktop?: number;
|
|
318
266
|
|
|
@@ -405,19 +353,33 @@ export interface VisitorProfileResponse {
|
|
|
405
353
|
visitor_id?: string;
|
|
406
354
|
}
|
|
407
355
|
|
|
408
|
-
export interface VisitorsByCountryResponse {
|
|
409
|
-
data?: Array<CountryDataPoint>;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
356
|
export interface VisitorsByDeviceResponse {
|
|
413
357
|
data?: Array<VisitorDataPoint>;
|
|
414
358
|
}
|
|
415
359
|
|
|
416
|
-
export interface
|
|
417
|
-
data?: Array<
|
|
360
|
+
export interface AnalyticsRetrieveTimelineResponse {
|
|
361
|
+
data?: Array<AnalyticsRetrieveTimelineResponse.Data>;
|
|
362
|
+
|
|
363
|
+
precision?: 'minutes' | 'hourly' | 'daily' | 'weekly' | 'monthly';
|
|
364
|
+
|
|
365
|
+
total_visits?: number;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export namespace AnalyticsRetrieveTimelineResponse {
|
|
369
|
+
export interface Data {
|
|
370
|
+
num_desktop_visits?: number;
|
|
371
|
+
|
|
372
|
+
num_mobile_visits?: number;
|
|
373
|
+
|
|
374
|
+
num_revenue?: number;
|
|
375
|
+
|
|
376
|
+
num_unknown_visits?: number;
|
|
377
|
+
|
|
378
|
+
time_bucket?: string;
|
|
379
|
+
}
|
|
418
380
|
}
|
|
419
381
|
|
|
420
|
-
export interface
|
|
382
|
+
export interface AnalyticsRetrieveTimelineParams {
|
|
421
383
|
project_id: string;
|
|
422
384
|
|
|
423
385
|
time_range: 'last_hour' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days';
|
|
@@ -442,47 +404,34 @@ Analytics.Events = Events;
|
|
|
442
404
|
Analytics.Sessions = Sessions;
|
|
443
405
|
Analytics.Users = Users;
|
|
444
406
|
Analytics.Retention = Retention;
|
|
407
|
+
Analytics.Tiles = Tiles;
|
|
445
408
|
|
|
446
409
|
export declare namespace Analytics {
|
|
447
410
|
export {
|
|
448
|
-
type ActiveUsersResponse as ActiveUsersResponse,
|
|
449
|
-
type BounceRateByPageMetric as BounceRateByPageMetric,
|
|
450
|
-
type BounceRateResponse as BounceRateResponse,
|
|
451
411
|
type ChurnRateResponse as ChurnRateResponse,
|
|
452
412
|
type CohortAnalysisResponse as CohortAnalysisResponse,
|
|
453
413
|
type CohortData as CohortData,
|
|
454
|
-
type CountryDataPoint as CountryDataPoint,
|
|
455
|
-
type DashboardMetricsResponse as DashboardMetricsResponse,
|
|
456
414
|
type EventFilterOptionsResponse as EventFilterOptionsResponse,
|
|
457
415
|
type EventsOverTimeDataPoint as EventsOverTimeDataPoint,
|
|
458
416
|
type ManualIdentifyRequest as ManualIdentifyRequest,
|
|
459
417
|
type ManualIdentifyResponse as ManualIdentifyResponse,
|
|
460
|
-
type OriginDataPoint as OriginDataPoint,
|
|
461
418
|
type RecentEvent as RecentEvent,
|
|
462
419
|
type RecentEventsResponse as RecentEventsResponse,
|
|
463
|
-
type ReturnRateResponse as ReturnRateResponse,
|
|
464
|
-
type SessionMetricsResponse as SessionMetricsResponse,
|
|
465
420
|
type TopVisitor as TopVisitor,
|
|
466
421
|
type TopVisitorsResponse as TopVisitorsResponse,
|
|
467
|
-
type UniqueVisitorsDataPoint as UniqueVisitorsDataPoint,
|
|
468
|
-
type UniqueVisitorsTimelineResponse as UniqueVisitorsTimelineResponse,
|
|
469
422
|
type VisitorDataPoint as VisitorDataPoint,
|
|
470
423
|
type VisitorEvent as VisitorEvent,
|
|
471
424
|
type VisitorProfileResponse as VisitorProfileResponse,
|
|
472
|
-
type VisitorsByCountryResponse as VisitorsByCountryResponse,
|
|
473
425
|
type VisitorsByDeviceResponse as VisitorsByDeviceResponse,
|
|
474
|
-
type
|
|
475
|
-
type
|
|
426
|
+
type AnalyticsRetrieveTimelineResponse as AnalyticsRetrieveTimelineResponse,
|
|
427
|
+
type AnalyticsRetrieveTimelineParams as AnalyticsRetrieveTimelineParams,
|
|
476
428
|
};
|
|
477
429
|
|
|
478
430
|
export {
|
|
479
431
|
Visitors as Visitors,
|
|
480
|
-
type VisitorByCountryParams as VisitorByCountryParams,
|
|
481
432
|
type VisitorByDeviceParams as VisitorByDeviceParams,
|
|
482
|
-
type VisitorByOriginParams as VisitorByOriginParams,
|
|
483
433
|
type VisitorIdentifyParams as VisitorIdentifyParams,
|
|
484
434
|
type VisitorProfileParams as VisitorProfileParams,
|
|
485
|
-
type VisitorTimelineParams as VisitorTimelineParams,
|
|
486
435
|
type VisitorTopParams as VisitorTopParams,
|
|
487
436
|
};
|
|
488
437
|
|
|
@@ -492,18 +441,43 @@ export declare namespace Analytics {
|
|
|
492
441
|
type EventRecentParams as EventRecentParams,
|
|
493
442
|
};
|
|
494
443
|
|
|
495
|
-
export {
|
|
496
|
-
Sessions as Sessions,
|
|
497
|
-
type SessionBounceRateParams as SessionBounceRateParams,
|
|
498
|
-
type SessionMetricsParams as SessionMetricsParams,
|
|
499
|
-
};
|
|
444
|
+
export { Sessions as Sessions };
|
|
500
445
|
|
|
501
|
-
export { Users as Users
|
|
446
|
+
export { Users as Users };
|
|
502
447
|
|
|
503
448
|
export {
|
|
504
449
|
Retention as Retention,
|
|
505
450
|
type RetentionChurnRateParams as RetentionChurnRateParams,
|
|
506
451
|
type RetentionCohortsParams as RetentionCohortsParams,
|
|
507
|
-
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
export {
|
|
455
|
+
Tiles as Tiles,
|
|
456
|
+
type TileGetBounceRateResponse as TileGetBounceRateResponse,
|
|
457
|
+
type TileGetDailyActiveUsersResponse as TileGetDailyActiveUsersResponse,
|
|
458
|
+
type TileGetMonthlyActiveUsersResponse as TileGetMonthlyActiveUsersResponse,
|
|
459
|
+
type TileGetPagesPerSessionResponse as TileGetPagesPerSessionResponse,
|
|
460
|
+
type TileGetReturnRateResponse as TileGetReturnRateResponse,
|
|
461
|
+
type TileGetSessionDurationResponse as TileGetSessionDurationResponse,
|
|
462
|
+
type TileGetTimeBetweenVisitsResponse as TileGetTimeBetweenVisitsResponse,
|
|
463
|
+
type TileGetTrafficByCountryResponse as TileGetTrafficByCountryResponse,
|
|
464
|
+
type TileGetTrafficByRefererResponse as TileGetTrafficByRefererResponse,
|
|
465
|
+
type TileGetTrafficByUtmResponse as TileGetTrafficByUtmResponse,
|
|
466
|
+
type TileGetUniqueSessionsResponse as TileGetUniqueSessionsResponse,
|
|
467
|
+
type TileGetUniqueVisitorsResponse as TileGetUniqueVisitorsResponse,
|
|
468
|
+
type TileGetWeeklyActiveUsersResponse as TileGetWeeklyActiveUsersResponse,
|
|
469
|
+
type TileGetBounceRateParams as TileGetBounceRateParams,
|
|
470
|
+
type TileGetDailyActiveUsersParams as TileGetDailyActiveUsersParams,
|
|
471
|
+
type TileGetMonthlyActiveUsersParams as TileGetMonthlyActiveUsersParams,
|
|
472
|
+
type TileGetPagesPerSessionParams as TileGetPagesPerSessionParams,
|
|
473
|
+
type TileGetReturnRateParams as TileGetReturnRateParams,
|
|
474
|
+
type TileGetSessionDurationParams as TileGetSessionDurationParams,
|
|
475
|
+
type TileGetTimeBetweenVisitsParams as TileGetTimeBetweenVisitsParams,
|
|
476
|
+
type TileGetTrafficByCountryParams as TileGetTrafficByCountryParams,
|
|
477
|
+
type TileGetTrafficByRefererParams as TileGetTrafficByRefererParams,
|
|
478
|
+
type TileGetTrafficByUtmParams as TileGetTrafficByUtmParams,
|
|
479
|
+
type TileGetUniqueSessionsParams as TileGetUniqueSessionsParams,
|
|
480
|
+
type TileGetUniqueVisitorsParams as TileGetUniqueVisitorsParams,
|
|
481
|
+
type TileGetWeeklyActiveUsersParams as TileGetWeeklyActiveUsersParams,
|
|
508
482
|
};
|
|
509
483
|
}
|
|
@@ -7,7 +7,8 @@ import { RequestOptions } from '../../../internal/request-options';
|
|
|
7
7
|
|
|
8
8
|
export class Events extends APIResource {
|
|
9
9
|
/**
|
|
10
|
-
* Get unique traffic origins
|
|
10
|
+
* Get unique traffic origins, page paths, and event names to populate filter
|
|
11
|
+
* dropdowns
|
|
11
12
|
*
|
|
12
13
|
* @example
|
|
13
14
|
* ```ts
|
|
@@ -27,7 +28,7 @@ export class Events extends APIResource {
|
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
30
|
* Get a list of recent events with optional filters (visitor_id, user_id,
|
|
30
|
-
* external_id, traffic_origin, page_path)
|
|
31
|
+
* external_id, traffic_origin, page_path, event_name)
|
|
31
32
|
*
|
|
32
33
|
* @example
|
|
33
34
|
* ```ts
|
|
@@ -70,19 +71,21 @@ export interface EventRecentParams {
|
|
|
70
71
|
|
|
71
72
|
customer_id?: string;
|
|
72
73
|
|
|
73
|
-
|
|
74
|
+
event_name?: string;
|
|
75
|
+
|
|
76
|
+
external_id?: string;
|
|
74
77
|
|
|
75
78
|
limit?: number;
|
|
76
79
|
|
|
77
80
|
offset?: number;
|
|
78
81
|
|
|
79
|
-
|
|
82
|
+
page_path?: string;
|
|
80
83
|
|
|
81
84
|
referrer?: string;
|
|
82
85
|
|
|
83
|
-
|
|
86
|
+
traffic_origin?: string;
|
|
84
87
|
|
|
85
|
-
|
|
88
|
+
user_id?: string;
|
|
86
89
|
|
|
87
90
|
utmtag?: string;
|
|
88
91
|
|
|
@@ -2,51 +2,61 @@
|
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
4
|
Analytics,
|
|
5
|
-
type ActiveUsersResponse,
|
|
6
|
-
type BounceRateByPageMetric,
|
|
7
|
-
type BounceRateResponse,
|
|
8
5
|
type ChurnRateResponse,
|
|
9
6
|
type CohortAnalysisResponse,
|
|
10
7
|
type CohortData,
|
|
11
|
-
type CountryDataPoint,
|
|
12
|
-
type DashboardMetricsResponse,
|
|
13
8
|
type EventFilterOptionsResponse,
|
|
14
9
|
type EventsOverTimeDataPoint,
|
|
15
10
|
type ManualIdentifyRequest,
|
|
16
11
|
type ManualIdentifyResponse,
|
|
17
|
-
type OriginDataPoint,
|
|
18
12
|
type RecentEvent,
|
|
19
13
|
type RecentEventsResponse,
|
|
20
|
-
type ReturnRateResponse,
|
|
21
|
-
type SessionMetricsResponse,
|
|
22
14
|
type TopVisitor,
|
|
23
15
|
type TopVisitorsResponse,
|
|
24
|
-
type UniqueVisitorsDataPoint,
|
|
25
|
-
type UniqueVisitorsTimelineResponse,
|
|
26
16
|
type VisitorDataPoint,
|
|
27
17
|
type VisitorEvent,
|
|
28
18
|
type VisitorProfileResponse,
|
|
29
|
-
type VisitorsByCountryResponse,
|
|
30
19
|
type VisitorsByDeviceResponse,
|
|
31
|
-
type
|
|
32
|
-
type
|
|
20
|
+
type AnalyticsRetrieveTimelineResponse,
|
|
21
|
+
type AnalyticsRetrieveTimelineParams,
|
|
33
22
|
} from './analytics';
|
|
34
23
|
export { Events, type EventFilterOptionsParams, type EventRecentParams } from './events';
|
|
24
|
+
export { Retention, type RetentionChurnRateParams, type RetentionCohortsParams } from './retention';
|
|
25
|
+
export { Sessions } from './sessions';
|
|
35
26
|
export {
|
|
36
|
-
|
|
37
|
-
type
|
|
38
|
-
type
|
|
39
|
-
type
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
27
|
+
Tiles,
|
|
28
|
+
type TileGetBounceRateResponse,
|
|
29
|
+
type TileGetDailyActiveUsersResponse,
|
|
30
|
+
type TileGetMonthlyActiveUsersResponse,
|
|
31
|
+
type TileGetPagesPerSessionResponse,
|
|
32
|
+
type TileGetReturnRateResponse,
|
|
33
|
+
type TileGetSessionDurationResponse,
|
|
34
|
+
type TileGetTimeBetweenVisitsResponse,
|
|
35
|
+
type TileGetTrafficByCountryResponse,
|
|
36
|
+
type TileGetTrafficByRefererResponse,
|
|
37
|
+
type TileGetTrafficByUtmResponse,
|
|
38
|
+
type TileGetUniqueSessionsResponse,
|
|
39
|
+
type TileGetUniqueVisitorsResponse,
|
|
40
|
+
type TileGetWeeklyActiveUsersResponse,
|
|
41
|
+
type TileGetBounceRateParams,
|
|
42
|
+
type TileGetDailyActiveUsersParams,
|
|
43
|
+
type TileGetMonthlyActiveUsersParams,
|
|
44
|
+
type TileGetPagesPerSessionParams,
|
|
45
|
+
type TileGetReturnRateParams,
|
|
46
|
+
type TileGetSessionDurationParams,
|
|
47
|
+
type TileGetTimeBetweenVisitsParams,
|
|
48
|
+
type TileGetTrafficByCountryParams,
|
|
49
|
+
type TileGetTrafficByRefererParams,
|
|
50
|
+
type TileGetTrafficByUtmParams,
|
|
51
|
+
type TileGetUniqueSessionsParams,
|
|
52
|
+
type TileGetUniqueVisitorsParams,
|
|
53
|
+
type TileGetWeeklyActiveUsersParams,
|
|
54
|
+
} from './tiles';
|
|
55
|
+
export { Users } from './users';
|
|
43
56
|
export {
|
|
44
57
|
Visitors,
|
|
45
|
-
type VisitorByCountryParams,
|
|
46
58
|
type VisitorByDeviceParams,
|
|
47
|
-
type VisitorByOriginParams,
|
|
48
59
|
type VisitorIdentifyParams,
|
|
49
60
|
type VisitorProfileParams,
|
|
50
|
-
type VisitorTimelineParams,
|
|
51
61
|
type VisitorTopParams,
|
|
52
62
|
} from './visitors';
|
|
@@ -43,25 +43,6 @@ export class Retention extends APIResource {
|
|
|
43
43
|
): APIPromise<AnalyticsAPI.CohortAnalysisResponse> {
|
|
44
44
|
return this._client.get('/api/v1/analytics/retention/cohorts', { query, ...options });
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Get metrics about user return rate and time between sessions
|
|
49
|
-
*
|
|
50
|
-
* @example
|
|
51
|
-
* ```ts
|
|
52
|
-
* const returnRateResponse =
|
|
53
|
-
* await client.v1.analytics.retention.returnRate({
|
|
54
|
-
* project_id: 'project_id',
|
|
55
|
-
* time_range: 'last_hour',
|
|
56
|
-
* });
|
|
57
|
-
* ```
|
|
58
|
-
*/
|
|
59
|
-
returnRate(
|
|
60
|
-
query: RetentionReturnRateParams,
|
|
61
|
-
options?: RequestOptions,
|
|
62
|
-
): APIPromise<AnalyticsAPI.ReturnRateResponse> {
|
|
63
|
-
return this._client.get('/api/v1/analytics/retention/return-rate', { query, ...options });
|
|
64
|
-
}
|
|
65
46
|
}
|
|
66
47
|
|
|
67
48
|
export interface RetentionChurnRateParams {
|
|
@@ -104,30 +85,9 @@ export interface RetentionCohortsParams {
|
|
|
104
85
|
visitor_id?: string;
|
|
105
86
|
}
|
|
106
87
|
|
|
107
|
-
export interface RetentionReturnRateParams {
|
|
108
|
-
project_id: string;
|
|
109
|
-
|
|
110
|
-
time_range: 'last_hour' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days';
|
|
111
|
-
|
|
112
|
-
customer_id?: string;
|
|
113
|
-
|
|
114
|
-
limit?: number;
|
|
115
|
-
|
|
116
|
-
offset?: number;
|
|
117
|
-
|
|
118
|
-
referrer?: string;
|
|
119
|
-
|
|
120
|
-
utmtag?: string;
|
|
121
|
-
|
|
122
|
-
utmtagValue?: string;
|
|
123
|
-
|
|
124
|
-
visitor_id?: string;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
88
|
export declare namespace Retention {
|
|
128
89
|
export {
|
|
129
90
|
type RetentionChurnRateParams as RetentionChurnRateParams,
|
|
130
91
|
type RetentionCohortsParams as RetentionCohortsParams,
|
|
131
|
-
type RetentionReturnRateParams as RetentionReturnRateParams,
|
|
132
92
|
};
|
|
133
93
|
}
|
|
@@ -1,93 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
|
-
import * as AnalyticsAPI from './analytics';
|
|
5
|
-
import { APIPromise } from '../../../core/api-promise';
|
|
6
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
7
4
|
|
|
8
|
-
export class Sessions extends APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* Get bounce rate metrics including overall bounce rate and per-page breakdown
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* const bounceRateResponse =
|
|
15
|
-
* await client.v1.analytics.sessions.bounceRate({
|
|
16
|
-
* project_id: 'project_id',
|
|
17
|
-
* time_range: 'last_hour',
|
|
18
|
-
* });
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
bounceRate(
|
|
22
|
-
query: SessionBounceRateParams,
|
|
23
|
-
options?: RequestOptions,
|
|
24
|
-
): APIPromise<AnalyticsAPI.BounceRateResponse> {
|
|
25
|
-
return this._client.get('/api/v1/analytics/sessions/bounce-rate', { query, ...options });
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Get session metrics including average duration and pages per session
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```ts
|
|
33
|
-
* const sessionMetricsResponse =
|
|
34
|
-
* await client.v1.analytics.sessions.metrics({
|
|
35
|
-
* project_id: 'project_id',
|
|
36
|
-
* time_range: 'last_hour',
|
|
37
|
-
* });
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
metrics(
|
|
41
|
-
query: SessionMetricsParams,
|
|
42
|
-
options?: RequestOptions,
|
|
43
|
-
): APIPromise<AnalyticsAPI.SessionMetricsResponse> {
|
|
44
|
-
return this._client.get('/api/v1/analytics/sessions/metrics', { query, ...options });
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface SessionBounceRateParams {
|
|
49
|
-
project_id: string;
|
|
50
|
-
|
|
51
|
-
time_range: 'last_hour' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days';
|
|
52
|
-
|
|
53
|
-
customer_id?: string;
|
|
54
|
-
|
|
55
|
-
limit?: number;
|
|
56
|
-
|
|
57
|
-
offset?: number;
|
|
58
|
-
|
|
59
|
-
referrer?: string;
|
|
60
|
-
|
|
61
|
-
utmtag?: string;
|
|
62
|
-
|
|
63
|
-
utmtagValue?: string;
|
|
64
|
-
|
|
65
|
-
visitor_id?: string;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export interface SessionMetricsParams {
|
|
69
|
-
project_id: string;
|
|
70
|
-
|
|
71
|
-
time_range: 'last_hour' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days';
|
|
72
|
-
|
|
73
|
-
customer_id?: string;
|
|
74
|
-
|
|
75
|
-
limit?: number;
|
|
76
|
-
|
|
77
|
-
offset?: number;
|
|
78
|
-
|
|
79
|
-
referrer?: string;
|
|
80
|
-
|
|
81
|
-
utmtag?: string;
|
|
82
|
-
|
|
83
|
-
utmtagValue?: string;
|
|
84
|
-
|
|
85
|
-
visitor_id?: string;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export declare namespace Sessions {
|
|
89
|
-
export {
|
|
90
|
-
type SessionBounceRateParams as SessionBounceRateParams,
|
|
91
|
-
type SessionMetricsParams as SessionMetricsParams,
|
|
92
|
-
};
|
|
93
|
-
}
|
|
5
|
+
export class Sessions extends APIResource {}
|