@oursprivacy/platform-sdk 1.67.0 → 1.69.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 +14 -0
- package/client.d.mts +8 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -2
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/analytics.d.mts +10 -0
- package/resources/analytics.d.mts.map +1 -1
- package/resources/analytics.d.ts +10 -0
- package/resources/analytics.d.ts.map +1 -1
- package/resources/dashboards.d.mts +696 -34
- package/resources/dashboards.d.mts.map +1 -1
- package/resources/dashboards.d.ts +696 -34
- package/resources/dashboards.d.ts.map +1 -1
- package/resources/destinations.d.mts +7 -7
- package/resources/destinations.d.mts.map +1 -1
- package/resources/destinations.d.ts +7 -7
- package/resources/destinations.d.ts.map +1 -1
- package/resources/funnels.d.mts +255 -9
- package/resources/funnels.d.mts.map +1 -1
- package/resources/funnels.d.ts +255 -9
- package/resources/funnels.d.ts.map +1 -1
- package/resources/funnels.js +10 -7
- package/resources/funnels.js.map +1 -1
- package/resources/funnels.mjs +10 -7
- package/resources/funnels.mjs.map +1 -1
- package/resources/index.d.mts +3 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/insights.d.mts +178 -57
- package/resources/insights.d.mts.map +1 -1
- package/resources/insights.d.ts +178 -57
- package/resources/insights.d.ts.map +1 -1
- package/resources/insights.js +9 -7
- package/resources/insights.js.map +1 -1
- package/resources/insights.mjs +9 -7
- package/resources/insights.mjs.map +1 -1
- package/resources/journey-flows.d.mts +242 -18
- package/resources/journey-flows.d.mts.map +1 -1
- package/resources/journey-flows.d.ts +242 -18
- package/resources/journey-flows.d.ts.map +1 -1
- package/resources/journey-flows.js +18 -12
- package/resources/journey-flows.js.map +1 -1
- package/resources/journey-flows.mjs +18 -12
- package/resources/journey-flows.mjs.map +1 -1
- package/resources/query-events.d.mts +324 -0
- package/resources/query-events.d.mts.map +1 -0
- package/resources/query-events.d.ts +324 -0
- package/resources/query-events.d.ts.map +1 -0
- package/resources/query-events.js +64 -0
- package/resources/query-events.js.map +1 -0
- package/resources/query-events.mjs +60 -0
- package/resources/query-events.mjs.map +1 -0
- package/resources/query-visitors.d.mts +127 -0
- package/resources/query-visitors.d.mts.map +1 -0
- package/resources/query-visitors.d.ts +127 -0
- package/resources/query-visitors.d.ts.map +1 -0
- package/resources/query-visitors.js +35 -0
- package/resources/query-visitors.js.map +1 -0
- package/resources/query-visitors.mjs +31 -0
- package/resources/query-visitors.mjs.map +1 -0
- package/resources/report-branding.d.mts +112 -28
- package/resources/report-branding.d.mts.map +1 -1
- package/resources/report-branding.d.ts +112 -28
- package/resources/report-branding.d.ts.map +1 -1
- package/resources/report-branding.js +29 -15
- package/resources/report-branding.js.map +1 -1
- package/resources/report-branding.mjs +29 -15
- package/resources/report-branding.mjs.map +1 -1
- package/resources/sources.d.mts +6 -6
- package/resources/sources.d.mts.map +1 -1
- package/resources/sources.d.ts +6 -6
- package/resources/sources.d.ts.map +1 -1
- package/resources/test-events.d.mts +28 -0
- package/resources/test-events.d.mts.map +1 -1
- package/resources/test-events.d.ts +28 -0
- package/resources/test-events.d.ts.map +1 -1
- package/resources/web-analytics.d.mts +25 -1
- package/resources/web-analytics.d.mts.map +1 -1
- package/resources/web-analytics.d.ts +25 -1
- package/resources/web-analytics.d.ts.map +1 -1
- package/src/client.ts +54 -0
- package/src/resources/analytics.ts +12 -0
- package/src/resources/dashboards.ts +939 -47
- package/src/resources/destinations.ts +23 -2
- package/src/resources/funnels.ts +334 -9
- package/src/resources/index.ts +24 -0
- package/src/resources/insights.ts +224 -57
- package/src/resources/journey-flows.ts +300 -22
- package/src/resources/query-events.ts +459 -0
- package/src/resources/query-visitors.ts +190 -0
- package/src/resources/report-branding.ts +132 -27
- package/src/resources/sources.ts +12 -0
- package/src/resources/test-events.ts +33 -0
- package/src/resources/web-analytics.ts +41 -1
- 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
|
@@ -74,9 +74,11 @@ export class Insights extends APIResource {
|
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* Compute a saved Insight using expectedRevision with optional date, smoothing,
|
|
77
|
-
* cumulative, and
|
|
78
|
-
*
|
|
79
|
-
*
|
|
77
|
+
* cumulative, comparison, and breakdown overrides. A breakdown splits every metric
|
|
78
|
+
* into one series per property value (top values plus Other and (not set)); unique
|
|
79
|
+
* visitor and average series do not add up across segments. Overrides do not
|
|
80
|
+
* change the saved report. Requires API-key scope or current OAuth user
|
|
81
|
+
* permission: web-analytics:view, variables:find-custom
|
|
80
82
|
*/
|
|
81
83
|
results(
|
|
82
84
|
id: string,
|
|
@@ -87,10 +89,10 @@ export class Insights extends APIResource {
|
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
/**
|
|
90
|
-
* Compute an unsaved Insight preview from its metric definition and date range
|
|
91
|
-
* JSON-encode input in the query
|
|
92
|
-
* Requires API-key scope or
|
|
93
|
-
* variables:find-custom
|
|
92
|
+
* Compute an unsaved Insight preview from its metric definition and date range,
|
|
93
|
+
* optionally with a comparison and a breakdown. JSON-encode input in the query
|
|
94
|
+
* string; maximum 16384 bytes before URL encoding. Requires API-key scope or
|
|
95
|
+
* current OAuth user permission: web-analytics:view, variables:find-custom
|
|
94
96
|
*/
|
|
95
97
|
preview(query: InsightPreviewParams, options?: RequestOptions): APIPromise<InsightPreviewResponse> {
|
|
96
98
|
return this._client.get('/rest/v1/insights/preview', { query, ...options });
|
|
@@ -107,9 +109,10 @@ export interface InsightListResponse {
|
|
|
107
109
|
createdByUserId: string;
|
|
108
110
|
|
|
109
111
|
/**
|
|
110
|
-
* Version 1 Insight definition: one to ten metrics and
|
|
111
|
-
* interval. Sum and average require a numeric event
|
|
112
|
-
*
|
|
112
|
+
* Version 1 Insight definition: one to ten metrics and an hour, day, week, or
|
|
113
|
+
* month interval (up to 366 buckets). Sum and average require a numeric event
|
|
114
|
+
* property. Metrics select eventNames or allEvents. includeBots defaults to false.
|
|
115
|
+
* Filters use the analytics property catalog.
|
|
113
116
|
*/
|
|
114
117
|
definition: InsightListResponse.Definition;
|
|
115
118
|
|
|
@@ -144,12 +147,13 @@ export interface InsightListResponse {
|
|
|
144
147
|
|
|
145
148
|
export namespace InsightListResponse {
|
|
146
149
|
/**
|
|
147
|
-
* Version 1 Insight definition: one to ten metrics and
|
|
148
|
-
* interval. Sum and average require a numeric event
|
|
149
|
-
*
|
|
150
|
+
* Version 1 Insight definition: one to ten metrics and an hour, day, week, or
|
|
151
|
+
* month interval (up to 366 buckets). Sum and average require a numeric event
|
|
152
|
+
* property. Metrics select eventNames or allEvents. includeBots defaults to false.
|
|
153
|
+
* Filters use the analytics property catalog.
|
|
150
154
|
*/
|
|
151
155
|
export interface Definition {
|
|
152
|
-
interval: 'day' | 'week' | 'month';
|
|
156
|
+
interval: 'hour' | 'day' | 'week' | 'month';
|
|
153
157
|
|
|
154
158
|
kind: 'insight';
|
|
155
159
|
|
|
@@ -158,6 +162,11 @@ export namespace InsightListResponse {
|
|
|
158
162
|
version: 1;
|
|
159
163
|
|
|
160
164
|
filter?: Definition.Filter;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Include bot events and sessions; test events remain excluded. Defaults to false.
|
|
168
|
+
*/
|
|
169
|
+
includeBots?: boolean;
|
|
161
170
|
}
|
|
162
171
|
|
|
163
172
|
export namespace Definition {
|
|
@@ -174,6 +183,11 @@ export namespace InsightListResponse {
|
|
|
174
183
|
|
|
175
184
|
name: string;
|
|
176
185
|
|
|
186
|
+
/**
|
|
187
|
+
* Count every event name. Requires an empty eventNames array.
|
|
188
|
+
*/
|
|
189
|
+
allEvents?: boolean;
|
|
190
|
+
|
|
177
191
|
filter?: Metric.Filter;
|
|
178
192
|
|
|
179
193
|
property?: Metric.Property;
|
|
@@ -372,9 +386,10 @@ export interface InsightCreateResponse {
|
|
|
372
386
|
createdByUserId: string;
|
|
373
387
|
|
|
374
388
|
/**
|
|
375
|
-
* Version 1 Insight definition: one to ten metrics and
|
|
376
|
-
* interval. Sum and average require a numeric event
|
|
377
|
-
*
|
|
389
|
+
* Version 1 Insight definition: one to ten metrics and an hour, day, week, or
|
|
390
|
+
* month interval (up to 366 buckets). Sum and average require a numeric event
|
|
391
|
+
* property. Metrics select eventNames or allEvents. includeBots defaults to false.
|
|
392
|
+
* Filters use the analytics property catalog.
|
|
378
393
|
*/
|
|
379
394
|
definition: InsightCreateResponse.Definition;
|
|
380
395
|
|
|
@@ -409,12 +424,13 @@ export interface InsightCreateResponse {
|
|
|
409
424
|
|
|
410
425
|
export namespace InsightCreateResponse {
|
|
411
426
|
/**
|
|
412
|
-
* Version 1 Insight definition: one to ten metrics and
|
|
413
|
-
* interval. Sum and average require a numeric event
|
|
414
|
-
*
|
|
427
|
+
* Version 1 Insight definition: one to ten metrics and an hour, day, week, or
|
|
428
|
+
* month interval (up to 366 buckets). Sum and average require a numeric event
|
|
429
|
+
* property. Metrics select eventNames or allEvents. includeBots defaults to false.
|
|
430
|
+
* Filters use the analytics property catalog.
|
|
415
431
|
*/
|
|
416
432
|
export interface Definition {
|
|
417
|
-
interval: 'day' | 'week' | 'month';
|
|
433
|
+
interval: 'hour' | 'day' | 'week' | 'month';
|
|
418
434
|
|
|
419
435
|
kind: 'insight';
|
|
420
436
|
|
|
@@ -423,6 +439,11 @@ export namespace InsightCreateResponse {
|
|
|
423
439
|
version: 1;
|
|
424
440
|
|
|
425
441
|
filter?: Definition.Filter;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Include bot events and sessions; test events remain excluded. Defaults to false.
|
|
445
|
+
*/
|
|
446
|
+
includeBots?: boolean;
|
|
426
447
|
}
|
|
427
448
|
|
|
428
449
|
export namespace Definition {
|
|
@@ -439,6 +460,11 @@ export namespace InsightCreateResponse {
|
|
|
439
460
|
|
|
440
461
|
name: string;
|
|
441
462
|
|
|
463
|
+
/**
|
|
464
|
+
* Count every event name. Requires an empty eventNames array.
|
|
465
|
+
*/
|
|
466
|
+
allEvents?: boolean;
|
|
467
|
+
|
|
442
468
|
filter?: Metric.Filter;
|
|
443
469
|
|
|
444
470
|
property?: Metric.Property;
|
|
@@ -637,9 +663,10 @@ export interface InsightRetrieveResponse {
|
|
|
637
663
|
createdByUserId: string;
|
|
638
664
|
|
|
639
665
|
/**
|
|
640
|
-
* Version 1 Insight definition: one to ten metrics and
|
|
641
|
-
* interval. Sum and average require a numeric event
|
|
642
|
-
*
|
|
666
|
+
* Version 1 Insight definition: one to ten metrics and an hour, day, week, or
|
|
667
|
+
* month interval (up to 366 buckets). Sum and average require a numeric event
|
|
668
|
+
* property. Metrics select eventNames or allEvents. includeBots defaults to false.
|
|
669
|
+
* Filters use the analytics property catalog.
|
|
643
670
|
*/
|
|
644
671
|
definition: InsightRetrieveResponse.Definition;
|
|
645
672
|
|
|
@@ -674,12 +701,13 @@ export interface InsightRetrieveResponse {
|
|
|
674
701
|
|
|
675
702
|
export namespace InsightRetrieveResponse {
|
|
676
703
|
/**
|
|
677
|
-
* Version 1 Insight definition: one to ten metrics and
|
|
678
|
-
* interval. Sum and average require a numeric event
|
|
679
|
-
*
|
|
704
|
+
* Version 1 Insight definition: one to ten metrics and an hour, day, week, or
|
|
705
|
+
* month interval (up to 366 buckets). Sum and average require a numeric event
|
|
706
|
+
* property. Metrics select eventNames or allEvents. includeBots defaults to false.
|
|
707
|
+
* Filters use the analytics property catalog.
|
|
680
708
|
*/
|
|
681
709
|
export interface Definition {
|
|
682
|
-
interval: 'day' | 'week' | 'month';
|
|
710
|
+
interval: 'hour' | 'day' | 'week' | 'month';
|
|
683
711
|
|
|
684
712
|
kind: 'insight';
|
|
685
713
|
|
|
@@ -688,6 +716,11 @@ export namespace InsightRetrieveResponse {
|
|
|
688
716
|
version: 1;
|
|
689
717
|
|
|
690
718
|
filter?: Definition.Filter;
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* Include bot events and sessions; test events remain excluded. Defaults to false.
|
|
722
|
+
*/
|
|
723
|
+
includeBots?: boolean;
|
|
691
724
|
}
|
|
692
725
|
|
|
693
726
|
export namespace Definition {
|
|
@@ -704,6 +737,11 @@ export namespace InsightRetrieveResponse {
|
|
|
704
737
|
|
|
705
738
|
name: string;
|
|
706
739
|
|
|
740
|
+
/**
|
|
741
|
+
* Count every event name. Requires an empty eventNames array.
|
|
742
|
+
*/
|
|
743
|
+
allEvents?: boolean;
|
|
744
|
+
|
|
707
745
|
filter?: Metric.Filter;
|
|
708
746
|
|
|
709
747
|
property?: Metric.Property;
|
|
@@ -902,9 +940,10 @@ export interface InsightUpdateResponse {
|
|
|
902
940
|
createdByUserId: string;
|
|
903
941
|
|
|
904
942
|
/**
|
|
905
|
-
* Version 1 Insight definition: one to ten metrics and
|
|
906
|
-
* interval. Sum and average require a numeric event
|
|
907
|
-
*
|
|
943
|
+
* Version 1 Insight definition: one to ten metrics and an hour, day, week, or
|
|
944
|
+
* month interval (up to 366 buckets). Sum and average require a numeric event
|
|
945
|
+
* property. Metrics select eventNames or allEvents. includeBots defaults to false.
|
|
946
|
+
* Filters use the analytics property catalog.
|
|
908
947
|
*/
|
|
909
948
|
definition: InsightUpdateResponse.Definition;
|
|
910
949
|
|
|
@@ -939,12 +978,13 @@ export interface InsightUpdateResponse {
|
|
|
939
978
|
|
|
940
979
|
export namespace InsightUpdateResponse {
|
|
941
980
|
/**
|
|
942
|
-
* Version 1 Insight definition: one to ten metrics and
|
|
943
|
-
* interval. Sum and average require a numeric event
|
|
944
|
-
*
|
|
981
|
+
* Version 1 Insight definition: one to ten metrics and an hour, day, week, or
|
|
982
|
+
* month interval (up to 366 buckets). Sum and average require a numeric event
|
|
983
|
+
* property. Metrics select eventNames or allEvents. includeBots defaults to false.
|
|
984
|
+
* Filters use the analytics property catalog.
|
|
945
985
|
*/
|
|
946
986
|
export interface Definition {
|
|
947
|
-
interval: 'day' | 'week' | 'month';
|
|
987
|
+
interval: 'hour' | 'day' | 'week' | 'month';
|
|
948
988
|
|
|
949
989
|
kind: 'insight';
|
|
950
990
|
|
|
@@ -953,6 +993,11 @@ export namespace InsightUpdateResponse {
|
|
|
953
993
|
version: 1;
|
|
954
994
|
|
|
955
995
|
filter?: Definition.Filter;
|
|
996
|
+
|
|
997
|
+
/**
|
|
998
|
+
* Include bot events and sessions; test events remain excluded. Defaults to false.
|
|
999
|
+
*/
|
|
1000
|
+
includeBots?: boolean;
|
|
956
1001
|
}
|
|
957
1002
|
|
|
958
1003
|
export namespace Definition {
|
|
@@ -969,6 +1014,11 @@ export namespace InsightUpdateResponse {
|
|
|
969
1014
|
|
|
970
1015
|
name: string;
|
|
971
1016
|
|
|
1017
|
+
/**
|
|
1018
|
+
* Count every event name. Requires an empty eventNames array.
|
|
1019
|
+
*/
|
|
1020
|
+
allEvents?: boolean;
|
|
1021
|
+
|
|
972
1022
|
filter?: Metric.Filter;
|
|
973
1023
|
|
|
974
1024
|
property?: Metric.Property;
|
|
@@ -1170,6 +1220,8 @@ export interface InsightDeleteResponse {
|
|
|
1170
1220
|
export interface InsightCapabilitiesResponse {
|
|
1171
1221
|
definitionVersion: 1;
|
|
1172
1222
|
|
|
1223
|
+
maxBreakdownSegments: 10;
|
|
1224
|
+
|
|
1173
1225
|
maxDateRangeDays: 366;
|
|
1174
1226
|
|
|
1175
1227
|
maxEventNamesPerMetric: 10;
|
|
@@ -1200,13 +1252,13 @@ export interface InsightCapabilitiesResponse {
|
|
|
1200
1252
|
| 'year_to_date'
|
|
1201
1253
|
>;
|
|
1202
1254
|
|
|
1203
|
-
supportedIntervals: Array<'day' | 'week' | 'month'>;
|
|
1255
|
+
supportedIntervals: Array<'hour' | 'day' | 'week' | 'month'>;
|
|
1204
1256
|
|
|
1205
1257
|
supportedSmoothing: Array<'none' | 'rolling_average'>;
|
|
1206
1258
|
|
|
1207
1259
|
supportedVisualizations: Array<'line' | 'column' | 'bar' | 'pie' | 'table' | 'metric'>;
|
|
1208
1260
|
|
|
1209
|
-
supportsBreakdowns:
|
|
1261
|
+
supportsBreakdowns: true;
|
|
1210
1262
|
|
|
1211
1263
|
supportsComparisons: true;
|
|
1212
1264
|
|
|
@@ -1253,7 +1305,7 @@ export namespace InsightResultsResponse {
|
|
|
1253
1305
|
|
|
1254
1306
|
from: string;
|
|
1255
1307
|
|
|
1256
|
-
interval: 'day' | 'week' | 'month';
|
|
1308
|
+
interval: 'hour' | 'day' | 'week' | 'month';
|
|
1257
1309
|
|
|
1258
1310
|
sourceCompleteness: 'unknown';
|
|
1259
1311
|
|
|
@@ -1261,10 +1313,36 @@ export namespace InsightResultsResponse {
|
|
|
1261
1313
|
|
|
1262
1314
|
to: string;
|
|
1263
1315
|
|
|
1316
|
+
breakdown?: Scope.Breakdown | null;
|
|
1317
|
+
|
|
1264
1318
|
comparison?: Scope.Comparison | null;
|
|
1265
1319
|
}
|
|
1266
1320
|
|
|
1267
1321
|
export namespace Scope {
|
|
1322
|
+
export interface Breakdown {
|
|
1323
|
+
atAnchorId: string | null;
|
|
1324
|
+
|
|
1325
|
+
limit: number;
|
|
1326
|
+
|
|
1327
|
+
property: Breakdown.Property;
|
|
1328
|
+
|
|
1329
|
+
stepNumber: number | null;
|
|
1330
|
+
|
|
1331
|
+
truncated: boolean;
|
|
1332
|
+
|
|
1333
|
+
valueCount: number;
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
export namespace Breakdown {
|
|
1337
|
+
export interface Property {
|
|
1338
|
+
property: string;
|
|
1339
|
+
|
|
1340
|
+
type: 'string' | 'number' | 'boolean';
|
|
1341
|
+
|
|
1342
|
+
path?: Array<string>;
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1268
1346
|
export interface Comparison {
|
|
1269
1347
|
from: string;
|
|
1270
1348
|
|
|
@@ -1290,6 +1368,8 @@ export namespace InsightResultsResponse {
|
|
|
1290
1368
|
points: Array<Series.Point>;
|
|
1291
1369
|
|
|
1292
1370
|
rangeValue: number | null;
|
|
1371
|
+
|
|
1372
|
+
segment?: Series.Segment | null;
|
|
1293
1373
|
}
|
|
1294
1374
|
|
|
1295
1375
|
export namespace Series {
|
|
@@ -1312,6 +1392,18 @@ export namespace InsightResultsResponse {
|
|
|
1312
1392
|
|
|
1313
1393
|
smoothed: number | null;
|
|
1314
1394
|
}
|
|
1395
|
+
|
|
1396
|
+
export interface Segment {
|
|
1397
|
+
key: string;
|
|
1398
|
+
|
|
1399
|
+
kind: 'value' | 'other' | 'not_set';
|
|
1400
|
+
|
|
1401
|
+
label: string;
|
|
1402
|
+
|
|
1403
|
+
rank: number;
|
|
1404
|
+
|
|
1405
|
+
value: string | null;
|
|
1406
|
+
}
|
|
1315
1407
|
}
|
|
1316
1408
|
}
|
|
1317
1409
|
|
|
@@ -1349,7 +1441,7 @@ export namespace InsightPreviewResponse {
|
|
|
1349
1441
|
|
|
1350
1442
|
from: string;
|
|
1351
1443
|
|
|
1352
|
-
interval: 'day' | 'week' | 'month';
|
|
1444
|
+
interval: 'hour' | 'day' | 'week' | 'month';
|
|
1353
1445
|
|
|
1354
1446
|
sourceCompleteness: 'unknown';
|
|
1355
1447
|
|
|
@@ -1357,10 +1449,36 @@ export namespace InsightPreviewResponse {
|
|
|
1357
1449
|
|
|
1358
1450
|
to: string;
|
|
1359
1451
|
|
|
1452
|
+
breakdown?: Scope.Breakdown | null;
|
|
1453
|
+
|
|
1360
1454
|
comparison?: Scope.Comparison | null;
|
|
1361
1455
|
}
|
|
1362
1456
|
|
|
1363
1457
|
export namespace Scope {
|
|
1458
|
+
export interface Breakdown {
|
|
1459
|
+
atAnchorId: string | null;
|
|
1460
|
+
|
|
1461
|
+
limit: number;
|
|
1462
|
+
|
|
1463
|
+
property: Breakdown.Property;
|
|
1464
|
+
|
|
1465
|
+
stepNumber: number | null;
|
|
1466
|
+
|
|
1467
|
+
truncated: boolean;
|
|
1468
|
+
|
|
1469
|
+
valueCount: number;
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
export namespace Breakdown {
|
|
1473
|
+
export interface Property {
|
|
1474
|
+
property: string;
|
|
1475
|
+
|
|
1476
|
+
type: 'string' | 'number' | 'boolean';
|
|
1477
|
+
|
|
1478
|
+
path?: Array<string>;
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1364
1482
|
export interface Comparison {
|
|
1365
1483
|
from: string;
|
|
1366
1484
|
|
|
@@ -1386,6 +1504,8 @@ export namespace InsightPreviewResponse {
|
|
|
1386
1504
|
points: Array<Series.Point>;
|
|
1387
1505
|
|
|
1388
1506
|
rangeValue: number | null;
|
|
1507
|
+
|
|
1508
|
+
segment?: Series.Segment | null;
|
|
1389
1509
|
}
|
|
1390
1510
|
|
|
1391
1511
|
export namespace Series {
|
|
@@ -1408,6 +1528,18 @@ export namespace InsightPreviewResponse {
|
|
|
1408
1528
|
|
|
1409
1529
|
smoothed: number | null;
|
|
1410
1530
|
}
|
|
1531
|
+
|
|
1532
|
+
export interface Segment {
|
|
1533
|
+
key: string;
|
|
1534
|
+
|
|
1535
|
+
kind: 'value' | 'other' | 'not_set';
|
|
1536
|
+
|
|
1537
|
+
label: string;
|
|
1538
|
+
|
|
1539
|
+
rank: number;
|
|
1540
|
+
|
|
1541
|
+
value: string | null;
|
|
1542
|
+
}
|
|
1411
1543
|
}
|
|
1412
1544
|
}
|
|
1413
1545
|
|
|
@@ -1420,9 +1552,10 @@ export interface InsightListParams extends CursorParams {
|
|
|
1420
1552
|
|
|
1421
1553
|
export interface InsightCreateParams {
|
|
1422
1554
|
/**
|
|
1423
|
-
* Version 1 Insight definition: one to ten metrics and
|
|
1424
|
-
* interval. Sum and average require a numeric event
|
|
1425
|
-
*
|
|
1555
|
+
* Version 1 Insight definition: one to ten metrics and an hour, day, week, or
|
|
1556
|
+
* month interval (up to 366 buckets). Sum and average require a numeric event
|
|
1557
|
+
* property. Metrics select eventNames or allEvents. includeBots defaults to false.
|
|
1558
|
+
* Filters use the analytics property catalog.
|
|
1426
1559
|
*/
|
|
1427
1560
|
definition: InsightCreateParams.Definition;
|
|
1428
1561
|
|
|
@@ -1451,12 +1584,13 @@ export interface InsightCreateParams {
|
|
|
1451
1584
|
|
|
1452
1585
|
export namespace InsightCreateParams {
|
|
1453
1586
|
/**
|
|
1454
|
-
* Version 1 Insight definition: one to ten metrics and
|
|
1455
|
-
* interval. Sum and average require a numeric event
|
|
1456
|
-
*
|
|
1587
|
+
* Version 1 Insight definition: one to ten metrics and an hour, day, week, or
|
|
1588
|
+
* month interval (up to 366 buckets). Sum and average require a numeric event
|
|
1589
|
+
* property. Metrics select eventNames or allEvents. includeBots defaults to false.
|
|
1590
|
+
* Filters use the analytics property catalog.
|
|
1457
1591
|
*/
|
|
1458
1592
|
export interface Definition {
|
|
1459
|
-
interval: 'day' | 'week' | 'month';
|
|
1593
|
+
interval: 'hour' | 'day' | 'week' | 'month';
|
|
1460
1594
|
|
|
1461
1595
|
kind: 'insight';
|
|
1462
1596
|
|
|
@@ -1465,6 +1599,11 @@ export namespace InsightCreateParams {
|
|
|
1465
1599
|
version: 1;
|
|
1466
1600
|
|
|
1467
1601
|
filter?: Definition.Filter;
|
|
1602
|
+
|
|
1603
|
+
/**
|
|
1604
|
+
* Include bot events and sessions; test events remain excluded. Defaults to false.
|
|
1605
|
+
*/
|
|
1606
|
+
includeBots?: boolean;
|
|
1468
1607
|
}
|
|
1469
1608
|
|
|
1470
1609
|
export namespace Definition {
|
|
@@ -1481,6 +1620,11 @@ export namespace InsightCreateParams {
|
|
|
1481
1620
|
|
|
1482
1621
|
name: string;
|
|
1483
1622
|
|
|
1623
|
+
/**
|
|
1624
|
+
* Count every event name. Requires an empty eventNames array.
|
|
1625
|
+
*/
|
|
1626
|
+
allEvents?: boolean;
|
|
1627
|
+
|
|
1484
1628
|
filter?: Metric.Filter;
|
|
1485
1629
|
|
|
1486
1630
|
property?: Metric.Property;
|
|
@@ -1679,9 +1823,10 @@ export interface InsightUpdateParams {
|
|
|
1679
1823
|
expectedRevision: string;
|
|
1680
1824
|
|
|
1681
1825
|
/**
|
|
1682
|
-
* Version 1 Insight definition: one to ten metrics and
|
|
1683
|
-
* interval. Sum and average require a numeric event
|
|
1684
|
-
*
|
|
1826
|
+
* Version 1 Insight definition: one to ten metrics and an hour, day, week, or
|
|
1827
|
+
* month interval (up to 366 buckets). Sum and average require a numeric event
|
|
1828
|
+
* property. Metrics select eventNames or allEvents. includeBots defaults to false.
|
|
1829
|
+
* Filters use the analytics property catalog.
|
|
1685
1830
|
*/
|
|
1686
1831
|
definition?: InsightUpdateParams.Definition;
|
|
1687
1832
|
|
|
@@ -1710,12 +1855,13 @@ export interface InsightUpdateParams {
|
|
|
1710
1855
|
|
|
1711
1856
|
export namespace InsightUpdateParams {
|
|
1712
1857
|
/**
|
|
1713
|
-
* Version 1 Insight definition: one to ten metrics and
|
|
1714
|
-
* interval. Sum and average require a numeric event
|
|
1715
|
-
*
|
|
1858
|
+
* Version 1 Insight definition: one to ten metrics and an hour, day, week, or
|
|
1859
|
+
* month interval (up to 366 buckets). Sum and average require a numeric event
|
|
1860
|
+
* property. Metrics select eventNames or allEvents. includeBots defaults to false.
|
|
1861
|
+
* Filters use the analytics property catalog.
|
|
1716
1862
|
*/
|
|
1717
1863
|
export interface Definition {
|
|
1718
|
-
interval: 'day' | 'week' | 'month';
|
|
1864
|
+
interval: 'hour' | 'day' | 'week' | 'month';
|
|
1719
1865
|
|
|
1720
1866
|
kind: 'insight';
|
|
1721
1867
|
|
|
@@ -1724,6 +1870,11 @@ export namespace InsightUpdateParams {
|
|
|
1724
1870
|
version: 1;
|
|
1725
1871
|
|
|
1726
1872
|
filter?: Definition.Filter;
|
|
1873
|
+
|
|
1874
|
+
/**
|
|
1875
|
+
* Include bot events and sessions; test events remain excluded. Defaults to false.
|
|
1876
|
+
*/
|
|
1877
|
+
includeBots?: boolean;
|
|
1727
1878
|
}
|
|
1728
1879
|
|
|
1729
1880
|
export namespace Definition {
|
|
@@ -1740,6 +1891,11 @@ export namespace InsightUpdateParams {
|
|
|
1740
1891
|
|
|
1741
1892
|
name: string;
|
|
1742
1893
|
|
|
1894
|
+
/**
|
|
1895
|
+
* Count every event name. Requires an empty eventNames array.
|
|
1896
|
+
*/
|
|
1897
|
+
allEvents?: boolean;
|
|
1898
|
+
|
|
1743
1899
|
filter?: Metric.Filter;
|
|
1744
1900
|
|
|
1745
1901
|
property?: Metric.Property;
|
|
@@ -1946,8 +2102,18 @@ export interface InsightResultsParams {
|
|
|
1946
2102
|
expectedRevision: string;
|
|
1947
2103
|
|
|
1948
2104
|
/**
|
|
1949
|
-
*
|
|
1950
|
-
*
|
|
2105
|
+
* Split results by a property. JSON object
|
|
2106
|
+
* {property:{property,path?,type},limit?}. type is string, number or boolean;
|
|
2107
|
+
* limit is 1–10 (default 5). Properties come from GET
|
|
2108
|
+
* /rest/v1/analytics/query-catalog. Example:
|
|
2109
|
+
* {"property":{"property":"event.source_name","type":"string"},"limit":5}
|
|
2110
|
+
*/
|
|
2111
|
+
breakdown?: string;
|
|
2112
|
+
|
|
2113
|
+
/**
|
|
2114
|
+
* Compare with another range of the same length. JSON object {kind,from?}: kind is
|
|
2115
|
+
* previous_period, previous_year or custom; custom requires from (YYYY-MM-DD).
|
|
2116
|
+
* Example: {"kind":"previous_period"}
|
|
1951
2117
|
*/
|
|
1952
2118
|
comparison?: string;
|
|
1953
2119
|
|
|
@@ -1973,8 +2139,9 @@ export interface InsightResultsParams {
|
|
|
1973
2139
|
export interface InsightPreviewParams {
|
|
1974
2140
|
/**
|
|
1975
2141
|
* Object with required definition and reportContext, plus optional
|
|
1976
|
-
* smoothingWindow, cumulative, and
|
|
1977
|
-
* reports. JSON-encode input in the REST query string; maximum
|
|
2142
|
+
* smoothingWindow, cumulative, comparison, and breakdown. Chart view settings
|
|
2143
|
+
* belong to saved reports. JSON-encode input in the REST query string; maximum
|
|
2144
|
+
* 16384 bytes.
|
|
1978
2145
|
*/
|
|
1979
2146
|
input: string;
|
|
1980
2147
|
}
|