@oursprivacy/platform-sdk 1.60.0 → 1.62.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/README.md +58 -15
- package/client.d.mts +5 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -2
- package/client.d.ts.map +1 -1
- package/client.js +13 -1
- package/client.js.map +1 -1
- package/client.mjs +13 -1
- package/client.mjs.map +1 -1
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts.map +1 -1
- package/core/error.js +2 -1
- package/core/error.js.map +1 -1
- package/core/error.mjs +2 -1
- package/core/error.mjs.map +1 -1
- package/internal/utils/log.d.mts +5 -0
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts +5 -0
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +62 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +60 -0
- package/internal/utils/log.mjs.map +1 -1
- package/package.json +1 -10
- package/resources/attribution-reports.d.mts +1400 -0
- package/resources/attribution-reports.d.mts.map +1 -0
- package/resources/attribution-reports.d.ts +1400 -0
- package/resources/attribution-reports.d.ts.map +1 -0
- package/resources/attribution-reports.js +116 -0
- package/resources/attribution-reports.js.map +1 -0
- package/resources/attribution-reports.mjs +112 -0
- package/resources/attribution-reports.mjs.map +1 -0
- 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/experiment-settings.d.mts +24 -14
- package/resources/experiment-settings.d.mts.map +1 -1
- package/resources/experiment-settings.d.ts +24 -14
- package/resources/experiment-settings.d.ts.map +1 -1
- package/resources/experiment-settings.js +8 -4
- package/resources/experiment-settings.js.map +1 -1
- package/resources/experiment-settings.mjs +8 -4
- package/resources/experiment-settings.mjs.map +1 -1
- package/resources/experiment-variants.d.mts +84 -93
- package/resources/experiment-variants.d.mts.map +1 -1
- package/resources/experiment-variants.d.ts +84 -93
- package/resources/experiment-variants.d.ts.map +1 -1
- package/resources/experiment-variants.js +3 -1
- package/resources/experiment-variants.js.map +1 -1
- package/resources/experiment-variants.mjs +3 -1
- package/resources/experiment-variants.mjs.map +1 -1
- package/resources/experiments.d.mts +50 -65
- package/resources/experiments.d.mts.map +1 -1
- package/resources/experiments.d.ts +50 -65
- package/resources/experiments.d.ts.map +1 -1
- package/resources/heatmap-pages.d.mts +51 -28
- package/resources/heatmap-pages.d.mts.map +1 -1
- package/resources/heatmap-pages.d.ts +51 -28
- package/resources/heatmap-pages.d.ts.map +1 -1
- package/resources/heatmap-pages.js +23 -17
- package/resources/heatmap-pages.js.map +1 -1
- package/resources/heatmap-pages.mjs +23 -17
- package/resources/heatmap-pages.mjs.map +1 -1
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/test-events.d.mts +6 -0
- package/resources/test-events.d.mts.map +1 -1
- package/resources/test-events.d.ts +6 -0
- package/resources/test-events.d.ts.map +1 -1
- package/resources/videos.d.mts +17 -5
- package/resources/videos.d.mts.map +1 -1
- package/resources/videos.d.ts +17 -5
- package/resources/videos.d.ts.map +1 -1
- package/resources/videos.js +2 -2
- package/resources/videos.mjs +2 -2
- package/resources/web-scanners.d.mts +84 -32
- package/resources/web-scanners.d.mts.map +1 -1
- package/resources/web-scanners.d.ts +84 -32
- package/resources/web-scanners.d.ts.map +1 -1
- package/resources/web-scanners.js +34 -18
- package/resources/web-scanners.js.map +1 -1
- package/resources/web-scanners.mjs +34 -18
- package/resources/web-scanners.mjs.map +1 -1
- package/src/client.ts +59 -0
- package/src/core/error.ts +2 -1
- package/src/internal/utils/log.ts +64 -0
- package/src/resources/attribution-reports.ts +2294 -0
- package/src/resources/destinations.ts +9 -2
- package/src/resources/experiment-settings.ts +24 -14
- package/src/resources/experiment-variants.ts +84 -93
- package/src/resources/experiments.ts +50 -65
- package/src/resources/heatmap-pages.ts +53 -28
- package/src/resources/index.ts +23 -0
- package/src/resources/test-events.ts +7 -0
- package/src/resources/videos.ts +243 -5
- package/src/resources/web-scanners.ts +100 -31
- 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
|
@@ -0,0 +1,1400 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { Cursor, type CursorParams, PagePromise } from "../core/pagination.mjs";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
|
+
export declare class AttributionReports extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* List saved attribution reports in stable ID order with case-insensitive name
|
|
8
|
+
* search. Defaults to 20 results; each request scans at most 100 reports. Search
|
|
9
|
+
* and unavailable or deleted entries can yield short pages. Continue with
|
|
10
|
+
* pagination.nextCursor while hasMore is true and preserve unavailableCount.
|
|
11
|
+
* Requires Analytics Suite access. Requires API-key scope or current OAuth user
|
|
12
|
+
* permission: web-analytics:view
|
|
13
|
+
*/
|
|
14
|
+
list(query?: AttributionReportListParams | null | undefined, options?: RequestOptions): PagePromise<AttributionReportListResponsesCursor, AttributionReportListResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* Save an attribution report with a default date context and a definition of up to
|
|
17
|
+
* five conversion outcomes, the credit model, counting unit, lookback window, and
|
|
18
|
+
* currency. Use GET /rest/v1/attribution-reports/preview to compute results.
|
|
19
|
+
* Requires Analytics Suite access. Requires API-key scope or current OAuth user
|
|
20
|
+
* permission: web-analytics:write
|
|
21
|
+
*/
|
|
22
|
+
create(body: AttributionReportCreateParams, options?: RequestOptions): APIPromise<AttributionReportCreateResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* Get a saved attribution report including its revision, default date context, and
|
|
25
|
+
* attribution definition. Requires Analytics Suite access; unavailable reports
|
|
26
|
+
* return 404. Requires API-key scope or current OAuth user permission:
|
|
27
|
+
* web-analytics:view
|
|
28
|
+
*/
|
|
29
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<AttributionReportRetrieveResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Update an attribution report using expectedRevision. Omitted fields remain
|
|
32
|
+
* unchanged; null clears the description. Supplied reportContext and definition
|
|
33
|
+
* replace the entire saved value. Requires Analytics Suite access. Requires
|
|
34
|
+
* API-key scope or current OAuth user permission: web-analytics:write
|
|
35
|
+
*/
|
|
36
|
+
update(id: string, body: AttributionReportUpdateParams, options?: RequestOptions): APIPromise<AttributionReportUpdateResponse>;
|
|
37
|
+
/**
|
|
38
|
+
* Delete an attribution report using expectedRevision. Requires Analytics Suite
|
|
39
|
+
* access. Requires API-key scope or current OAuth user permission:
|
|
40
|
+
* web-analytics:write
|
|
41
|
+
*/
|
|
42
|
+
delete(id: string, params: AttributionReportDeleteParams, options?: RequestOptions): APIPromise<AttributionReportDeleteResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Duplicate an attribution report using the expectedRevision in the request body.
|
|
45
|
+
* Copies the description, date context, and definition under a new id with
|
|
46
|
+
* "(copy)" appended to the name. Requires Analytics Suite access. Requires API-key
|
|
47
|
+
* scope or current OAuth user permission: web-analytics:write, web-analytics:view
|
|
48
|
+
*/
|
|
49
|
+
duplicate(id: string, body: AttributionReportDuplicateParams, options?: RequestOptions): APIPromise<AttributionReportDuplicateResponse>;
|
|
50
|
+
/**
|
|
51
|
+
* Compute attribution credit for a saved or draft definition without saving it.
|
|
52
|
+
* JSON-encode input as {definition,from,to,comparison?,interval?}; dates are
|
|
53
|
+
* inclusive UTC calendar strings spanning at most 92 days. Results include a total
|
|
54
|
+
* row, channel, source/medium, campaign, and term breakdowns, and a time series,
|
|
55
|
+
* with credit under every model. Maximum 16384 bytes before URL encoding. Requires
|
|
56
|
+
* Analytics Suite access. Requires API-key scope or current OAuth user permission:
|
|
57
|
+
* web-analytics:view
|
|
58
|
+
*/
|
|
59
|
+
preview(query: AttributionReportPreviewParams, options?: RequestOptions): APIPromise<AttributionReportPreviewResponse>;
|
|
60
|
+
/**
|
|
61
|
+
* List the visitors behind one number in an attribution result: an outcome,
|
|
62
|
+
* period, row, touch role (first, last, any, or assist), and optional interval
|
|
63
|
+
* bucket. Send the same definition, dates, comparison, and interval that produced
|
|
64
|
+
* the result. Each visitor includes the credit and value they give that row, their
|
|
65
|
+
* credited first and last touch, conversion time, sessions in the lookback window,
|
|
66
|
+
* and up to three recent session replays. totalUnits equals the first- or
|
|
67
|
+
* last-touch credit for those roles and the row creditedUnits for any. Ordered
|
|
68
|
+
* newest conversion first; continue with pagination.nextCursor while hasMore is
|
|
69
|
+
* true. Requires Analytics Suite access and permission to view visitor data.
|
|
70
|
+
* Requires API-key scope or current OAuth user permission: web-analytics:view,
|
|
71
|
+
* report:view-visitor
|
|
72
|
+
*/
|
|
73
|
+
visitors(query: AttributionReportVisitorsParams, options?: RequestOptions): APIPromise<AttributionReportVisitorsResponse>;
|
|
74
|
+
/**
|
|
75
|
+
* Explain what moved in an attribution result: new sources, campaigns, and terms
|
|
76
|
+
* with credited conversions and no sessions in the prior 180 days; the largest
|
|
77
|
+
* share-adjusted credit changes against the comparison period; channels credited
|
|
78
|
+
* very differently by first and last touch; and rows that went quiet. Takes the
|
|
79
|
+
* same JSON input as the preview. Without a comparison only new values are
|
|
80
|
+
* returned. Returns at most 8 aggregate findings with their baselines and sample
|
|
81
|
+
* sizes, ranked by effect size and not tested for significance. Requires Analytics
|
|
82
|
+
* Suite access. Requires API-key scope or current OAuth user permission:
|
|
83
|
+
* web-analytics:view
|
|
84
|
+
*/
|
|
85
|
+
insights(query: AttributionReportInsightsParams, options?: RequestOptions): APIPromise<AttributionReportInsightsResponse>;
|
|
86
|
+
}
|
|
87
|
+
export type AttributionReportListResponsesCursor = Cursor<AttributionReportListResponse>;
|
|
88
|
+
export interface AttributionReportListResponse {
|
|
89
|
+
id: string;
|
|
90
|
+
createdAt: string;
|
|
91
|
+
createdByUserId: string;
|
|
92
|
+
/**
|
|
93
|
+
* Version 1 attribution definition: one to five conversion outcomes, each with one
|
|
94
|
+
* to ten unique event names, an optional filter, and an optional numeric event
|
|
95
|
+
* property summed as value. Set the credit model (default last_touch), counting
|
|
96
|
+
* unit (default unique), lookback window of 7, 14, 30, 60, or 90 days (default
|
|
97
|
+
* 30), an optional filter applied to every outcome, and the value currency
|
|
98
|
+
* (default USD). Outcome ids identify outcomes in results. Replaces the saved
|
|
99
|
+
* definition on PATCH.
|
|
100
|
+
*/
|
|
101
|
+
definition: AttributionReportListResponse.Definition;
|
|
102
|
+
/**
|
|
103
|
+
* Display name for the saved attribution report.
|
|
104
|
+
*/
|
|
105
|
+
name: string;
|
|
106
|
+
/**
|
|
107
|
+
* Default UTC date range: a preset or inclusive from/to calendar dates. Replaces
|
|
108
|
+
* the saved context on PATCH. Results cover at most 92 inclusive days.
|
|
109
|
+
*/
|
|
110
|
+
reportContext: AttributionReportListResponse.ReportContext;
|
|
111
|
+
revision: string;
|
|
112
|
+
updatedAt: string;
|
|
113
|
+
updatedByUserId: string;
|
|
114
|
+
/**
|
|
115
|
+
* Optional description; null clears it.
|
|
116
|
+
*/
|
|
117
|
+
description?: string | null;
|
|
118
|
+
}
|
|
119
|
+
export declare namespace AttributionReportListResponse {
|
|
120
|
+
/**
|
|
121
|
+
* Version 1 attribution definition: one to five conversion outcomes, each with one
|
|
122
|
+
* to ten unique event names, an optional filter, and an optional numeric event
|
|
123
|
+
* property summed as value. Set the credit model (default last_touch), counting
|
|
124
|
+
* unit (default unique), lookback window of 7, 14, 30, 60, or 90 days (default
|
|
125
|
+
* 30), an optional filter applied to every outcome, and the value currency
|
|
126
|
+
* (default USD). Outcome ids identify outcomes in results. Replaces the saved
|
|
127
|
+
* definition on PATCH.
|
|
128
|
+
*/
|
|
129
|
+
interface Definition {
|
|
130
|
+
kind: 'attribution';
|
|
131
|
+
outcomes: Array<Definition.Outcome>;
|
|
132
|
+
version: 1;
|
|
133
|
+
counting?: 'unique' | 'totals' | 'sessions';
|
|
134
|
+
currency?: 'USD' | 'CAD' | 'GBP' | 'EUR' | 'AUD';
|
|
135
|
+
filter?: Definition.Filter;
|
|
136
|
+
lookbackDays?: 7 | 14 | 30 | 60 | 90;
|
|
137
|
+
model?: 'first_touch' | 'last_touch' | 'linear' | 'u_shaped' | 'j_shaped' | 'time_decay';
|
|
138
|
+
}
|
|
139
|
+
namespace Definition {
|
|
140
|
+
interface Outcome {
|
|
141
|
+
id: string;
|
|
142
|
+
eventNames: Array<string>;
|
|
143
|
+
label: string;
|
|
144
|
+
filter?: Outcome.Filter;
|
|
145
|
+
value?: Outcome.Value;
|
|
146
|
+
}
|
|
147
|
+
namespace Outcome {
|
|
148
|
+
interface Filter {
|
|
149
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
150
|
+
version: 1;
|
|
151
|
+
}
|
|
152
|
+
namespace Filter {
|
|
153
|
+
interface UnionMember0 {
|
|
154
|
+
children: Array<unknown>;
|
|
155
|
+
kind: 'and' | 'or';
|
|
156
|
+
}
|
|
157
|
+
interface UnionMember1 {
|
|
158
|
+
child: unknown;
|
|
159
|
+
kind: 'not';
|
|
160
|
+
}
|
|
161
|
+
interface UnionMember2 {
|
|
162
|
+
kind: 'predicate';
|
|
163
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
164
|
+
property: string;
|
|
165
|
+
path?: Array<string>;
|
|
166
|
+
type?: 'string' | 'number' | 'boolean';
|
|
167
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
interface Value {
|
|
171
|
+
path: Array<string>;
|
|
172
|
+
property: 'event.properties';
|
|
173
|
+
type?: 'number';
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
interface Filter {
|
|
177
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
178
|
+
version: 1;
|
|
179
|
+
}
|
|
180
|
+
namespace Filter {
|
|
181
|
+
interface UnionMember0 {
|
|
182
|
+
children: Array<unknown>;
|
|
183
|
+
kind: 'and' | 'or';
|
|
184
|
+
}
|
|
185
|
+
interface UnionMember1 {
|
|
186
|
+
child: unknown;
|
|
187
|
+
kind: 'not';
|
|
188
|
+
}
|
|
189
|
+
interface UnionMember2 {
|
|
190
|
+
kind: 'predicate';
|
|
191
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
192
|
+
property: string;
|
|
193
|
+
path?: Array<string>;
|
|
194
|
+
type?: 'string' | 'number' | 'boolean';
|
|
195
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Default UTC date range: a preset or inclusive from/to calendar dates. Replaces
|
|
201
|
+
* the saved context on PATCH. Results cover at most 92 inclusive days.
|
|
202
|
+
*/
|
|
203
|
+
interface ReportContext {
|
|
204
|
+
dateRange: ReportContext.UnionMember0 | ReportContext.UnionMember1;
|
|
205
|
+
}
|
|
206
|
+
namespace ReportContext {
|
|
207
|
+
interface UnionMember0 {
|
|
208
|
+
from: string;
|
|
209
|
+
to: string;
|
|
210
|
+
timeZone?: 'UTC';
|
|
211
|
+
}
|
|
212
|
+
interface UnionMember1 {
|
|
213
|
+
preset: 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_12_months' | 'week_to_date' | 'month_to_date' | 'year_to_date';
|
|
214
|
+
timeZone?: 'UTC';
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
export interface AttributionReportCreateResponse {
|
|
219
|
+
id: string;
|
|
220
|
+
createdAt: string;
|
|
221
|
+
createdByUserId: string;
|
|
222
|
+
/**
|
|
223
|
+
* Version 1 attribution definition: one to five conversion outcomes, each with one
|
|
224
|
+
* to ten unique event names, an optional filter, and an optional numeric event
|
|
225
|
+
* property summed as value. Set the credit model (default last_touch), counting
|
|
226
|
+
* unit (default unique), lookback window of 7, 14, 30, 60, or 90 days (default
|
|
227
|
+
* 30), an optional filter applied to every outcome, and the value currency
|
|
228
|
+
* (default USD). Outcome ids identify outcomes in results. Replaces the saved
|
|
229
|
+
* definition on PATCH.
|
|
230
|
+
*/
|
|
231
|
+
definition: AttributionReportCreateResponse.Definition;
|
|
232
|
+
/**
|
|
233
|
+
* Display name for the saved attribution report.
|
|
234
|
+
*/
|
|
235
|
+
name: string;
|
|
236
|
+
/**
|
|
237
|
+
* Default UTC date range: a preset or inclusive from/to calendar dates. Replaces
|
|
238
|
+
* the saved context on PATCH. Results cover at most 92 inclusive days.
|
|
239
|
+
*/
|
|
240
|
+
reportContext: AttributionReportCreateResponse.ReportContext;
|
|
241
|
+
revision: string;
|
|
242
|
+
updatedAt: string;
|
|
243
|
+
updatedByUserId: string;
|
|
244
|
+
/**
|
|
245
|
+
* Optional description; null clears it.
|
|
246
|
+
*/
|
|
247
|
+
description?: string | null;
|
|
248
|
+
}
|
|
249
|
+
export declare namespace AttributionReportCreateResponse {
|
|
250
|
+
/**
|
|
251
|
+
* Version 1 attribution definition: one to five conversion outcomes, each with one
|
|
252
|
+
* to ten unique event names, an optional filter, and an optional numeric event
|
|
253
|
+
* property summed as value. Set the credit model (default last_touch), counting
|
|
254
|
+
* unit (default unique), lookback window of 7, 14, 30, 60, or 90 days (default
|
|
255
|
+
* 30), an optional filter applied to every outcome, and the value currency
|
|
256
|
+
* (default USD). Outcome ids identify outcomes in results. Replaces the saved
|
|
257
|
+
* definition on PATCH.
|
|
258
|
+
*/
|
|
259
|
+
interface Definition {
|
|
260
|
+
kind: 'attribution';
|
|
261
|
+
outcomes: Array<Definition.Outcome>;
|
|
262
|
+
version: 1;
|
|
263
|
+
counting?: 'unique' | 'totals' | 'sessions';
|
|
264
|
+
currency?: 'USD' | 'CAD' | 'GBP' | 'EUR' | 'AUD';
|
|
265
|
+
filter?: Definition.Filter;
|
|
266
|
+
lookbackDays?: 7 | 14 | 30 | 60 | 90;
|
|
267
|
+
model?: 'first_touch' | 'last_touch' | 'linear' | 'u_shaped' | 'j_shaped' | 'time_decay';
|
|
268
|
+
}
|
|
269
|
+
namespace Definition {
|
|
270
|
+
interface Outcome {
|
|
271
|
+
id: string;
|
|
272
|
+
eventNames: Array<string>;
|
|
273
|
+
label: string;
|
|
274
|
+
filter?: Outcome.Filter;
|
|
275
|
+
value?: Outcome.Value;
|
|
276
|
+
}
|
|
277
|
+
namespace Outcome {
|
|
278
|
+
interface Filter {
|
|
279
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
280
|
+
version: 1;
|
|
281
|
+
}
|
|
282
|
+
namespace Filter {
|
|
283
|
+
interface UnionMember0 {
|
|
284
|
+
children: Array<unknown>;
|
|
285
|
+
kind: 'and' | 'or';
|
|
286
|
+
}
|
|
287
|
+
interface UnionMember1 {
|
|
288
|
+
child: unknown;
|
|
289
|
+
kind: 'not';
|
|
290
|
+
}
|
|
291
|
+
interface UnionMember2 {
|
|
292
|
+
kind: 'predicate';
|
|
293
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
294
|
+
property: string;
|
|
295
|
+
path?: Array<string>;
|
|
296
|
+
type?: 'string' | 'number' | 'boolean';
|
|
297
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
interface Value {
|
|
301
|
+
path: Array<string>;
|
|
302
|
+
property: 'event.properties';
|
|
303
|
+
type?: 'number';
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
interface Filter {
|
|
307
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
308
|
+
version: 1;
|
|
309
|
+
}
|
|
310
|
+
namespace Filter {
|
|
311
|
+
interface UnionMember0 {
|
|
312
|
+
children: Array<unknown>;
|
|
313
|
+
kind: 'and' | 'or';
|
|
314
|
+
}
|
|
315
|
+
interface UnionMember1 {
|
|
316
|
+
child: unknown;
|
|
317
|
+
kind: 'not';
|
|
318
|
+
}
|
|
319
|
+
interface UnionMember2 {
|
|
320
|
+
kind: 'predicate';
|
|
321
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
322
|
+
property: string;
|
|
323
|
+
path?: Array<string>;
|
|
324
|
+
type?: 'string' | 'number' | 'boolean';
|
|
325
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Default UTC date range: a preset or inclusive from/to calendar dates. Replaces
|
|
331
|
+
* the saved context on PATCH. Results cover at most 92 inclusive days.
|
|
332
|
+
*/
|
|
333
|
+
interface ReportContext {
|
|
334
|
+
dateRange: ReportContext.UnionMember0 | ReportContext.UnionMember1;
|
|
335
|
+
}
|
|
336
|
+
namespace ReportContext {
|
|
337
|
+
interface UnionMember0 {
|
|
338
|
+
from: string;
|
|
339
|
+
to: string;
|
|
340
|
+
timeZone?: 'UTC';
|
|
341
|
+
}
|
|
342
|
+
interface UnionMember1 {
|
|
343
|
+
preset: 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_12_months' | 'week_to_date' | 'month_to_date' | 'year_to_date';
|
|
344
|
+
timeZone?: 'UTC';
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
export interface AttributionReportRetrieveResponse {
|
|
349
|
+
id: string;
|
|
350
|
+
createdAt: string;
|
|
351
|
+
createdByUserId: string;
|
|
352
|
+
/**
|
|
353
|
+
* Version 1 attribution definition: one to five conversion outcomes, each with one
|
|
354
|
+
* to ten unique event names, an optional filter, and an optional numeric event
|
|
355
|
+
* property summed as value. Set the credit model (default last_touch), counting
|
|
356
|
+
* unit (default unique), lookback window of 7, 14, 30, 60, or 90 days (default
|
|
357
|
+
* 30), an optional filter applied to every outcome, and the value currency
|
|
358
|
+
* (default USD). Outcome ids identify outcomes in results. Replaces the saved
|
|
359
|
+
* definition on PATCH.
|
|
360
|
+
*/
|
|
361
|
+
definition: AttributionReportRetrieveResponse.Definition;
|
|
362
|
+
/**
|
|
363
|
+
* Display name for the saved attribution report.
|
|
364
|
+
*/
|
|
365
|
+
name: string;
|
|
366
|
+
/**
|
|
367
|
+
* Default UTC date range: a preset or inclusive from/to calendar dates. Replaces
|
|
368
|
+
* the saved context on PATCH. Results cover at most 92 inclusive days.
|
|
369
|
+
*/
|
|
370
|
+
reportContext: AttributionReportRetrieveResponse.ReportContext;
|
|
371
|
+
revision: string;
|
|
372
|
+
updatedAt: string;
|
|
373
|
+
updatedByUserId: string;
|
|
374
|
+
/**
|
|
375
|
+
* Optional description; null clears it.
|
|
376
|
+
*/
|
|
377
|
+
description?: string | null;
|
|
378
|
+
}
|
|
379
|
+
export declare namespace AttributionReportRetrieveResponse {
|
|
380
|
+
/**
|
|
381
|
+
* Version 1 attribution definition: one to five conversion outcomes, each with one
|
|
382
|
+
* to ten unique event names, an optional filter, and an optional numeric event
|
|
383
|
+
* property summed as value. Set the credit model (default last_touch), counting
|
|
384
|
+
* unit (default unique), lookback window of 7, 14, 30, 60, or 90 days (default
|
|
385
|
+
* 30), an optional filter applied to every outcome, and the value currency
|
|
386
|
+
* (default USD). Outcome ids identify outcomes in results. Replaces the saved
|
|
387
|
+
* definition on PATCH.
|
|
388
|
+
*/
|
|
389
|
+
interface Definition {
|
|
390
|
+
kind: 'attribution';
|
|
391
|
+
outcomes: Array<Definition.Outcome>;
|
|
392
|
+
version: 1;
|
|
393
|
+
counting?: 'unique' | 'totals' | 'sessions';
|
|
394
|
+
currency?: 'USD' | 'CAD' | 'GBP' | 'EUR' | 'AUD';
|
|
395
|
+
filter?: Definition.Filter;
|
|
396
|
+
lookbackDays?: 7 | 14 | 30 | 60 | 90;
|
|
397
|
+
model?: 'first_touch' | 'last_touch' | 'linear' | 'u_shaped' | 'j_shaped' | 'time_decay';
|
|
398
|
+
}
|
|
399
|
+
namespace Definition {
|
|
400
|
+
interface Outcome {
|
|
401
|
+
id: string;
|
|
402
|
+
eventNames: Array<string>;
|
|
403
|
+
label: string;
|
|
404
|
+
filter?: Outcome.Filter;
|
|
405
|
+
value?: Outcome.Value;
|
|
406
|
+
}
|
|
407
|
+
namespace Outcome {
|
|
408
|
+
interface Filter {
|
|
409
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
410
|
+
version: 1;
|
|
411
|
+
}
|
|
412
|
+
namespace Filter {
|
|
413
|
+
interface UnionMember0 {
|
|
414
|
+
children: Array<unknown>;
|
|
415
|
+
kind: 'and' | 'or';
|
|
416
|
+
}
|
|
417
|
+
interface UnionMember1 {
|
|
418
|
+
child: unknown;
|
|
419
|
+
kind: 'not';
|
|
420
|
+
}
|
|
421
|
+
interface UnionMember2 {
|
|
422
|
+
kind: 'predicate';
|
|
423
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
424
|
+
property: string;
|
|
425
|
+
path?: Array<string>;
|
|
426
|
+
type?: 'string' | 'number' | 'boolean';
|
|
427
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
interface Value {
|
|
431
|
+
path: Array<string>;
|
|
432
|
+
property: 'event.properties';
|
|
433
|
+
type?: 'number';
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
interface Filter {
|
|
437
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
438
|
+
version: 1;
|
|
439
|
+
}
|
|
440
|
+
namespace Filter {
|
|
441
|
+
interface UnionMember0 {
|
|
442
|
+
children: Array<unknown>;
|
|
443
|
+
kind: 'and' | 'or';
|
|
444
|
+
}
|
|
445
|
+
interface UnionMember1 {
|
|
446
|
+
child: unknown;
|
|
447
|
+
kind: 'not';
|
|
448
|
+
}
|
|
449
|
+
interface UnionMember2 {
|
|
450
|
+
kind: 'predicate';
|
|
451
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
452
|
+
property: string;
|
|
453
|
+
path?: Array<string>;
|
|
454
|
+
type?: 'string' | 'number' | 'boolean';
|
|
455
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Default UTC date range: a preset or inclusive from/to calendar dates. Replaces
|
|
461
|
+
* the saved context on PATCH. Results cover at most 92 inclusive days.
|
|
462
|
+
*/
|
|
463
|
+
interface ReportContext {
|
|
464
|
+
dateRange: ReportContext.UnionMember0 | ReportContext.UnionMember1;
|
|
465
|
+
}
|
|
466
|
+
namespace ReportContext {
|
|
467
|
+
interface UnionMember0 {
|
|
468
|
+
from: string;
|
|
469
|
+
to: string;
|
|
470
|
+
timeZone?: 'UTC';
|
|
471
|
+
}
|
|
472
|
+
interface UnionMember1 {
|
|
473
|
+
preset: 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_12_months' | 'week_to_date' | 'month_to_date' | 'year_to_date';
|
|
474
|
+
timeZone?: 'UTC';
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
export interface AttributionReportUpdateResponse {
|
|
479
|
+
id: string;
|
|
480
|
+
createdAt: string;
|
|
481
|
+
createdByUserId: string;
|
|
482
|
+
/**
|
|
483
|
+
* Version 1 attribution definition: one to five conversion outcomes, each with one
|
|
484
|
+
* to ten unique event names, an optional filter, and an optional numeric event
|
|
485
|
+
* property summed as value. Set the credit model (default last_touch), counting
|
|
486
|
+
* unit (default unique), lookback window of 7, 14, 30, 60, or 90 days (default
|
|
487
|
+
* 30), an optional filter applied to every outcome, and the value currency
|
|
488
|
+
* (default USD). Outcome ids identify outcomes in results. Replaces the saved
|
|
489
|
+
* definition on PATCH.
|
|
490
|
+
*/
|
|
491
|
+
definition: AttributionReportUpdateResponse.Definition;
|
|
492
|
+
/**
|
|
493
|
+
* Display name for the saved attribution report.
|
|
494
|
+
*/
|
|
495
|
+
name: string;
|
|
496
|
+
/**
|
|
497
|
+
* Default UTC date range: a preset or inclusive from/to calendar dates. Replaces
|
|
498
|
+
* the saved context on PATCH. Results cover at most 92 inclusive days.
|
|
499
|
+
*/
|
|
500
|
+
reportContext: AttributionReportUpdateResponse.ReportContext;
|
|
501
|
+
revision: string;
|
|
502
|
+
updatedAt: string;
|
|
503
|
+
updatedByUserId: string;
|
|
504
|
+
/**
|
|
505
|
+
* Optional description; null clears it.
|
|
506
|
+
*/
|
|
507
|
+
description?: string | null;
|
|
508
|
+
}
|
|
509
|
+
export declare namespace AttributionReportUpdateResponse {
|
|
510
|
+
/**
|
|
511
|
+
* Version 1 attribution definition: one to five conversion outcomes, each with one
|
|
512
|
+
* to ten unique event names, an optional filter, and an optional numeric event
|
|
513
|
+
* property summed as value. Set the credit model (default last_touch), counting
|
|
514
|
+
* unit (default unique), lookback window of 7, 14, 30, 60, or 90 days (default
|
|
515
|
+
* 30), an optional filter applied to every outcome, and the value currency
|
|
516
|
+
* (default USD). Outcome ids identify outcomes in results. Replaces the saved
|
|
517
|
+
* definition on PATCH.
|
|
518
|
+
*/
|
|
519
|
+
interface Definition {
|
|
520
|
+
kind: 'attribution';
|
|
521
|
+
outcomes: Array<Definition.Outcome>;
|
|
522
|
+
version: 1;
|
|
523
|
+
counting?: 'unique' | 'totals' | 'sessions';
|
|
524
|
+
currency?: 'USD' | 'CAD' | 'GBP' | 'EUR' | 'AUD';
|
|
525
|
+
filter?: Definition.Filter;
|
|
526
|
+
lookbackDays?: 7 | 14 | 30 | 60 | 90;
|
|
527
|
+
model?: 'first_touch' | 'last_touch' | 'linear' | 'u_shaped' | 'j_shaped' | 'time_decay';
|
|
528
|
+
}
|
|
529
|
+
namespace Definition {
|
|
530
|
+
interface Outcome {
|
|
531
|
+
id: string;
|
|
532
|
+
eventNames: Array<string>;
|
|
533
|
+
label: string;
|
|
534
|
+
filter?: Outcome.Filter;
|
|
535
|
+
value?: Outcome.Value;
|
|
536
|
+
}
|
|
537
|
+
namespace Outcome {
|
|
538
|
+
interface Filter {
|
|
539
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
540
|
+
version: 1;
|
|
541
|
+
}
|
|
542
|
+
namespace Filter {
|
|
543
|
+
interface UnionMember0 {
|
|
544
|
+
children: Array<unknown>;
|
|
545
|
+
kind: 'and' | 'or';
|
|
546
|
+
}
|
|
547
|
+
interface UnionMember1 {
|
|
548
|
+
child: unknown;
|
|
549
|
+
kind: 'not';
|
|
550
|
+
}
|
|
551
|
+
interface UnionMember2 {
|
|
552
|
+
kind: 'predicate';
|
|
553
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
554
|
+
property: string;
|
|
555
|
+
path?: Array<string>;
|
|
556
|
+
type?: 'string' | 'number' | 'boolean';
|
|
557
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
interface Value {
|
|
561
|
+
path: Array<string>;
|
|
562
|
+
property: 'event.properties';
|
|
563
|
+
type?: 'number';
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
interface Filter {
|
|
567
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
568
|
+
version: 1;
|
|
569
|
+
}
|
|
570
|
+
namespace Filter {
|
|
571
|
+
interface UnionMember0 {
|
|
572
|
+
children: Array<unknown>;
|
|
573
|
+
kind: 'and' | 'or';
|
|
574
|
+
}
|
|
575
|
+
interface UnionMember1 {
|
|
576
|
+
child: unknown;
|
|
577
|
+
kind: 'not';
|
|
578
|
+
}
|
|
579
|
+
interface UnionMember2 {
|
|
580
|
+
kind: 'predicate';
|
|
581
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
582
|
+
property: string;
|
|
583
|
+
path?: Array<string>;
|
|
584
|
+
type?: 'string' | 'number' | 'boolean';
|
|
585
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* Default UTC date range: a preset or inclusive from/to calendar dates. Replaces
|
|
591
|
+
* the saved context on PATCH. Results cover at most 92 inclusive days.
|
|
592
|
+
*/
|
|
593
|
+
interface ReportContext {
|
|
594
|
+
dateRange: ReportContext.UnionMember0 | ReportContext.UnionMember1;
|
|
595
|
+
}
|
|
596
|
+
namespace ReportContext {
|
|
597
|
+
interface UnionMember0 {
|
|
598
|
+
from: string;
|
|
599
|
+
to: string;
|
|
600
|
+
timeZone?: 'UTC';
|
|
601
|
+
}
|
|
602
|
+
interface UnionMember1 {
|
|
603
|
+
preset: 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_12_months' | 'week_to_date' | 'month_to_date' | 'year_to_date';
|
|
604
|
+
timeZone?: 'UTC';
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
export interface AttributionReportDeleteResponse {
|
|
609
|
+
id: string;
|
|
610
|
+
deleted: true;
|
|
611
|
+
deletedRevision: string;
|
|
612
|
+
}
|
|
613
|
+
export interface AttributionReportDuplicateResponse {
|
|
614
|
+
id: string;
|
|
615
|
+
createdAt: string;
|
|
616
|
+
createdByUserId: string;
|
|
617
|
+
/**
|
|
618
|
+
* Version 1 attribution definition: one to five conversion outcomes, each with one
|
|
619
|
+
* to ten unique event names, an optional filter, and an optional numeric event
|
|
620
|
+
* property summed as value. Set the credit model (default last_touch), counting
|
|
621
|
+
* unit (default unique), lookback window of 7, 14, 30, 60, or 90 days (default
|
|
622
|
+
* 30), an optional filter applied to every outcome, and the value currency
|
|
623
|
+
* (default USD). Outcome ids identify outcomes in results. Replaces the saved
|
|
624
|
+
* definition on PATCH.
|
|
625
|
+
*/
|
|
626
|
+
definition: AttributionReportDuplicateResponse.Definition;
|
|
627
|
+
/**
|
|
628
|
+
* Display name for the saved attribution report.
|
|
629
|
+
*/
|
|
630
|
+
name: string;
|
|
631
|
+
/**
|
|
632
|
+
* Default UTC date range: a preset or inclusive from/to calendar dates. Replaces
|
|
633
|
+
* the saved context on PATCH. Results cover at most 92 inclusive days.
|
|
634
|
+
*/
|
|
635
|
+
reportContext: AttributionReportDuplicateResponse.ReportContext;
|
|
636
|
+
revision: string;
|
|
637
|
+
updatedAt: string;
|
|
638
|
+
updatedByUserId: string;
|
|
639
|
+
/**
|
|
640
|
+
* Optional description; null clears it.
|
|
641
|
+
*/
|
|
642
|
+
description?: string | null;
|
|
643
|
+
}
|
|
644
|
+
export declare namespace AttributionReportDuplicateResponse {
|
|
645
|
+
/**
|
|
646
|
+
* Version 1 attribution definition: one to five conversion outcomes, each with one
|
|
647
|
+
* to ten unique event names, an optional filter, and an optional numeric event
|
|
648
|
+
* property summed as value. Set the credit model (default last_touch), counting
|
|
649
|
+
* unit (default unique), lookback window of 7, 14, 30, 60, or 90 days (default
|
|
650
|
+
* 30), an optional filter applied to every outcome, and the value currency
|
|
651
|
+
* (default USD). Outcome ids identify outcomes in results. Replaces the saved
|
|
652
|
+
* definition on PATCH.
|
|
653
|
+
*/
|
|
654
|
+
interface Definition {
|
|
655
|
+
kind: 'attribution';
|
|
656
|
+
outcomes: Array<Definition.Outcome>;
|
|
657
|
+
version: 1;
|
|
658
|
+
counting?: 'unique' | 'totals' | 'sessions';
|
|
659
|
+
currency?: 'USD' | 'CAD' | 'GBP' | 'EUR' | 'AUD';
|
|
660
|
+
filter?: Definition.Filter;
|
|
661
|
+
lookbackDays?: 7 | 14 | 30 | 60 | 90;
|
|
662
|
+
model?: 'first_touch' | 'last_touch' | 'linear' | 'u_shaped' | 'j_shaped' | 'time_decay';
|
|
663
|
+
}
|
|
664
|
+
namespace Definition {
|
|
665
|
+
interface Outcome {
|
|
666
|
+
id: string;
|
|
667
|
+
eventNames: Array<string>;
|
|
668
|
+
label: string;
|
|
669
|
+
filter?: Outcome.Filter;
|
|
670
|
+
value?: Outcome.Value;
|
|
671
|
+
}
|
|
672
|
+
namespace Outcome {
|
|
673
|
+
interface Filter {
|
|
674
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
675
|
+
version: 1;
|
|
676
|
+
}
|
|
677
|
+
namespace Filter {
|
|
678
|
+
interface UnionMember0 {
|
|
679
|
+
children: Array<unknown>;
|
|
680
|
+
kind: 'and' | 'or';
|
|
681
|
+
}
|
|
682
|
+
interface UnionMember1 {
|
|
683
|
+
child: unknown;
|
|
684
|
+
kind: 'not';
|
|
685
|
+
}
|
|
686
|
+
interface UnionMember2 {
|
|
687
|
+
kind: 'predicate';
|
|
688
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
689
|
+
property: string;
|
|
690
|
+
path?: Array<string>;
|
|
691
|
+
type?: 'string' | 'number' | 'boolean';
|
|
692
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
interface Value {
|
|
696
|
+
path: Array<string>;
|
|
697
|
+
property: 'event.properties';
|
|
698
|
+
type?: 'number';
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
interface Filter {
|
|
702
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
703
|
+
version: 1;
|
|
704
|
+
}
|
|
705
|
+
namespace Filter {
|
|
706
|
+
interface UnionMember0 {
|
|
707
|
+
children: Array<unknown>;
|
|
708
|
+
kind: 'and' | 'or';
|
|
709
|
+
}
|
|
710
|
+
interface UnionMember1 {
|
|
711
|
+
child: unknown;
|
|
712
|
+
kind: 'not';
|
|
713
|
+
}
|
|
714
|
+
interface UnionMember2 {
|
|
715
|
+
kind: 'predicate';
|
|
716
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
717
|
+
property: string;
|
|
718
|
+
path?: Array<string>;
|
|
719
|
+
type?: 'string' | 'number' | 'boolean';
|
|
720
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* Default UTC date range: a preset or inclusive from/to calendar dates. Replaces
|
|
726
|
+
* the saved context on PATCH. Results cover at most 92 inclusive days.
|
|
727
|
+
*/
|
|
728
|
+
interface ReportContext {
|
|
729
|
+
dateRange: ReportContext.UnionMember0 | ReportContext.UnionMember1;
|
|
730
|
+
}
|
|
731
|
+
namespace ReportContext {
|
|
732
|
+
interface UnionMember0 {
|
|
733
|
+
from: string;
|
|
734
|
+
to: string;
|
|
735
|
+
timeZone?: 'UTC';
|
|
736
|
+
}
|
|
737
|
+
interface UnionMember1 {
|
|
738
|
+
preset: 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_12_months' | 'week_to_date' | 'month_to_date' | 'year_to_date';
|
|
739
|
+
timeZone?: 'UTC';
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
export interface AttributionReportPreviewResponse {
|
|
744
|
+
channelRulesVersion: number;
|
|
745
|
+
computedAt: string;
|
|
746
|
+
counting: 'unique' | 'totals' | 'sessions';
|
|
747
|
+
from: string;
|
|
748
|
+
interval: 'day' | 'week';
|
|
749
|
+
/**
|
|
750
|
+
* True when more breakdown rows matched than the response returns; the total row
|
|
751
|
+
* is always complete.
|
|
752
|
+
*/
|
|
753
|
+
isTruncated: boolean;
|
|
754
|
+
/**
|
|
755
|
+
* Time-series credit per bucket, period, and outcome; channel is null for the
|
|
756
|
+
* all-channel series.
|
|
757
|
+
*/
|
|
758
|
+
points: Array<AttributionReportPreviewResponse.Point>;
|
|
759
|
+
/**
|
|
760
|
+
* Inclusive comparison start date; null without a comparison.
|
|
761
|
+
*/
|
|
762
|
+
previousFrom: string | null;
|
|
763
|
+
/**
|
|
764
|
+
* Inclusive comparison end date; null without a comparison.
|
|
765
|
+
*/
|
|
766
|
+
previousTo: string | null;
|
|
767
|
+
/**
|
|
768
|
+
* The total row followed by channel, source/medium, campaign, and term breakdown
|
|
769
|
+
* rows, ordered by current-period credit under the selected model.
|
|
770
|
+
*/
|
|
771
|
+
rows: Array<AttributionReportPreviewResponse.Row>;
|
|
772
|
+
to: string;
|
|
773
|
+
}
|
|
774
|
+
export declare namespace AttributionReportPreviewResponse {
|
|
775
|
+
interface Point {
|
|
776
|
+
bucket: string;
|
|
777
|
+
channel: string | null;
|
|
778
|
+
/**
|
|
779
|
+
* Credit under every model, keyed by model name, for this bucket.
|
|
780
|
+
*/
|
|
781
|
+
credit: Point.Credit;
|
|
782
|
+
outcomeId: string;
|
|
783
|
+
period: 'current' | 'previous';
|
|
784
|
+
/**
|
|
785
|
+
* Attributed value under every model for this bucket; null when the outcome has no
|
|
786
|
+
* value property.
|
|
787
|
+
*/
|
|
788
|
+
value: Point.Value | null;
|
|
789
|
+
}
|
|
790
|
+
namespace Point {
|
|
791
|
+
/**
|
|
792
|
+
* Credit under every model, keyed by model name, for this bucket.
|
|
793
|
+
*/
|
|
794
|
+
interface Credit {
|
|
795
|
+
first_touch: number;
|
|
796
|
+
j_shaped: number;
|
|
797
|
+
last_touch: number;
|
|
798
|
+
linear: number;
|
|
799
|
+
time_decay: number;
|
|
800
|
+
u_shaped: number;
|
|
801
|
+
}
|
|
802
|
+
/**
|
|
803
|
+
* Attributed value under every model for this bucket; null when the outcome has no
|
|
804
|
+
* value property.
|
|
805
|
+
*/
|
|
806
|
+
interface Value {
|
|
807
|
+
first_touch: number;
|
|
808
|
+
j_shaped: number;
|
|
809
|
+
last_touch: number;
|
|
810
|
+
linear: number;
|
|
811
|
+
time_decay: number;
|
|
812
|
+
u_shaped: number;
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
interface Row {
|
|
816
|
+
campaign: string | null;
|
|
817
|
+
/**
|
|
818
|
+
* One cell per outcome and period, current period first, in outcome order.
|
|
819
|
+
*/
|
|
820
|
+
cells: Array<Row.Cell>;
|
|
821
|
+
channel: string | null;
|
|
822
|
+
grain: 'total' | 'channel' | 'source_medium' | 'campaign' | 'term';
|
|
823
|
+
sourceMedium: string | null;
|
|
824
|
+
term: string | null;
|
|
825
|
+
}
|
|
826
|
+
namespace Row {
|
|
827
|
+
interface Cell {
|
|
828
|
+
assistedVisitors: number;
|
|
829
|
+
/**
|
|
830
|
+
* Credit under every model, keyed by model name, in the definition counting unit.
|
|
831
|
+
* Compare models without recomputing.
|
|
832
|
+
*/
|
|
833
|
+
credit: Cell.Credit;
|
|
834
|
+
creditedUnits: number;
|
|
835
|
+
medianDaysToConvert: number | null;
|
|
836
|
+
outcomeId: string;
|
|
837
|
+
period: 'current' | 'previous';
|
|
838
|
+
/**
|
|
839
|
+
* Attributed value under every model, in the definition currency; null when the
|
|
840
|
+
* outcome has no value property.
|
|
841
|
+
*/
|
|
842
|
+
value: Cell.Value | null;
|
|
843
|
+
}
|
|
844
|
+
namespace Cell {
|
|
845
|
+
/**
|
|
846
|
+
* Credit under every model, keyed by model name, in the definition counting unit.
|
|
847
|
+
* Compare models without recomputing.
|
|
848
|
+
*/
|
|
849
|
+
interface Credit {
|
|
850
|
+
first_touch: number;
|
|
851
|
+
j_shaped: number;
|
|
852
|
+
last_touch: number;
|
|
853
|
+
linear: number;
|
|
854
|
+
time_decay: number;
|
|
855
|
+
u_shaped: number;
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* Attributed value under every model, in the definition currency; null when the
|
|
859
|
+
* outcome has no value property.
|
|
860
|
+
*/
|
|
861
|
+
interface Value {
|
|
862
|
+
first_touch: number;
|
|
863
|
+
j_shaped: number;
|
|
864
|
+
last_touch: number;
|
|
865
|
+
linear: number;
|
|
866
|
+
time_decay: number;
|
|
867
|
+
u_shaped: number;
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
export interface AttributionReportVisitorsResponse {
|
|
873
|
+
/**
|
|
874
|
+
* Visitors ordered by latest matching conversion, newest first, then visitor id.
|
|
875
|
+
*/
|
|
876
|
+
entities: Array<AttributionReportVisitorsResponse.Entity>;
|
|
877
|
+
pagination: AttributionReportVisitorsResponse.Pagination;
|
|
878
|
+
/**
|
|
879
|
+
* Visitors behind the selection.
|
|
880
|
+
*/
|
|
881
|
+
totalCount: number;
|
|
882
|
+
/**
|
|
883
|
+
* Counted units behind the selection. Equals the first- or last-touch credit for
|
|
884
|
+
* those roles and the row's creditedUnits for any.
|
|
885
|
+
*/
|
|
886
|
+
totalUnits: number;
|
|
887
|
+
}
|
|
888
|
+
export declare namespace AttributionReportVisitorsResponse {
|
|
889
|
+
interface Entity {
|
|
890
|
+
/**
|
|
891
|
+
* When the latest matching conversion happened (UTC).
|
|
892
|
+
*/
|
|
893
|
+
convertedAt: string;
|
|
894
|
+
/**
|
|
895
|
+
* Credit this visitor gives the selected row under the definition's model.
|
|
896
|
+
*/
|
|
897
|
+
credit: number;
|
|
898
|
+
/**
|
|
899
|
+
* The credited first touch of the latest matching conversion; null when it had no
|
|
900
|
+
* eligible touch.
|
|
901
|
+
*/
|
|
902
|
+
firstTouch: Entity.FirstTouch | null;
|
|
903
|
+
/**
|
|
904
|
+
* The credited last touch of the latest matching conversion; null when it had no
|
|
905
|
+
* eligible touch.
|
|
906
|
+
*/
|
|
907
|
+
lastTouch: Entity.LastTouch | null;
|
|
908
|
+
/**
|
|
909
|
+
* Up to three recorded sessions from the matching lookback windows, newest first,
|
|
910
|
+
* within session replay retention.
|
|
911
|
+
*/
|
|
912
|
+
latestReplays: Array<Entity.LatestReplay>;
|
|
913
|
+
/**
|
|
914
|
+
* Sessions in the latest matching conversion's lookback window.
|
|
915
|
+
*/
|
|
916
|
+
sessionCount: number;
|
|
917
|
+
/**
|
|
918
|
+
* Matching conversions (totals counting) or converting sessions (sessions
|
|
919
|
+
* counting); always 1 under unique counting.
|
|
920
|
+
*/
|
|
921
|
+
units: number;
|
|
922
|
+
/**
|
|
923
|
+
* Value this visitor credits to the selected row under the definition's model;
|
|
924
|
+
* null when the outcome has no value property.
|
|
925
|
+
*/
|
|
926
|
+
value: number | null;
|
|
927
|
+
visitorId: string;
|
|
928
|
+
}
|
|
929
|
+
namespace Entity {
|
|
930
|
+
/**
|
|
931
|
+
* The credited first touch of the latest matching conversion; null when it had no
|
|
932
|
+
* eligible touch.
|
|
933
|
+
*/
|
|
934
|
+
interface FirstTouch {
|
|
935
|
+
at: string;
|
|
936
|
+
campaign: string;
|
|
937
|
+
channel: string;
|
|
938
|
+
sessionId: string;
|
|
939
|
+
sourceMedium: string;
|
|
940
|
+
term: string;
|
|
941
|
+
}
|
|
942
|
+
/**
|
|
943
|
+
* The credited last touch of the latest matching conversion; null when it had no
|
|
944
|
+
* eligible touch.
|
|
945
|
+
*/
|
|
946
|
+
interface LastTouch {
|
|
947
|
+
at: string;
|
|
948
|
+
campaign: string;
|
|
949
|
+
channel: string;
|
|
950
|
+
sessionId: string;
|
|
951
|
+
sourceMedium: string;
|
|
952
|
+
term: string;
|
|
953
|
+
}
|
|
954
|
+
interface LatestReplay {
|
|
955
|
+
date: string;
|
|
956
|
+
sessionId: string;
|
|
957
|
+
startedAt: string;
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
interface Pagination {
|
|
961
|
+
hasMore: boolean;
|
|
962
|
+
nextCursor: string | null;
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
export interface AttributionReportInsightsResponse {
|
|
966
|
+
computedAt: string;
|
|
967
|
+
counting: 'unique' | 'totals' | 'sessions';
|
|
968
|
+
from: string;
|
|
969
|
+
/**
|
|
970
|
+
* At most 8 findings, most notable first, one per row. Aggregates only; no visitor
|
|
971
|
+
* identifiers.
|
|
972
|
+
*/
|
|
973
|
+
insights: Array<AttributionReportInsightsResponse.Insight>;
|
|
974
|
+
model: 'first_touch' | 'last_touch' | 'linear' | 'u_shaped' | 'j_shaped' | 'time_decay';
|
|
975
|
+
/**
|
|
976
|
+
* A value is new when it had no sessions in this many days before from.
|
|
977
|
+
*/
|
|
978
|
+
newValueLookbackDays: number;
|
|
979
|
+
/**
|
|
980
|
+
* Inclusive comparison start date; null without a comparison.
|
|
981
|
+
*/
|
|
982
|
+
previousFrom: string | null;
|
|
983
|
+
/**
|
|
984
|
+
* Inclusive comparison end date; null without a comparison.
|
|
985
|
+
*/
|
|
986
|
+
previousTo: string | null;
|
|
987
|
+
to: string;
|
|
988
|
+
}
|
|
989
|
+
export declare namespace AttributionReportInsightsResponse {
|
|
990
|
+
interface Insight {
|
|
991
|
+
/**
|
|
992
|
+
* Stable identifier for the same input, made of the kind, outcome, and row.
|
|
993
|
+
*/
|
|
994
|
+
id: string;
|
|
995
|
+
/**
|
|
996
|
+
* The number current is compared with; see baselineKind.
|
|
997
|
+
*/
|
|
998
|
+
baseline: number;
|
|
999
|
+
/**
|
|
1000
|
+
* previous_period: baseline is the same model in the comparison period.
|
|
1001
|
+
* other_model: baseline is baselineModel in the current period. lookback: baseline
|
|
1002
|
+
* is the number of sessions with the value before the range, always 0.
|
|
1003
|
+
*/
|
|
1004
|
+
baselineKind: 'previous_period' | 'other_model' | 'lookback';
|
|
1005
|
+
baselineModel: 'first_touch' | 'last_touch' | 'linear' | 'u_shaped' | 'j_shaped' | 'time_decay';
|
|
1006
|
+
/**
|
|
1007
|
+
* The row's share of the outcome's baseline credit; null for new values.
|
|
1008
|
+
*/
|
|
1009
|
+
baselineShare: number | null;
|
|
1010
|
+
/**
|
|
1011
|
+
* Relative change from baseline; null when the baseline is 0.
|
|
1012
|
+
*/
|
|
1013
|
+
change: number | null;
|
|
1014
|
+
/**
|
|
1015
|
+
* Credit in the current period under model, in the definition counting unit.
|
|
1016
|
+
*/
|
|
1017
|
+
current: number;
|
|
1018
|
+
/**
|
|
1019
|
+
* The row's share of the outcome's current credit; null when the outcome has none.
|
|
1020
|
+
*/
|
|
1021
|
+
currentShare: number | null;
|
|
1022
|
+
/**
|
|
1023
|
+
* current minus baseline.
|
|
1024
|
+
*/
|
|
1025
|
+
delta: number;
|
|
1026
|
+
/**
|
|
1027
|
+
* Child rows that together explain most of a move, largest first.
|
|
1028
|
+
*/
|
|
1029
|
+
drivers: Array<string>;
|
|
1030
|
+
/**
|
|
1031
|
+
* Always descriptive: findings are ranked by effect size above minimum volumes and
|
|
1032
|
+
* are not tested for significance.
|
|
1033
|
+
*/
|
|
1034
|
+
evidence: 'descriptive';
|
|
1035
|
+
/**
|
|
1036
|
+
* First session date with the new value; new_value only.
|
|
1037
|
+
*/
|
|
1038
|
+
firstSeen: string | null;
|
|
1039
|
+
/**
|
|
1040
|
+
* new_value: a source / medium, campaign, or term with credited conversions and no
|
|
1041
|
+
* sessions in the lookback before the range. mover_up / mover_down: the largest
|
|
1042
|
+
* share-adjusted credit changes against the comparison period. model_disagreement:
|
|
1043
|
+
* a channel or source / medium credited at least twice as much by last touch as by
|
|
1044
|
+
* first touch, or the reverse. went_quiet: a row that had credit in the comparison
|
|
1045
|
+
* period and almost none now.
|
|
1046
|
+
*/
|
|
1047
|
+
kind: 'new_value' | 'mover_up' | 'mover_down' | 'model_disagreement' | 'went_quiet';
|
|
1048
|
+
/**
|
|
1049
|
+
* Credit model of current.
|
|
1050
|
+
*/
|
|
1051
|
+
model: 'first_touch' | 'last_touch' | 'linear' | 'u_shaped' | 'j_shaped' | 'time_decay';
|
|
1052
|
+
/**
|
|
1053
|
+
* Relative change of the outcome's total credit, so a row's move can be read
|
|
1054
|
+
* against the account's.
|
|
1055
|
+
*/
|
|
1056
|
+
outcomeChange: number | null;
|
|
1057
|
+
/**
|
|
1058
|
+
* Outcome id from the definition the numbers belong to.
|
|
1059
|
+
*/
|
|
1060
|
+
outcomeId: string;
|
|
1061
|
+
/**
|
|
1062
|
+
* Counted units with a touch on this row in the comparison period; null without
|
|
1063
|
+
* one.
|
|
1064
|
+
*/
|
|
1065
|
+
previousSampleUnits: number | null;
|
|
1066
|
+
/**
|
|
1067
|
+
* The breakdown row the finding is about; matches a preview row by grain, channel,
|
|
1068
|
+
* sourceMedium, campaign, and term.
|
|
1069
|
+
*/
|
|
1070
|
+
row: Insight.Row;
|
|
1071
|
+
/**
|
|
1072
|
+
* Sessions with the new value in the range; new_value only.
|
|
1073
|
+
*/
|
|
1074
|
+
sampleSessions: number | null;
|
|
1075
|
+
/**
|
|
1076
|
+
* Counted units with a touch on this row in the current period.
|
|
1077
|
+
*/
|
|
1078
|
+
sampleUnits: number;
|
|
1079
|
+
/**
|
|
1080
|
+
* Ranking score from 0 to 1, weighted by kind.
|
|
1081
|
+
*/
|
|
1082
|
+
score: number;
|
|
1083
|
+
}
|
|
1084
|
+
namespace Insight {
|
|
1085
|
+
/**
|
|
1086
|
+
* The breakdown row the finding is about; matches a preview row by grain, channel,
|
|
1087
|
+
* sourceMedium, campaign, and term.
|
|
1088
|
+
*/
|
|
1089
|
+
interface Row {
|
|
1090
|
+
campaign: string | null;
|
|
1091
|
+
channel: string;
|
|
1092
|
+
grain: 'channel' | 'source_medium' | 'campaign' | 'term';
|
|
1093
|
+
sourceMedium: string | null;
|
|
1094
|
+
term: string | null;
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
export interface AttributionReportListParams extends CursorParams {
|
|
1099
|
+
/**
|
|
1100
|
+
* Case-insensitive substring search on attribution report names.
|
|
1101
|
+
*/
|
|
1102
|
+
search?: string;
|
|
1103
|
+
}
|
|
1104
|
+
export interface AttributionReportCreateParams {
|
|
1105
|
+
/**
|
|
1106
|
+
* Version 1 attribution definition: one to five conversion outcomes, each with one
|
|
1107
|
+
* to ten unique event names, an optional filter, and an optional numeric event
|
|
1108
|
+
* property summed as value. Set the credit model (default last_touch), counting
|
|
1109
|
+
* unit (default unique), lookback window of 7, 14, 30, 60, or 90 days (default
|
|
1110
|
+
* 30), an optional filter applied to every outcome, and the value currency
|
|
1111
|
+
* (default USD). Outcome ids identify outcomes in results. Replaces the saved
|
|
1112
|
+
* definition on PATCH.
|
|
1113
|
+
*/
|
|
1114
|
+
definition: AttributionReportCreateParams.Definition;
|
|
1115
|
+
/**
|
|
1116
|
+
* Display name for the saved attribution report.
|
|
1117
|
+
*/
|
|
1118
|
+
name: string;
|
|
1119
|
+
/**
|
|
1120
|
+
* Default UTC date range: a preset or inclusive from/to calendar dates. Replaces
|
|
1121
|
+
* the saved context on PATCH. Results cover at most 92 inclusive days.
|
|
1122
|
+
*/
|
|
1123
|
+
reportContext: AttributionReportCreateParams.ReportContext;
|
|
1124
|
+
/**
|
|
1125
|
+
* Optional description; null clears it.
|
|
1126
|
+
*/
|
|
1127
|
+
description?: string | null;
|
|
1128
|
+
}
|
|
1129
|
+
export declare namespace AttributionReportCreateParams {
|
|
1130
|
+
/**
|
|
1131
|
+
* Version 1 attribution definition: one to five conversion outcomes, each with one
|
|
1132
|
+
* to ten unique event names, an optional filter, and an optional numeric event
|
|
1133
|
+
* property summed as value. Set the credit model (default last_touch), counting
|
|
1134
|
+
* unit (default unique), lookback window of 7, 14, 30, 60, or 90 days (default
|
|
1135
|
+
* 30), an optional filter applied to every outcome, and the value currency
|
|
1136
|
+
* (default USD). Outcome ids identify outcomes in results. Replaces the saved
|
|
1137
|
+
* definition on PATCH.
|
|
1138
|
+
*/
|
|
1139
|
+
interface Definition {
|
|
1140
|
+
kind: 'attribution';
|
|
1141
|
+
outcomes: Array<Definition.Outcome>;
|
|
1142
|
+
version: 1;
|
|
1143
|
+
counting?: 'unique' | 'totals' | 'sessions';
|
|
1144
|
+
currency?: 'USD' | 'CAD' | 'GBP' | 'EUR' | 'AUD';
|
|
1145
|
+
filter?: Definition.Filter;
|
|
1146
|
+
lookbackDays?: 7 | 14 | 30 | 60 | 90;
|
|
1147
|
+
model?: 'first_touch' | 'last_touch' | 'linear' | 'u_shaped' | 'j_shaped' | 'time_decay';
|
|
1148
|
+
}
|
|
1149
|
+
namespace Definition {
|
|
1150
|
+
interface Outcome {
|
|
1151
|
+
id: string;
|
|
1152
|
+
eventNames: Array<string>;
|
|
1153
|
+
label: string;
|
|
1154
|
+
filter?: Outcome.Filter;
|
|
1155
|
+
value?: Outcome.Value;
|
|
1156
|
+
}
|
|
1157
|
+
namespace Outcome {
|
|
1158
|
+
interface Filter {
|
|
1159
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
1160
|
+
version: 1;
|
|
1161
|
+
}
|
|
1162
|
+
namespace Filter {
|
|
1163
|
+
interface UnionMember0 {
|
|
1164
|
+
children: Array<unknown>;
|
|
1165
|
+
kind: 'and' | 'or';
|
|
1166
|
+
}
|
|
1167
|
+
interface UnionMember1 {
|
|
1168
|
+
child: unknown;
|
|
1169
|
+
kind: 'not';
|
|
1170
|
+
}
|
|
1171
|
+
interface UnionMember2 {
|
|
1172
|
+
kind: 'predicate';
|
|
1173
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
1174
|
+
property: string;
|
|
1175
|
+
path?: Array<string>;
|
|
1176
|
+
type?: 'string' | 'number' | 'boolean';
|
|
1177
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
interface Value {
|
|
1181
|
+
path: Array<string>;
|
|
1182
|
+
property: 'event.properties';
|
|
1183
|
+
type?: 'number';
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
interface Filter {
|
|
1187
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
1188
|
+
version: 1;
|
|
1189
|
+
}
|
|
1190
|
+
namespace Filter {
|
|
1191
|
+
interface UnionMember0 {
|
|
1192
|
+
children: Array<unknown>;
|
|
1193
|
+
kind: 'and' | 'or';
|
|
1194
|
+
}
|
|
1195
|
+
interface UnionMember1 {
|
|
1196
|
+
child: unknown;
|
|
1197
|
+
kind: 'not';
|
|
1198
|
+
}
|
|
1199
|
+
interface UnionMember2 {
|
|
1200
|
+
kind: 'predicate';
|
|
1201
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
1202
|
+
property: string;
|
|
1203
|
+
path?: Array<string>;
|
|
1204
|
+
type?: 'string' | 'number' | 'boolean';
|
|
1205
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
/**
|
|
1210
|
+
* Default UTC date range: a preset or inclusive from/to calendar dates. Replaces
|
|
1211
|
+
* the saved context on PATCH. Results cover at most 92 inclusive days.
|
|
1212
|
+
*/
|
|
1213
|
+
interface ReportContext {
|
|
1214
|
+
dateRange: ReportContext.UnionMember0 | ReportContext.UnionMember1;
|
|
1215
|
+
}
|
|
1216
|
+
namespace ReportContext {
|
|
1217
|
+
interface UnionMember0 {
|
|
1218
|
+
from: string;
|
|
1219
|
+
to: string;
|
|
1220
|
+
timeZone?: 'UTC';
|
|
1221
|
+
}
|
|
1222
|
+
interface UnionMember1 {
|
|
1223
|
+
preset: 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_12_months' | 'week_to_date' | 'month_to_date' | 'year_to_date';
|
|
1224
|
+
timeZone?: 'UTC';
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
export interface AttributionReportUpdateParams {
|
|
1229
|
+
/**
|
|
1230
|
+
* Current revision from get_attribution_report, list_attribution_reports, or the
|
|
1231
|
+
* last write. A stale revision returns 409; reload before retrying.
|
|
1232
|
+
*/
|
|
1233
|
+
expectedRevision: string;
|
|
1234
|
+
/**
|
|
1235
|
+
* Version 1 attribution definition: one to five conversion outcomes, each with one
|
|
1236
|
+
* to ten unique event names, an optional filter, and an optional numeric event
|
|
1237
|
+
* property summed as value. Set the credit model (default last_touch), counting
|
|
1238
|
+
* unit (default unique), lookback window of 7, 14, 30, 60, or 90 days (default
|
|
1239
|
+
* 30), an optional filter applied to every outcome, and the value currency
|
|
1240
|
+
* (default USD). Outcome ids identify outcomes in results. Replaces the saved
|
|
1241
|
+
* definition on PATCH.
|
|
1242
|
+
*/
|
|
1243
|
+
definition?: AttributionReportUpdateParams.Definition;
|
|
1244
|
+
/**
|
|
1245
|
+
* Optional description; null clears it.
|
|
1246
|
+
*/
|
|
1247
|
+
description?: string | null;
|
|
1248
|
+
/**
|
|
1249
|
+
* Display name for the saved attribution report.
|
|
1250
|
+
*/
|
|
1251
|
+
name?: string;
|
|
1252
|
+
/**
|
|
1253
|
+
* Default UTC date range: a preset or inclusive from/to calendar dates. Replaces
|
|
1254
|
+
* the saved context on PATCH. Results cover at most 92 inclusive days.
|
|
1255
|
+
*/
|
|
1256
|
+
reportContext?: AttributionReportUpdateParams.ReportContext;
|
|
1257
|
+
}
|
|
1258
|
+
export declare namespace AttributionReportUpdateParams {
|
|
1259
|
+
/**
|
|
1260
|
+
* Version 1 attribution definition: one to five conversion outcomes, each with one
|
|
1261
|
+
* to ten unique event names, an optional filter, and an optional numeric event
|
|
1262
|
+
* property summed as value. Set the credit model (default last_touch), counting
|
|
1263
|
+
* unit (default unique), lookback window of 7, 14, 30, 60, or 90 days (default
|
|
1264
|
+
* 30), an optional filter applied to every outcome, and the value currency
|
|
1265
|
+
* (default USD). Outcome ids identify outcomes in results. Replaces the saved
|
|
1266
|
+
* definition on PATCH.
|
|
1267
|
+
*/
|
|
1268
|
+
interface Definition {
|
|
1269
|
+
kind: 'attribution';
|
|
1270
|
+
outcomes: Array<Definition.Outcome>;
|
|
1271
|
+
version: 1;
|
|
1272
|
+
counting?: 'unique' | 'totals' | 'sessions';
|
|
1273
|
+
currency?: 'USD' | 'CAD' | 'GBP' | 'EUR' | 'AUD';
|
|
1274
|
+
filter?: Definition.Filter;
|
|
1275
|
+
lookbackDays?: 7 | 14 | 30 | 60 | 90;
|
|
1276
|
+
model?: 'first_touch' | 'last_touch' | 'linear' | 'u_shaped' | 'j_shaped' | 'time_decay';
|
|
1277
|
+
}
|
|
1278
|
+
namespace Definition {
|
|
1279
|
+
interface Outcome {
|
|
1280
|
+
id: string;
|
|
1281
|
+
eventNames: Array<string>;
|
|
1282
|
+
label: string;
|
|
1283
|
+
filter?: Outcome.Filter;
|
|
1284
|
+
value?: Outcome.Value;
|
|
1285
|
+
}
|
|
1286
|
+
namespace Outcome {
|
|
1287
|
+
interface Filter {
|
|
1288
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
1289
|
+
version: 1;
|
|
1290
|
+
}
|
|
1291
|
+
namespace Filter {
|
|
1292
|
+
interface UnionMember0 {
|
|
1293
|
+
children: Array<unknown>;
|
|
1294
|
+
kind: 'and' | 'or';
|
|
1295
|
+
}
|
|
1296
|
+
interface UnionMember1 {
|
|
1297
|
+
child: unknown;
|
|
1298
|
+
kind: 'not';
|
|
1299
|
+
}
|
|
1300
|
+
interface UnionMember2 {
|
|
1301
|
+
kind: 'predicate';
|
|
1302
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
1303
|
+
property: string;
|
|
1304
|
+
path?: Array<string>;
|
|
1305
|
+
type?: 'string' | 'number' | 'boolean';
|
|
1306
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
interface Value {
|
|
1310
|
+
path: Array<string>;
|
|
1311
|
+
property: 'event.properties';
|
|
1312
|
+
type?: 'number';
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
interface Filter {
|
|
1316
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
1317
|
+
version: 1;
|
|
1318
|
+
}
|
|
1319
|
+
namespace Filter {
|
|
1320
|
+
interface UnionMember0 {
|
|
1321
|
+
children: Array<unknown>;
|
|
1322
|
+
kind: 'and' | 'or';
|
|
1323
|
+
}
|
|
1324
|
+
interface UnionMember1 {
|
|
1325
|
+
child: unknown;
|
|
1326
|
+
kind: 'not';
|
|
1327
|
+
}
|
|
1328
|
+
interface UnionMember2 {
|
|
1329
|
+
kind: 'predicate';
|
|
1330
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
1331
|
+
property: string;
|
|
1332
|
+
path?: Array<string>;
|
|
1333
|
+
type?: 'string' | 'number' | 'boolean';
|
|
1334
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
/**
|
|
1339
|
+
* Default UTC date range: a preset or inclusive from/to calendar dates. Replaces
|
|
1340
|
+
* the saved context on PATCH. Results cover at most 92 inclusive days.
|
|
1341
|
+
*/
|
|
1342
|
+
interface ReportContext {
|
|
1343
|
+
dateRange: ReportContext.UnionMember0 | ReportContext.UnionMember1;
|
|
1344
|
+
}
|
|
1345
|
+
namespace ReportContext {
|
|
1346
|
+
interface UnionMember0 {
|
|
1347
|
+
from: string;
|
|
1348
|
+
to: string;
|
|
1349
|
+
timeZone?: 'UTC';
|
|
1350
|
+
}
|
|
1351
|
+
interface UnionMember1 {
|
|
1352
|
+
preset: 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_12_months' | 'week_to_date' | 'month_to_date' | 'year_to_date';
|
|
1353
|
+
timeZone?: 'UTC';
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
export interface AttributionReportDeleteParams {
|
|
1358
|
+
/**
|
|
1359
|
+
* Current revision from get_attribution_report, list_attribution_reports, or the
|
|
1360
|
+
* last write. A stale revision returns 409; reload before retrying.
|
|
1361
|
+
*/
|
|
1362
|
+
expectedRevision: string;
|
|
1363
|
+
}
|
|
1364
|
+
export interface AttributionReportDuplicateParams {
|
|
1365
|
+
/**
|
|
1366
|
+
* Current revision from get_attribution_report, list_attribution_reports, or the
|
|
1367
|
+
* last write. A stale revision returns 409; reload before retrying.
|
|
1368
|
+
*/
|
|
1369
|
+
expectedRevision: string;
|
|
1370
|
+
}
|
|
1371
|
+
export interface AttributionReportPreviewParams {
|
|
1372
|
+
/**
|
|
1373
|
+
* Required input: definition, from, and to; comparison and interval are optional.
|
|
1374
|
+
* JSON-encode this object in the REST query string; maximum 16384 bytes before URL
|
|
1375
|
+
* encoding. Computing a result never saves or changes a report.
|
|
1376
|
+
*/
|
|
1377
|
+
input: string;
|
|
1378
|
+
}
|
|
1379
|
+
export interface AttributionReportVisitorsParams {
|
|
1380
|
+
/**
|
|
1381
|
+
* Required input: the same definition, from, to, and optional comparison and
|
|
1382
|
+
* interval that produced the result, plus the selection to open; limit and cursor
|
|
1383
|
+
* are optional. JSON-encode this object in the REST query string; maximum 16384
|
|
1384
|
+
* bytes before URL encoding.
|
|
1385
|
+
*/
|
|
1386
|
+
input: string;
|
|
1387
|
+
}
|
|
1388
|
+
export interface AttributionReportInsightsParams {
|
|
1389
|
+
/**
|
|
1390
|
+
* Required input: definition, from, and to; comparison and interval are optional.
|
|
1391
|
+
* Use the same input as the preview to explain what moved in that result.
|
|
1392
|
+
* JSON-encode this object in the REST query string; maximum 16384 bytes before URL
|
|
1393
|
+
* encoding. Nothing is saved.
|
|
1394
|
+
*/
|
|
1395
|
+
input: string;
|
|
1396
|
+
}
|
|
1397
|
+
export declare namespace AttributionReports {
|
|
1398
|
+
export { type AttributionReportListResponse as AttributionReportListResponse, type AttributionReportCreateResponse as AttributionReportCreateResponse, type AttributionReportRetrieveResponse as AttributionReportRetrieveResponse, type AttributionReportUpdateResponse as AttributionReportUpdateResponse, type AttributionReportDeleteResponse as AttributionReportDeleteResponse, type AttributionReportDuplicateResponse as AttributionReportDuplicateResponse, type AttributionReportPreviewResponse as AttributionReportPreviewResponse, type AttributionReportVisitorsResponse as AttributionReportVisitorsResponse, type AttributionReportInsightsResponse as AttributionReportInsightsResponse, type AttributionReportListResponsesCursor as AttributionReportListResponsesCursor, type AttributionReportListParams as AttributionReportListParams, type AttributionReportCreateParams as AttributionReportCreateParams, type AttributionReportUpdateParams as AttributionReportUpdateParams, type AttributionReportDeleteParams as AttributionReportDeleteParams, type AttributionReportDuplicateParams as AttributionReportDuplicateParams, type AttributionReportPreviewParams as AttributionReportPreviewParams, type AttributionReportVisitorsParams as AttributionReportVisitorsParams, type AttributionReportInsightsParams as AttributionReportInsightsParams, };
|
|
1399
|
+
}
|
|
1400
|
+
//# sourceMappingURL=attribution-reports.d.mts.map
|