@algolia/client-analytics 5.2.5 → 5.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.d.ts +1152 -809
- package/dist/builds/browser.js +61 -47
- package/dist/builds/browser.js.map +1 -1
- package/dist/builds/browser.min.js +1 -1
- package/dist/builds/browser.min.js.map +1 -1
- package/dist/builds/browser.umd.js +1 -1
- package/dist/builds/node.cjs +61 -47
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +61 -47
- package/dist/builds/node.js.map +1 -1
- package/dist/node.d.cts +1153 -810
- package/dist/node.d.ts +1153 -810
- package/dist/src/analyticsClient.cjs +61 -47
- package/dist/src/analyticsClient.cjs.map +1 -1
- package/dist/src/analyticsClient.js +61 -47
- package/dist/src/analyticsClient.js.map +1 -1
- package/package.json +4 -4
package/dist/browser.d.ts
CHANGED
|
@@ -1,1399 +1,1742 @@
|
|
|
1
1
|
import * as _algolia_client_common from '@algolia/client-common';
|
|
2
|
-
import { ClientOptions } from '@algolia/client-common';
|
|
2
|
+
import { CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/client-common';
|
|
3
|
+
|
|
4
|
+
type Direction = 'asc' | 'desc';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
|
-
*
|
|
7
|
+
* Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
|
|
6
8
|
*/
|
|
7
|
-
type
|
|
9
|
+
type OrderBy = 'averageClickPosition' | 'clickThroughRate' | 'conversionRate' | 'searchCount';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Properties for the `customDelete` method.
|
|
13
|
+
*/
|
|
14
|
+
type CustomDeleteProps = {
|
|
8
15
|
/**
|
|
9
|
-
*
|
|
16
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
10
17
|
*/
|
|
11
|
-
|
|
18
|
+
path: string;
|
|
12
19
|
/**
|
|
13
|
-
*
|
|
20
|
+
* Query parameters to apply to the current query.
|
|
14
21
|
*/
|
|
15
|
-
|
|
22
|
+
parameters?: Record<string, any>;
|
|
16
23
|
};
|
|
17
|
-
|
|
18
24
|
/**
|
|
19
|
-
*
|
|
25
|
+
* Properties for the `customGet` method.
|
|
20
26
|
*/
|
|
21
|
-
type
|
|
27
|
+
type CustomGetProps = {
|
|
22
28
|
/**
|
|
23
|
-
*
|
|
29
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
24
30
|
*/
|
|
25
|
-
|
|
31
|
+
path: string;
|
|
26
32
|
/**
|
|
27
|
-
*
|
|
33
|
+
* Query parameters to apply to the current query.
|
|
28
34
|
*/
|
|
29
|
-
|
|
35
|
+
parameters?: Record<string, any>;
|
|
30
36
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*/
|
|
36
|
-
rate: number | null;
|
|
37
|
+
/**
|
|
38
|
+
* Properties for the `customPost` method.
|
|
39
|
+
*/
|
|
40
|
+
type CustomPostProps = {
|
|
37
41
|
/**
|
|
38
|
-
*
|
|
42
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
39
43
|
*/
|
|
40
|
-
|
|
44
|
+
path: string;
|
|
41
45
|
/**
|
|
42
|
-
*
|
|
46
|
+
* Query parameters to apply to the current query.
|
|
43
47
|
*/
|
|
44
|
-
|
|
48
|
+
parameters?: Record<string, any>;
|
|
45
49
|
/**
|
|
46
|
-
*
|
|
50
|
+
* Parameters to send with the custom request.
|
|
47
51
|
*/
|
|
48
|
-
|
|
52
|
+
body?: Record<string, unknown>;
|
|
49
53
|
};
|
|
50
|
-
|
|
51
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Properties for the `customPut` method.
|
|
56
|
+
*/
|
|
57
|
+
type CustomPutProps = {
|
|
52
58
|
/**
|
|
53
|
-
*
|
|
59
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
54
60
|
*/
|
|
55
|
-
|
|
61
|
+
path: string;
|
|
56
62
|
/**
|
|
57
|
-
*
|
|
63
|
+
* Query parameters to apply to the current query.
|
|
58
64
|
*/
|
|
59
|
-
|
|
65
|
+
parameters?: Record<string, any>;
|
|
60
66
|
/**
|
|
61
|
-
*
|
|
67
|
+
* Parameters to send with the custom request.
|
|
62
68
|
*/
|
|
63
|
-
|
|
69
|
+
body?: Record<string, unknown>;
|
|
64
70
|
};
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
/**
|
|
72
|
+
* Properties for the `getAddToCartRate` method.
|
|
73
|
+
*/
|
|
74
|
+
type GetAddToCartRateProps = {
|
|
67
75
|
/**
|
|
68
|
-
*
|
|
76
|
+
* Index name.
|
|
69
77
|
*/
|
|
70
|
-
|
|
78
|
+
index: string;
|
|
71
79
|
/**
|
|
72
|
-
*
|
|
80
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
73
81
|
*/
|
|
74
|
-
|
|
82
|
+
startDate?: string;
|
|
75
83
|
/**
|
|
76
|
-
*
|
|
84
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
77
85
|
*/
|
|
78
|
-
|
|
86
|
+
endDate?: string;
|
|
79
87
|
/**
|
|
80
|
-
*
|
|
88
|
+
* Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
81
89
|
*/
|
|
82
|
-
|
|
90
|
+
tags?: string;
|
|
83
91
|
};
|
|
84
|
-
|
|
85
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Properties for the `getAverageClickPosition` method.
|
|
94
|
+
*/
|
|
95
|
+
type GetAverageClickPositionProps = {
|
|
86
96
|
/**
|
|
87
|
-
*
|
|
97
|
+
* Index name.
|
|
88
98
|
*/
|
|
89
|
-
|
|
99
|
+
index: string;
|
|
90
100
|
/**
|
|
91
|
-
*
|
|
101
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
92
102
|
*/
|
|
93
|
-
|
|
103
|
+
startDate?: string;
|
|
94
104
|
/**
|
|
95
|
-
*
|
|
105
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
96
106
|
*/
|
|
97
|
-
|
|
107
|
+
endDate?: string;
|
|
98
108
|
/**
|
|
99
|
-
*
|
|
109
|
+
* Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
100
110
|
*/
|
|
101
|
-
|
|
111
|
+
tags?: string;
|
|
102
112
|
};
|
|
103
|
-
|
|
104
|
-
|
|
113
|
+
/**
|
|
114
|
+
* Properties for the `getClickPositions` method.
|
|
115
|
+
*/
|
|
116
|
+
type GetClickPositionsProps = {
|
|
105
117
|
/**
|
|
106
|
-
*
|
|
118
|
+
* Index name.
|
|
107
119
|
*/
|
|
108
|
-
|
|
120
|
+
index: string;
|
|
109
121
|
/**
|
|
110
|
-
*
|
|
122
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
111
123
|
*/
|
|
112
|
-
|
|
124
|
+
startDate?: string;
|
|
113
125
|
/**
|
|
114
|
-
*
|
|
126
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
115
127
|
*/
|
|
116
|
-
|
|
128
|
+
endDate?: string;
|
|
117
129
|
/**
|
|
118
|
-
*
|
|
130
|
+
* Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
119
131
|
*/
|
|
120
|
-
|
|
132
|
+
tags?: string;
|
|
121
133
|
};
|
|
122
|
-
|
|
123
|
-
|
|
134
|
+
/**
|
|
135
|
+
* Properties for the `getClickThroughRate` method.
|
|
136
|
+
*/
|
|
137
|
+
type GetClickThroughRateProps = {
|
|
124
138
|
/**
|
|
125
|
-
*
|
|
139
|
+
* Index name.
|
|
126
140
|
*/
|
|
127
|
-
|
|
141
|
+
index: string;
|
|
128
142
|
/**
|
|
129
|
-
*
|
|
143
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
130
144
|
*/
|
|
131
|
-
|
|
145
|
+
startDate?: string;
|
|
132
146
|
/**
|
|
133
|
-
*
|
|
147
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
134
148
|
*/
|
|
135
|
-
|
|
149
|
+
endDate?: string;
|
|
136
150
|
/**
|
|
137
|
-
*
|
|
151
|
+
* Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
138
152
|
*/
|
|
139
|
-
|
|
153
|
+
tags?: string;
|
|
140
154
|
};
|
|
141
|
-
|
|
142
|
-
|
|
155
|
+
/**
|
|
156
|
+
* Properties for the `getConversionRate` method.
|
|
157
|
+
*/
|
|
158
|
+
type GetConversionRateProps = {
|
|
143
159
|
/**
|
|
144
|
-
*
|
|
160
|
+
* Index name.
|
|
145
161
|
*/
|
|
146
|
-
|
|
162
|
+
index: string;
|
|
147
163
|
/**
|
|
148
|
-
*
|
|
164
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
149
165
|
*/
|
|
150
|
-
|
|
166
|
+
startDate?: string;
|
|
151
167
|
/**
|
|
152
|
-
*
|
|
168
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
153
169
|
*/
|
|
154
|
-
|
|
170
|
+
endDate?: string;
|
|
155
171
|
/**
|
|
156
|
-
*
|
|
172
|
+
* Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
157
173
|
*/
|
|
158
|
-
|
|
174
|
+
tags?: string;
|
|
159
175
|
};
|
|
160
|
-
|
|
161
|
-
|
|
176
|
+
/**
|
|
177
|
+
* Properties for the `getNoClickRate` method.
|
|
178
|
+
*/
|
|
179
|
+
type GetNoClickRateProps = {
|
|
162
180
|
/**
|
|
163
|
-
*
|
|
181
|
+
* Index name.
|
|
164
182
|
*/
|
|
165
|
-
|
|
183
|
+
index: string;
|
|
166
184
|
/**
|
|
167
|
-
*
|
|
185
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
168
186
|
*/
|
|
169
|
-
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
type DailySearches = {
|
|
187
|
+
startDate?: string;
|
|
173
188
|
/**
|
|
174
|
-
*
|
|
189
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
175
190
|
*/
|
|
176
|
-
|
|
191
|
+
endDate?: string;
|
|
177
192
|
/**
|
|
178
|
-
*
|
|
193
|
+
* Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
179
194
|
*/
|
|
180
|
-
|
|
195
|
+
tags?: string;
|
|
181
196
|
};
|
|
182
|
-
|
|
183
|
-
|
|
197
|
+
/**
|
|
198
|
+
* Properties for the `getNoResultsRate` method.
|
|
199
|
+
*/
|
|
200
|
+
type GetNoResultsRateProps = {
|
|
184
201
|
/**
|
|
185
|
-
*
|
|
202
|
+
* Index name.
|
|
186
203
|
*/
|
|
187
|
-
|
|
204
|
+
index: string;
|
|
188
205
|
/**
|
|
189
|
-
*
|
|
206
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
190
207
|
*/
|
|
191
|
-
|
|
208
|
+
startDate?: string;
|
|
192
209
|
/**
|
|
193
|
-
*
|
|
210
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
194
211
|
*/
|
|
195
|
-
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
type DailySearchesNoResults = {
|
|
212
|
+
endDate?: string;
|
|
199
213
|
/**
|
|
200
|
-
*
|
|
214
|
+
* Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
201
215
|
*/
|
|
202
|
-
|
|
216
|
+
tags?: string;
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
219
|
+
* Properties for the `getPurchaseRate` method.
|
|
220
|
+
*/
|
|
221
|
+
type GetPurchaseRateProps = {
|
|
203
222
|
/**
|
|
204
|
-
*
|
|
223
|
+
* Index name.
|
|
205
224
|
*/
|
|
206
|
-
|
|
225
|
+
index: string;
|
|
207
226
|
/**
|
|
208
|
-
*
|
|
227
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
209
228
|
*/
|
|
210
|
-
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
type DailyUsers = {
|
|
229
|
+
startDate?: string;
|
|
214
230
|
/**
|
|
215
|
-
*
|
|
231
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
216
232
|
*/
|
|
217
|
-
|
|
233
|
+
endDate?: string;
|
|
218
234
|
/**
|
|
219
|
-
*
|
|
235
|
+
* Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
220
236
|
*/
|
|
221
|
-
|
|
237
|
+
tags?: string;
|
|
222
238
|
};
|
|
223
|
-
|
|
224
|
-
type Direction = 'asc' | 'desc';
|
|
225
|
-
|
|
226
239
|
/**
|
|
227
|
-
*
|
|
240
|
+
* Properties for the `getRevenue` method.
|
|
228
241
|
*/
|
|
229
|
-
type
|
|
230
|
-
message?: string;
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
type GetAddToCartRateResponse = {
|
|
242
|
+
type GetRevenueProps = {
|
|
234
243
|
/**
|
|
235
|
-
*
|
|
244
|
+
* Index name.
|
|
236
245
|
*/
|
|
237
|
-
|
|
246
|
+
index: string;
|
|
238
247
|
/**
|
|
239
|
-
*
|
|
248
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
240
249
|
*/
|
|
241
|
-
|
|
250
|
+
startDate?: string;
|
|
242
251
|
/**
|
|
243
|
-
*
|
|
252
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
244
253
|
*/
|
|
245
|
-
|
|
254
|
+
endDate?: string;
|
|
246
255
|
/**
|
|
247
|
-
*
|
|
256
|
+
* Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
248
257
|
*/
|
|
249
|
-
|
|
258
|
+
tags?: string;
|
|
250
259
|
};
|
|
251
|
-
|
|
252
|
-
|
|
260
|
+
/**
|
|
261
|
+
* Properties for the `getSearchesCount` method.
|
|
262
|
+
*/
|
|
263
|
+
type GetSearchesCountProps = {
|
|
253
264
|
/**
|
|
254
|
-
*
|
|
265
|
+
* Index name.
|
|
255
266
|
*/
|
|
256
|
-
|
|
267
|
+
index: string;
|
|
257
268
|
/**
|
|
258
|
-
*
|
|
269
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
259
270
|
*/
|
|
260
|
-
|
|
271
|
+
startDate?: string;
|
|
261
272
|
/**
|
|
262
|
-
*
|
|
273
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
263
274
|
*/
|
|
264
|
-
|
|
265
|
-
};
|
|
266
|
-
|
|
267
|
-
type GetClickPositionsResponse = {
|
|
275
|
+
endDate?: string;
|
|
268
276
|
/**
|
|
269
|
-
*
|
|
277
|
+
* Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
270
278
|
*/
|
|
271
|
-
|
|
279
|
+
tags?: string;
|
|
272
280
|
};
|
|
273
|
-
|
|
274
|
-
|
|
281
|
+
/**
|
|
282
|
+
* Properties for the `getSearchesNoClicks` method.
|
|
283
|
+
*/
|
|
284
|
+
type GetSearchesNoClicksProps = {
|
|
275
285
|
/**
|
|
276
|
-
*
|
|
286
|
+
* Index name.
|
|
277
287
|
*/
|
|
278
|
-
|
|
288
|
+
index: string;
|
|
279
289
|
/**
|
|
280
|
-
*
|
|
290
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
281
291
|
*/
|
|
282
|
-
|
|
292
|
+
startDate?: string;
|
|
283
293
|
/**
|
|
284
|
-
*
|
|
294
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
285
295
|
*/
|
|
286
|
-
|
|
296
|
+
endDate?: string;
|
|
287
297
|
/**
|
|
288
|
-
*
|
|
298
|
+
* Number of items to return.
|
|
289
299
|
*/
|
|
290
|
-
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
type GetConversionRateResponse = {
|
|
300
|
+
limit?: number;
|
|
294
301
|
/**
|
|
295
|
-
*
|
|
302
|
+
* Position of the first item to return.
|
|
296
303
|
*/
|
|
297
|
-
|
|
304
|
+
offset?: number;
|
|
298
305
|
/**
|
|
299
|
-
*
|
|
306
|
+
* Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
300
307
|
*/
|
|
301
|
-
|
|
308
|
+
tags?: string;
|
|
309
|
+
};
|
|
310
|
+
/**
|
|
311
|
+
* Properties for the `getSearchesNoResults` method.
|
|
312
|
+
*/
|
|
313
|
+
type GetSearchesNoResultsProps = {
|
|
302
314
|
/**
|
|
303
|
-
*
|
|
315
|
+
* Index name.
|
|
304
316
|
*/
|
|
305
|
-
|
|
317
|
+
index: string;
|
|
306
318
|
/**
|
|
307
|
-
*
|
|
319
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
308
320
|
*/
|
|
309
|
-
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
type GetNoClickRateResponse = {
|
|
321
|
+
startDate?: string;
|
|
313
322
|
/**
|
|
314
|
-
*
|
|
323
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
315
324
|
*/
|
|
316
|
-
|
|
325
|
+
endDate?: string;
|
|
317
326
|
/**
|
|
318
|
-
* Number of
|
|
327
|
+
* Number of items to return.
|
|
319
328
|
*/
|
|
320
|
-
|
|
329
|
+
limit?: number;
|
|
321
330
|
/**
|
|
322
|
-
*
|
|
331
|
+
* Position of the first item to return.
|
|
323
332
|
*/
|
|
324
|
-
|
|
333
|
+
offset?: number;
|
|
325
334
|
/**
|
|
326
|
-
*
|
|
335
|
+
* Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
327
336
|
*/
|
|
328
|
-
|
|
337
|
+
tags?: string;
|
|
329
338
|
};
|
|
330
|
-
|
|
331
|
-
|
|
339
|
+
/**
|
|
340
|
+
* Properties for the `getStatus` method.
|
|
341
|
+
*/
|
|
342
|
+
type GetStatusProps = {
|
|
332
343
|
/**
|
|
333
|
-
*
|
|
344
|
+
* Index name.
|
|
334
345
|
*/
|
|
335
|
-
|
|
346
|
+
index: string;
|
|
347
|
+
};
|
|
348
|
+
/**
|
|
349
|
+
* Properties for the `getTopCountries` method.
|
|
350
|
+
*/
|
|
351
|
+
type GetTopCountriesProps = {
|
|
336
352
|
/**
|
|
337
|
-
*
|
|
353
|
+
* Index name.
|
|
338
354
|
*/
|
|
339
|
-
|
|
355
|
+
index: string;
|
|
340
356
|
/**
|
|
341
|
-
*
|
|
357
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
342
358
|
*/
|
|
343
|
-
|
|
359
|
+
startDate?: string;
|
|
344
360
|
/**
|
|
345
|
-
*
|
|
361
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
346
362
|
*/
|
|
347
|
-
|
|
348
|
-
};
|
|
349
|
-
|
|
350
|
-
type GetPurchaseRateResponse = {
|
|
363
|
+
endDate?: string;
|
|
351
364
|
/**
|
|
352
|
-
*
|
|
365
|
+
* Number of items to return.
|
|
353
366
|
*/
|
|
354
|
-
|
|
367
|
+
limit?: number;
|
|
355
368
|
/**
|
|
356
|
-
*
|
|
369
|
+
* Position of the first item to return.
|
|
357
370
|
*/
|
|
358
|
-
|
|
371
|
+
offset?: number;
|
|
359
372
|
/**
|
|
360
|
-
*
|
|
373
|
+
* Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
361
374
|
*/
|
|
362
|
-
|
|
375
|
+
tags?: string;
|
|
376
|
+
};
|
|
377
|
+
/**
|
|
378
|
+
* Properties for the `getTopFilterAttributes` method.
|
|
379
|
+
*/
|
|
380
|
+
type GetTopFilterAttributesProps = {
|
|
363
381
|
/**
|
|
364
|
-
*
|
|
382
|
+
* Index name.
|
|
365
383
|
*/
|
|
366
|
-
|
|
367
|
-
};
|
|
368
|
-
|
|
369
|
-
type GetRevenue = {
|
|
384
|
+
index: string;
|
|
370
385
|
/**
|
|
371
|
-
*
|
|
386
|
+
* Search query.
|
|
372
387
|
*/
|
|
373
|
-
|
|
388
|
+
search?: string;
|
|
374
389
|
/**
|
|
375
|
-
*
|
|
390
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
376
391
|
*/
|
|
377
|
-
|
|
378
|
-
};
|
|
379
|
-
|
|
380
|
-
type GetSearchesCountResponse = {
|
|
392
|
+
startDate?: string;
|
|
381
393
|
/**
|
|
382
|
-
*
|
|
394
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
383
395
|
*/
|
|
384
|
-
|
|
396
|
+
endDate?: string;
|
|
385
397
|
/**
|
|
386
|
-
*
|
|
398
|
+
* Number of items to return.
|
|
387
399
|
*/
|
|
388
|
-
|
|
389
|
-
};
|
|
390
|
-
|
|
391
|
-
type GetSearchesNoClicksResponse = {
|
|
400
|
+
limit?: number;
|
|
392
401
|
/**
|
|
393
|
-
*
|
|
402
|
+
* Position of the first item to return.
|
|
394
403
|
*/
|
|
395
|
-
|
|
396
|
-
};
|
|
397
|
-
|
|
398
|
-
type GetSearchesNoResultsResponse = {
|
|
404
|
+
offset?: number;
|
|
399
405
|
/**
|
|
400
|
-
*
|
|
406
|
+
* Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
401
407
|
*/
|
|
402
|
-
|
|
408
|
+
tags?: string;
|
|
403
409
|
};
|
|
404
|
-
|
|
405
|
-
|
|
410
|
+
/**
|
|
411
|
+
* Properties for the `getTopFilterForAttribute` method.
|
|
412
|
+
*/
|
|
413
|
+
type GetTopFilterForAttributeProps = {
|
|
406
414
|
/**
|
|
407
|
-
*
|
|
415
|
+
* Attribute name.
|
|
408
416
|
*/
|
|
409
|
-
|
|
410
|
-
};
|
|
411
|
-
|
|
412
|
-
type TopCountry = {
|
|
417
|
+
attribute: string;
|
|
413
418
|
/**
|
|
414
|
-
*
|
|
419
|
+
* Index name.
|
|
415
420
|
*/
|
|
416
|
-
|
|
421
|
+
index: string;
|
|
417
422
|
/**
|
|
418
|
-
*
|
|
423
|
+
* Search query.
|
|
419
424
|
*/
|
|
420
|
-
|
|
421
|
-
};
|
|
422
|
-
|
|
423
|
-
type GetTopCountriesResponse = {
|
|
425
|
+
search?: string;
|
|
424
426
|
/**
|
|
425
|
-
*
|
|
427
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
426
428
|
*/
|
|
427
|
-
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
type GetTopFilterAttribute = {
|
|
429
|
+
startDate?: string;
|
|
431
430
|
/**
|
|
432
|
-
*
|
|
431
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
433
432
|
*/
|
|
434
|
-
|
|
433
|
+
endDate?: string;
|
|
435
434
|
/**
|
|
436
|
-
* Number of
|
|
435
|
+
* Number of items to return.
|
|
437
436
|
*/
|
|
438
|
-
|
|
439
|
-
};
|
|
440
|
-
|
|
441
|
-
type GetTopFilterAttributesResponse = {
|
|
437
|
+
limit?: number;
|
|
442
438
|
/**
|
|
443
|
-
*
|
|
439
|
+
* Position of the first item to return.
|
|
444
440
|
*/
|
|
445
|
-
|
|
441
|
+
offset?: number;
|
|
442
|
+
/**
|
|
443
|
+
* Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
444
|
+
*/
|
|
445
|
+
tags?: string;
|
|
446
446
|
};
|
|
447
|
-
|
|
448
447
|
/**
|
|
449
|
-
*
|
|
448
|
+
* Properties for the `getTopFiltersNoResults` method.
|
|
450
449
|
*/
|
|
451
|
-
type
|
|
452
|
-
|
|
453
|
-
type GetTopFilterForAttribute = {
|
|
454
|
-
/**
|
|
455
|
-
* Attribute name.
|
|
456
|
-
*/
|
|
457
|
-
attribute: string;
|
|
458
|
-
operator: Operator;
|
|
459
|
-
/**
|
|
460
|
-
* Attribute value.
|
|
461
|
-
*/
|
|
462
|
-
value: string;
|
|
450
|
+
type GetTopFiltersNoResultsProps = {
|
|
463
451
|
/**
|
|
464
|
-
*
|
|
452
|
+
* Index name.
|
|
465
453
|
*/
|
|
466
|
-
|
|
467
|
-
};
|
|
468
|
-
|
|
469
|
-
type GetTopFilterForAttributeResponse = {
|
|
454
|
+
index: string;
|
|
470
455
|
/**
|
|
471
|
-
*
|
|
456
|
+
* Search query.
|
|
472
457
|
*/
|
|
473
|
-
|
|
474
|
-
};
|
|
475
|
-
|
|
476
|
-
type GetTopFiltersNoResultsValue = {
|
|
458
|
+
search?: string;
|
|
477
459
|
/**
|
|
478
|
-
*
|
|
460
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
479
461
|
*/
|
|
480
|
-
|
|
481
|
-
operator: Operator;
|
|
462
|
+
startDate?: string;
|
|
482
463
|
/**
|
|
483
|
-
*
|
|
464
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
484
465
|
*/
|
|
485
|
-
|
|
486
|
-
};
|
|
487
|
-
|
|
488
|
-
type GetTopFiltersNoResultsValues = {
|
|
466
|
+
endDate?: string;
|
|
489
467
|
/**
|
|
490
|
-
* Number of
|
|
468
|
+
* Number of items to return.
|
|
491
469
|
*/
|
|
492
|
-
|
|
470
|
+
limit?: number;
|
|
493
471
|
/**
|
|
494
|
-
*
|
|
472
|
+
* Position of the first item to return.
|
|
495
473
|
*/
|
|
496
|
-
|
|
497
|
-
};
|
|
498
|
-
|
|
499
|
-
type GetTopFiltersNoResultsResponse = {
|
|
474
|
+
offset?: number;
|
|
500
475
|
/**
|
|
501
|
-
*
|
|
476
|
+
* Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
502
477
|
*/
|
|
503
|
-
|
|
478
|
+
tags?: string;
|
|
504
479
|
};
|
|
505
|
-
|
|
506
|
-
|
|
480
|
+
/**
|
|
481
|
+
* Properties for the `getTopHits` method.
|
|
482
|
+
*/
|
|
483
|
+
type GetTopHitsProps = {
|
|
507
484
|
/**
|
|
508
|
-
*
|
|
485
|
+
* Index name.
|
|
509
486
|
*/
|
|
510
|
-
|
|
487
|
+
index: string;
|
|
511
488
|
/**
|
|
512
|
-
*
|
|
489
|
+
* Search query.
|
|
513
490
|
*/
|
|
514
|
-
|
|
515
|
-
};
|
|
516
|
-
|
|
517
|
-
type TopHitsResponse = {
|
|
491
|
+
search?: string;
|
|
518
492
|
/**
|
|
519
|
-
*
|
|
493
|
+
* Whether to include metrics related to click and conversion events in the response.
|
|
520
494
|
*/
|
|
521
|
-
|
|
522
|
-
};
|
|
523
|
-
|
|
524
|
-
type TopHitWithAnalytics = {
|
|
495
|
+
clickAnalytics?: boolean;
|
|
525
496
|
/**
|
|
526
|
-
*
|
|
497
|
+
* Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
|
|
527
498
|
*/
|
|
528
|
-
|
|
499
|
+
revenueAnalytics?: boolean;
|
|
529
500
|
/**
|
|
530
|
-
*
|
|
501
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
531
502
|
*/
|
|
532
|
-
|
|
503
|
+
startDate?: string;
|
|
533
504
|
/**
|
|
534
|
-
*
|
|
505
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
535
506
|
*/
|
|
536
|
-
|
|
507
|
+
endDate?: string;
|
|
537
508
|
/**
|
|
538
|
-
*
|
|
509
|
+
* Number of items to return.
|
|
539
510
|
*/
|
|
540
|
-
|
|
511
|
+
limit?: number;
|
|
541
512
|
/**
|
|
542
|
-
*
|
|
513
|
+
* Position of the first item to return.
|
|
543
514
|
*/
|
|
544
|
-
|
|
515
|
+
offset?: number;
|
|
545
516
|
/**
|
|
546
|
-
*
|
|
517
|
+
* Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
547
518
|
*/
|
|
548
|
-
|
|
519
|
+
tags?: string;
|
|
520
|
+
};
|
|
521
|
+
/**
|
|
522
|
+
* Properties for the `getTopSearches` method.
|
|
523
|
+
*/
|
|
524
|
+
type GetTopSearchesProps = {
|
|
549
525
|
/**
|
|
550
|
-
*
|
|
526
|
+
* Index name.
|
|
551
527
|
*/
|
|
552
|
-
|
|
553
|
-
};
|
|
554
|
-
|
|
555
|
-
type TopHitsResponseWithAnalytics = {
|
|
528
|
+
index: string;
|
|
556
529
|
/**
|
|
557
|
-
*
|
|
530
|
+
* Whether to include metrics related to click and conversion events in the response.
|
|
558
531
|
*/
|
|
559
|
-
|
|
560
|
-
};
|
|
561
|
-
|
|
562
|
-
type TopHitWithRevenueAnalytics = {
|
|
532
|
+
clickAnalytics?: boolean;
|
|
563
533
|
/**
|
|
564
|
-
*
|
|
534
|
+
* Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
|
|
565
535
|
*/
|
|
566
|
-
|
|
536
|
+
revenueAnalytics?: boolean;
|
|
567
537
|
/**
|
|
568
|
-
*
|
|
538
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
569
539
|
*/
|
|
570
|
-
|
|
540
|
+
startDate?: string;
|
|
571
541
|
/**
|
|
572
|
-
*
|
|
542
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
573
543
|
*/
|
|
574
|
-
|
|
544
|
+
endDate?: string;
|
|
575
545
|
/**
|
|
576
|
-
*
|
|
546
|
+
* Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
|
|
577
547
|
*/
|
|
578
|
-
|
|
548
|
+
orderBy?: OrderBy;
|
|
579
549
|
/**
|
|
580
|
-
*
|
|
550
|
+
* Sorting direction of the results: ascending or descending.
|
|
581
551
|
*/
|
|
582
|
-
|
|
552
|
+
direction?: Direction;
|
|
583
553
|
/**
|
|
584
|
-
* Number of
|
|
554
|
+
* Number of items to return.
|
|
585
555
|
*/
|
|
586
|
-
|
|
556
|
+
limit?: number;
|
|
587
557
|
/**
|
|
588
|
-
*
|
|
558
|
+
* Position of the first item to return.
|
|
589
559
|
*/
|
|
590
|
-
|
|
560
|
+
offset?: number;
|
|
591
561
|
/**
|
|
592
|
-
*
|
|
562
|
+
* Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
593
563
|
*/
|
|
594
|
-
|
|
564
|
+
tags?: string;
|
|
565
|
+
};
|
|
566
|
+
/**
|
|
567
|
+
* Properties for the `getUsersCount` method.
|
|
568
|
+
*/
|
|
569
|
+
type GetUsersCountProps = {
|
|
595
570
|
/**
|
|
596
|
-
*
|
|
571
|
+
* Index name.
|
|
597
572
|
*/
|
|
598
|
-
|
|
573
|
+
index: string;
|
|
599
574
|
/**
|
|
600
|
-
*
|
|
575
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
601
576
|
*/
|
|
602
|
-
|
|
577
|
+
startDate?: string;
|
|
603
578
|
/**
|
|
604
|
-
*
|
|
579
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
605
580
|
*/
|
|
606
|
-
|
|
581
|
+
endDate?: string;
|
|
607
582
|
/**
|
|
608
|
-
*
|
|
583
|
+
* Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
609
584
|
*/
|
|
610
|
-
|
|
585
|
+
tags?: string;
|
|
611
586
|
};
|
|
612
587
|
|
|
613
|
-
type
|
|
588
|
+
type DailyAddToCartRates = {
|
|
614
589
|
/**
|
|
615
|
-
*
|
|
590
|
+
* Add-to-cart rate, calculated as number of tracked searches with at least one add-to-cart event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
616
591
|
*/
|
|
617
|
-
|
|
618
|
-
};
|
|
619
|
-
|
|
620
|
-
type GetTopHitsResponse = TopHitsResponse | TopHitsResponseWithAnalytics | TopHitsResponseWithRevenueAnalytics;
|
|
621
|
-
|
|
622
|
-
type TopSearch = {
|
|
592
|
+
rate: number | null;
|
|
623
593
|
/**
|
|
624
|
-
*
|
|
594
|
+
* Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
|
|
625
595
|
*/
|
|
626
|
-
|
|
596
|
+
trackedSearchCount: number;
|
|
627
597
|
/**
|
|
628
|
-
* Number of
|
|
598
|
+
* Number of add-to-cart events from this search.
|
|
629
599
|
*/
|
|
630
|
-
|
|
600
|
+
addToCartCount: number;
|
|
631
601
|
/**
|
|
632
|
-
*
|
|
602
|
+
* Date in the format YYYY-MM-DD.
|
|
633
603
|
*/
|
|
634
|
-
|
|
604
|
+
date: string;
|
|
635
605
|
};
|
|
636
606
|
|
|
637
|
-
type
|
|
607
|
+
type GetAddToCartRateResponse = {
|
|
638
608
|
/**
|
|
639
|
-
*
|
|
609
|
+
* Add-to-cart rate, calculated as number of tracked searches with at least one add-to-cart event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
640
610
|
*/
|
|
641
|
-
|
|
642
|
-
};
|
|
643
|
-
|
|
644
|
-
type TopSearchWithAnalytics = {
|
|
611
|
+
rate: number | null;
|
|
645
612
|
/**
|
|
646
|
-
*
|
|
613
|
+
* Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
|
|
647
614
|
*/
|
|
648
|
-
|
|
615
|
+
trackedSearchCount: number;
|
|
649
616
|
/**
|
|
650
|
-
* Number of
|
|
617
|
+
* Number of add-to-cart events from this search.
|
|
651
618
|
*/
|
|
652
|
-
|
|
619
|
+
addToCartCount: number;
|
|
653
620
|
/**
|
|
654
|
-
*
|
|
621
|
+
* Daily add-to-cart rates.
|
|
655
622
|
*/
|
|
656
|
-
|
|
623
|
+
dates: DailyAddToCartRates[];
|
|
624
|
+
};
|
|
625
|
+
|
|
626
|
+
type DailyAverageClicks = {
|
|
657
627
|
/**
|
|
658
628
|
* Average position of a clicked search result in the list of search results. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
659
629
|
*/
|
|
660
|
-
|
|
630
|
+
average: number | null;
|
|
661
631
|
/**
|
|
662
|
-
*
|
|
632
|
+
* Number of clicks associated with this search.
|
|
663
633
|
*/
|
|
664
|
-
|
|
634
|
+
clickCount: number;
|
|
665
635
|
/**
|
|
666
|
-
*
|
|
636
|
+
* Date in the format YYYY-MM-DD.
|
|
667
637
|
*/
|
|
668
|
-
|
|
638
|
+
date: string;
|
|
639
|
+
};
|
|
640
|
+
|
|
641
|
+
type GetAverageClickPositionResponse = {
|
|
669
642
|
/**
|
|
670
|
-
*
|
|
643
|
+
* Average position of a clicked search result in the list of search results. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
671
644
|
*/
|
|
672
|
-
|
|
645
|
+
average: number | null;
|
|
673
646
|
/**
|
|
674
647
|
* Number of clicks associated with this search.
|
|
675
648
|
*/
|
|
676
649
|
clickCount: number;
|
|
677
650
|
/**
|
|
678
|
-
*
|
|
679
|
-
*/
|
|
680
|
-
conversionCount: number;
|
|
681
|
-
/**
|
|
682
|
-
* Number of results (hits).
|
|
651
|
+
* Daily average click positions.
|
|
683
652
|
*/
|
|
684
|
-
|
|
653
|
+
dates: DailyAverageClicks[];
|
|
685
654
|
};
|
|
686
655
|
|
|
687
|
-
|
|
656
|
+
/**
|
|
657
|
+
* Click position.
|
|
658
|
+
*/
|
|
659
|
+
type ClickPosition = {
|
|
688
660
|
/**
|
|
689
|
-
*
|
|
661
|
+
* Range of positions in the search results, using the pattern `[start,end]`. For positions 11 and up, click events are summed over the specified range. `-1` indicates the end of the list of search results.
|
|
690
662
|
*/
|
|
691
|
-
|
|
692
|
-
};
|
|
693
|
-
|
|
694
|
-
type TopSearchWithRevenueAnalytics = {
|
|
663
|
+
position?: number[];
|
|
695
664
|
/**
|
|
696
|
-
*
|
|
665
|
+
* Number of times this search has been clicked at that position.
|
|
697
666
|
*/
|
|
698
|
-
|
|
667
|
+
clickCount?: number;
|
|
668
|
+
};
|
|
669
|
+
|
|
670
|
+
type GetClickPositionsResponse = {
|
|
699
671
|
/**
|
|
700
|
-
*
|
|
672
|
+
* List of positions in the search results and clicks associated with this search.
|
|
701
673
|
*/
|
|
702
|
-
|
|
674
|
+
positions: ClickPosition[];
|
|
675
|
+
};
|
|
676
|
+
|
|
677
|
+
type DailyClickThroughRates = {
|
|
703
678
|
/**
|
|
704
679
|
* Click-through rate, calculated as number of tracked searches with at least one click event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
705
680
|
*/
|
|
706
|
-
|
|
681
|
+
rate: number | null;
|
|
707
682
|
/**
|
|
708
|
-
*
|
|
683
|
+
* Number of clicks associated with this search.
|
|
709
684
|
*/
|
|
710
|
-
|
|
685
|
+
clickCount: number;
|
|
711
686
|
/**
|
|
712
|
-
*
|
|
687
|
+
* Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
|
|
713
688
|
*/
|
|
714
|
-
|
|
689
|
+
trackedSearchCount: number;
|
|
715
690
|
/**
|
|
716
|
-
*
|
|
691
|
+
* Date in the format YYYY-MM-DD.
|
|
717
692
|
*/
|
|
718
|
-
|
|
693
|
+
date: string;
|
|
694
|
+
};
|
|
695
|
+
|
|
696
|
+
type GetClickThroughRateResponse = {
|
|
719
697
|
/**
|
|
720
|
-
*
|
|
698
|
+
* Click-through rate, calculated as number of tracked searches with at least one click event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
721
699
|
*/
|
|
722
|
-
|
|
700
|
+
rate: number | null;
|
|
723
701
|
/**
|
|
724
702
|
* Number of clicks associated with this search.
|
|
725
703
|
*/
|
|
726
704
|
clickCount: number;
|
|
727
705
|
/**
|
|
728
|
-
* Number of
|
|
729
|
-
*/
|
|
730
|
-
conversionCount: number;
|
|
731
|
-
/**
|
|
732
|
-
* Number of results (hits).
|
|
706
|
+
* Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
|
|
733
707
|
*/
|
|
734
|
-
|
|
708
|
+
trackedSearchCount: number;
|
|
735
709
|
/**
|
|
736
|
-
*
|
|
710
|
+
* Daily click-through rates.
|
|
737
711
|
*/
|
|
738
|
-
|
|
712
|
+
dates: DailyClickThroughRates[];
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
type DailyConversionRates = {
|
|
739
716
|
/**
|
|
740
|
-
*
|
|
717
|
+
* Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
741
718
|
*/
|
|
742
|
-
|
|
719
|
+
rate: number | null;
|
|
743
720
|
/**
|
|
744
|
-
* Number of
|
|
721
|
+
* Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
|
|
745
722
|
*/
|
|
746
|
-
|
|
723
|
+
trackedSearchCount: number;
|
|
747
724
|
/**
|
|
748
|
-
*
|
|
725
|
+
* Number of conversions from this search.
|
|
749
726
|
*/
|
|
750
|
-
|
|
727
|
+
conversionCount: number;
|
|
751
728
|
/**
|
|
752
|
-
*
|
|
729
|
+
* Date in the format YYYY-MM-DD.
|
|
753
730
|
*/
|
|
754
|
-
|
|
731
|
+
date: string;
|
|
755
732
|
};
|
|
756
733
|
|
|
757
|
-
type
|
|
734
|
+
type GetConversionRateResponse = {
|
|
758
735
|
/**
|
|
759
|
-
*
|
|
736
|
+
* Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
760
737
|
*/
|
|
761
|
-
|
|
762
|
-
};
|
|
763
|
-
|
|
764
|
-
type GetTopSearchesResponse = TopSearchesResponse | TopSearchesResponseWithAnalytics | TopSearchesResponseWithRevenueAnalytics;
|
|
765
|
-
|
|
766
|
-
type GetUsersCountResponse = {
|
|
738
|
+
rate: number | null;
|
|
767
739
|
/**
|
|
768
|
-
* Number of
|
|
740
|
+
* Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
|
|
769
741
|
*/
|
|
770
|
-
|
|
742
|
+
trackedSearchCount: number;
|
|
771
743
|
/**
|
|
772
|
-
*
|
|
744
|
+
* Number of conversions from this search.
|
|
773
745
|
*/
|
|
774
|
-
|
|
746
|
+
conversionCount: number;
|
|
747
|
+
/**
|
|
748
|
+
* Daily conversion rates.
|
|
749
|
+
*/
|
|
750
|
+
dates: DailyConversionRates[];
|
|
775
751
|
};
|
|
776
752
|
|
|
777
|
-
|
|
778
|
-
* Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
|
|
779
|
-
*/
|
|
780
|
-
type OrderBy = 'averageClickPosition' | 'clickThroughRate' | 'conversionRate' | 'searchCount';
|
|
781
|
-
|
|
782
|
-
/**
|
|
783
|
-
* Properties for the `customDelete` method.
|
|
784
|
-
*/
|
|
785
|
-
type CustomDeleteProps = {
|
|
753
|
+
type DailyNoClickRates = {
|
|
786
754
|
/**
|
|
787
|
-
*
|
|
755
|
+
* No click rate, calculated as number of tracked searches without any click divided by the number of tracked searches.
|
|
788
756
|
*/
|
|
789
|
-
|
|
757
|
+
rate: number;
|
|
790
758
|
/**
|
|
791
|
-
*
|
|
759
|
+
* Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
|
|
792
760
|
*/
|
|
793
|
-
|
|
794
|
-
};
|
|
795
|
-
/**
|
|
796
|
-
* Properties for the `customGet` method.
|
|
797
|
-
*/
|
|
798
|
-
type CustomGetProps = {
|
|
761
|
+
count: number;
|
|
799
762
|
/**
|
|
800
|
-
*
|
|
763
|
+
* Number of times this search was returned as a result without any click.
|
|
801
764
|
*/
|
|
802
|
-
|
|
765
|
+
noClickCount: number;
|
|
803
766
|
/**
|
|
804
|
-
*
|
|
767
|
+
* Date in the format YYYY-MM-DD.
|
|
805
768
|
*/
|
|
806
|
-
|
|
769
|
+
date: string;
|
|
807
770
|
};
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
*/
|
|
811
|
-
type CustomPostProps = {
|
|
771
|
+
|
|
772
|
+
type GetNoClickRateResponse = {
|
|
812
773
|
/**
|
|
813
|
-
*
|
|
774
|
+
* No click rate, calculated as number of tracked searches without any click divided by the number of tracked searches.
|
|
814
775
|
*/
|
|
815
|
-
|
|
776
|
+
rate: number;
|
|
816
777
|
/**
|
|
817
|
-
*
|
|
778
|
+
* Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
|
|
818
779
|
*/
|
|
819
|
-
|
|
780
|
+
count: number;
|
|
820
781
|
/**
|
|
821
|
-
*
|
|
782
|
+
* Number of times this search was returned as a result without any click.
|
|
822
783
|
*/
|
|
823
|
-
|
|
784
|
+
noClickCount: number;
|
|
785
|
+
/**
|
|
786
|
+
* Daily no click rates.
|
|
787
|
+
*/
|
|
788
|
+
dates: DailyNoClickRates[];
|
|
824
789
|
};
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
*/
|
|
828
|
-
type CustomPutProps = {
|
|
790
|
+
|
|
791
|
+
type DailyNoResultsRates = {
|
|
829
792
|
/**
|
|
830
|
-
*
|
|
793
|
+
* Date in the format YYYY-MM-DD.
|
|
831
794
|
*/
|
|
832
|
-
|
|
795
|
+
date: string;
|
|
833
796
|
/**
|
|
834
|
-
*
|
|
797
|
+
* Number of searches without any results.
|
|
835
798
|
*/
|
|
836
|
-
|
|
799
|
+
noResultCount: number;
|
|
837
800
|
/**
|
|
838
|
-
*
|
|
801
|
+
* Number of searches.
|
|
839
802
|
*/
|
|
840
|
-
|
|
803
|
+
count: number;
|
|
804
|
+
/**
|
|
805
|
+
* No results rate, calculated as number of searches with zero results divided by the total number of searches.
|
|
806
|
+
*/
|
|
807
|
+
rate: number;
|
|
841
808
|
};
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
*/
|
|
845
|
-
type GetAddToCartRateProps = {
|
|
809
|
+
|
|
810
|
+
type GetNoResultsRateResponse = {
|
|
846
811
|
/**
|
|
847
|
-
*
|
|
812
|
+
* No results rate, calculated as number of searches with zero results divided by the total number of searches.
|
|
848
813
|
*/
|
|
849
|
-
|
|
814
|
+
rate: number;
|
|
850
815
|
/**
|
|
851
|
-
*
|
|
816
|
+
* Number of searches.
|
|
852
817
|
*/
|
|
853
|
-
|
|
818
|
+
count: number;
|
|
854
819
|
/**
|
|
855
|
-
*
|
|
820
|
+
* Number of searches without any results.
|
|
856
821
|
*/
|
|
857
|
-
|
|
822
|
+
noResultCount: number;
|
|
858
823
|
/**
|
|
859
|
-
*
|
|
824
|
+
* Daily no results rates.
|
|
860
825
|
*/
|
|
861
|
-
|
|
826
|
+
dates: DailyNoResultsRates[];
|
|
862
827
|
};
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
*/
|
|
866
|
-
type GetAverageClickPositionProps = {
|
|
828
|
+
|
|
829
|
+
type DailyPurchaseRates = {
|
|
867
830
|
/**
|
|
868
|
-
*
|
|
831
|
+
* Purchase rate, calculated as number of tracked searches with at least one purchase event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
869
832
|
*/
|
|
870
|
-
|
|
833
|
+
rate: number | null;
|
|
871
834
|
/**
|
|
872
|
-
*
|
|
835
|
+
* Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
|
|
873
836
|
*/
|
|
874
|
-
|
|
837
|
+
trackedSearchCount: number;
|
|
875
838
|
/**
|
|
876
|
-
*
|
|
839
|
+
* Number of purchase events from this search.
|
|
877
840
|
*/
|
|
878
|
-
|
|
841
|
+
purchaseCount: number;
|
|
879
842
|
/**
|
|
880
|
-
*
|
|
843
|
+
* Date in the format YYYY-MM-DD.
|
|
881
844
|
*/
|
|
882
|
-
|
|
845
|
+
date: string;
|
|
883
846
|
};
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
*/
|
|
887
|
-
type GetClickPositionsProps = {
|
|
847
|
+
|
|
848
|
+
type GetPurchaseRateResponse = {
|
|
888
849
|
/**
|
|
889
|
-
*
|
|
850
|
+
* Purchase rate, calculated as number of tracked searches with at least one purchase event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
890
851
|
*/
|
|
891
|
-
|
|
852
|
+
rate: number | null;
|
|
892
853
|
/**
|
|
893
|
-
*
|
|
854
|
+
* Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
|
|
894
855
|
*/
|
|
895
|
-
|
|
856
|
+
trackedSearchCount: number;
|
|
896
857
|
/**
|
|
897
|
-
*
|
|
858
|
+
* Number of purchase events from this search.
|
|
898
859
|
*/
|
|
899
|
-
|
|
860
|
+
purchaseCount: number;
|
|
900
861
|
/**
|
|
901
|
-
*
|
|
862
|
+
* Daily purchase rates.
|
|
902
863
|
*/
|
|
903
|
-
|
|
864
|
+
dates: DailyPurchaseRates[];
|
|
904
865
|
};
|
|
866
|
+
|
|
905
867
|
/**
|
|
906
|
-
*
|
|
868
|
+
* Currency code.
|
|
907
869
|
*/
|
|
908
|
-
type
|
|
870
|
+
type CurrencyCode = {
|
|
909
871
|
/**
|
|
910
|
-
*
|
|
872
|
+
* Currency code.
|
|
911
873
|
*/
|
|
912
|
-
|
|
874
|
+
currency?: string;
|
|
913
875
|
/**
|
|
914
|
-
*
|
|
876
|
+
* Revenue associated with this search in this currency.
|
|
915
877
|
*/
|
|
916
|
-
|
|
878
|
+
revenue?: number;
|
|
879
|
+
};
|
|
880
|
+
|
|
881
|
+
type DailyRevenue = {
|
|
917
882
|
/**
|
|
918
|
-
*
|
|
883
|
+
* Revenue associated with this search, broken-down by currencies.
|
|
919
884
|
*/
|
|
920
|
-
|
|
885
|
+
currencies: Record<string, CurrencyCode>;
|
|
921
886
|
/**
|
|
922
|
-
*
|
|
887
|
+
* Date in the format YYYY-MM-DD.
|
|
923
888
|
*/
|
|
924
|
-
|
|
889
|
+
date: string;
|
|
925
890
|
};
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
*/
|
|
929
|
-
type GetConversionRateProps = {
|
|
930
|
-
/**
|
|
931
|
-
* Index name.
|
|
932
|
-
*/
|
|
933
|
-
index: string;
|
|
934
|
-
/**
|
|
935
|
-
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
936
|
-
*/
|
|
937
|
-
startDate?: string;
|
|
891
|
+
|
|
892
|
+
type GetRevenue = {
|
|
938
893
|
/**
|
|
939
|
-
*
|
|
894
|
+
* Revenue associated with this search, broken-down by currencies.
|
|
940
895
|
*/
|
|
941
|
-
|
|
896
|
+
currencies: Record<string, CurrencyCode>;
|
|
942
897
|
/**
|
|
943
|
-
*
|
|
898
|
+
* Daily revenue.
|
|
944
899
|
*/
|
|
945
|
-
|
|
900
|
+
dates: DailyRevenue[];
|
|
946
901
|
};
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
*/
|
|
950
|
-
type GetNoClickRateProps = {
|
|
902
|
+
|
|
903
|
+
type DailySearches = {
|
|
951
904
|
/**
|
|
952
|
-
*
|
|
905
|
+
* Date in the format YYYY-MM-DD.
|
|
953
906
|
*/
|
|
954
|
-
|
|
907
|
+
date: string;
|
|
955
908
|
/**
|
|
956
|
-
*
|
|
909
|
+
* Number of occurrences.
|
|
957
910
|
*/
|
|
958
|
-
|
|
911
|
+
count: number;
|
|
912
|
+
};
|
|
913
|
+
|
|
914
|
+
type GetSearchesCountResponse = {
|
|
959
915
|
/**
|
|
960
|
-
*
|
|
916
|
+
* Number of occurrences.
|
|
961
917
|
*/
|
|
962
|
-
|
|
918
|
+
count: number;
|
|
963
919
|
/**
|
|
964
|
-
*
|
|
920
|
+
* Daily number of searches.
|
|
965
921
|
*/
|
|
966
|
-
|
|
922
|
+
dates: DailySearches[];
|
|
967
923
|
};
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
*/
|
|
971
|
-
type GetNoResultsRateProps = {
|
|
972
|
-
/**
|
|
973
|
-
* Index name.
|
|
974
|
-
*/
|
|
975
|
-
index: string;
|
|
924
|
+
|
|
925
|
+
type DailySearchesNoClicks = {
|
|
976
926
|
/**
|
|
977
|
-
*
|
|
927
|
+
* Search query.
|
|
978
928
|
*/
|
|
979
|
-
|
|
929
|
+
search: string;
|
|
980
930
|
/**
|
|
981
|
-
*
|
|
931
|
+
* Number of tracked searches.
|
|
982
932
|
*/
|
|
983
|
-
|
|
933
|
+
count: number;
|
|
984
934
|
/**
|
|
985
|
-
*
|
|
935
|
+
* Number of results (hits).
|
|
986
936
|
*/
|
|
987
|
-
|
|
937
|
+
nbHits: number;
|
|
988
938
|
};
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
*/
|
|
992
|
-
type GetPurchaseRateProps = {
|
|
939
|
+
|
|
940
|
+
type GetSearchesNoClicksResponse = {
|
|
993
941
|
/**
|
|
994
|
-
*
|
|
942
|
+
* Searches without any clicks.
|
|
995
943
|
*/
|
|
996
|
-
|
|
944
|
+
searches: DailySearchesNoClicks[];
|
|
945
|
+
};
|
|
946
|
+
|
|
947
|
+
type DailySearchesNoResults = {
|
|
997
948
|
/**
|
|
998
|
-
*
|
|
949
|
+
* Search query.
|
|
999
950
|
*/
|
|
1000
|
-
|
|
951
|
+
search: string;
|
|
1001
952
|
/**
|
|
1002
|
-
*
|
|
953
|
+
* Number of occurrences.
|
|
1003
954
|
*/
|
|
1004
|
-
|
|
955
|
+
count: number;
|
|
1005
956
|
/**
|
|
1006
|
-
*
|
|
957
|
+
* Number of searches for this term with applied filters.
|
|
1007
958
|
*/
|
|
1008
|
-
|
|
959
|
+
withFilterCount: number;
|
|
1009
960
|
};
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
*/
|
|
1013
|
-
type GetRevenueProps = {
|
|
961
|
+
|
|
962
|
+
type GetSearchesNoResultsResponse = {
|
|
1014
963
|
/**
|
|
1015
|
-
*
|
|
964
|
+
* Searches without results.
|
|
1016
965
|
*/
|
|
1017
|
-
|
|
966
|
+
searches: DailySearchesNoResults[];
|
|
967
|
+
};
|
|
968
|
+
|
|
969
|
+
type GetStatusResponse = {
|
|
1018
970
|
/**
|
|
1019
|
-
*
|
|
971
|
+
* Date and time when the object was updated, in RFC 3339 format.
|
|
1020
972
|
*/
|
|
1021
|
-
|
|
973
|
+
updatedAt: string | null;
|
|
974
|
+
};
|
|
975
|
+
|
|
976
|
+
type TopCountry = {
|
|
1022
977
|
/**
|
|
1023
|
-
*
|
|
978
|
+
* Country code.
|
|
1024
979
|
*/
|
|
1025
|
-
|
|
980
|
+
country: string;
|
|
1026
981
|
/**
|
|
1027
|
-
*
|
|
982
|
+
* Number of occurrences.
|
|
1028
983
|
*/
|
|
1029
|
-
|
|
984
|
+
count: number;
|
|
1030
985
|
};
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
*/
|
|
1034
|
-
type GetSearchesCountProps = {
|
|
986
|
+
|
|
987
|
+
type GetTopCountriesResponse = {
|
|
1035
988
|
/**
|
|
1036
|
-
*
|
|
989
|
+
* Countries and number of searches.
|
|
1037
990
|
*/
|
|
1038
|
-
|
|
991
|
+
countries: TopCountry[];
|
|
992
|
+
};
|
|
993
|
+
|
|
994
|
+
type GetTopFilterAttribute = {
|
|
1039
995
|
/**
|
|
1040
|
-
*
|
|
996
|
+
* Attribute name.
|
|
1041
997
|
*/
|
|
1042
|
-
|
|
998
|
+
attribute: string;
|
|
1043
999
|
/**
|
|
1044
|
-
*
|
|
1000
|
+
* Number of occurrences.
|
|
1045
1001
|
*/
|
|
1046
|
-
|
|
1002
|
+
count: number;
|
|
1003
|
+
};
|
|
1004
|
+
|
|
1005
|
+
type GetTopFilterAttributesResponse = {
|
|
1047
1006
|
/**
|
|
1048
|
-
*
|
|
1007
|
+
* Most frequent filters.
|
|
1049
1008
|
*/
|
|
1050
|
-
|
|
1009
|
+
attributes: GetTopFilterAttribute[];
|
|
1051
1010
|
};
|
|
1011
|
+
|
|
1052
1012
|
/**
|
|
1053
|
-
*
|
|
1013
|
+
* Character that characterizes how the filter is applied. For example, for a facet filter `facet:value`, `:` is the operator. For a numeric filter `count>50`, `>` is the operator.
|
|
1054
1014
|
*/
|
|
1055
|
-
type
|
|
1015
|
+
type Operator = ':' | '!=' | '<' | '<=' | '=' | '>' | '>=';
|
|
1016
|
+
|
|
1017
|
+
type GetTopFilterForAttribute = {
|
|
1056
1018
|
/**
|
|
1057
|
-
*
|
|
1019
|
+
* Attribute name.
|
|
1058
1020
|
*/
|
|
1059
|
-
|
|
1021
|
+
attribute: string;
|
|
1022
|
+
operator: Operator;
|
|
1060
1023
|
/**
|
|
1061
|
-
*
|
|
1024
|
+
* Attribute value.
|
|
1062
1025
|
*/
|
|
1063
|
-
|
|
1026
|
+
value: string;
|
|
1064
1027
|
/**
|
|
1065
|
-
*
|
|
1028
|
+
* Number of occurrences.
|
|
1066
1029
|
*/
|
|
1067
|
-
|
|
1030
|
+
count: number;
|
|
1031
|
+
};
|
|
1032
|
+
|
|
1033
|
+
type GetTopFilterForAttributeResponse = {
|
|
1068
1034
|
/**
|
|
1069
|
-
*
|
|
1035
|
+
* Filter values for an attribute.
|
|
1070
1036
|
*/
|
|
1071
|
-
|
|
1037
|
+
values: GetTopFilterForAttribute[];
|
|
1038
|
+
};
|
|
1039
|
+
|
|
1040
|
+
type GetTopFiltersNoResultsValue = {
|
|
1072
1041
|
/**
|
|
1073
|
-
*
|
|
1042
|
+
* Attribute name.
|
|
1074
1043
|
*/
|
|
1075
|
-
|
|
1044
|
+
attribute: string;
|
|
1045
|
+
operator: Operator;
|
|
1076
1046
|
/**
|
|
1077
|
-
*
|
|
1047
|
+
* Attribute value.
|
|
1078
1048
|
*/
|
|
1079
|
-
|
|
1049
|
+
value: string;
|
|
1080
1050
|
};
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
*/
|
|
1084
|
-
type GetSearchesNoResultsProps = {
|
|
1051
|
+
|
|
1052
|
+
type GetTopFiltersNoResultsValues = {
|
|
1085
1053
|
/**
|
|
1086
|
-
*
|
|
1054
|
+
* Number of occurrences.
|
|
1087
1055
|
*/
|
|
1088
|
-
|
|
1056
|
+
count: number;
|
|
1089
1057
|
/**
|
|
1090
|
-
*
|
|
1058
|
+
* Filters with no results.
|
|
1091
1059
|
*/
|
|
1092
|
-
|
|
1060
|
+
values: GetTopFiltersNoResultsValue[];
|
|
1061
|
+
};
|
|
1062
|
+
|
|
1063
|
+
type GetTopFiltersNoResultsResponse = {
|
|
1093
1064
|
/**
|
|
1094
|
-
*
|
|
1065
|
+
* Filters for searches without any results. If null, the search term specified with the `search` parameter is not a search without results, or the `search` parameter is absent from the request.
|
|
1095
1066
|
*/
|
|
1096
|
-
|
|
1067
|
+
values: GetTopFiltersNoResultsValues[] | null;
|
|
1068
|
+
};
|
|
1069
|
+
|
|
1070
|
+
type TopHit = {
|
|
1097
1071
|
/**
|
|
1098
|
-
*
|
|
1072
|
+
* Object ID of a record that\'s returned as a search result.
|
|
1099
1073
|
*/
|
|
1100
|
-
|
|
1074
|
+
hit: string;
|
|
1101
1075
|
/**
|
|
1102
|
-
*
|
|
1076
|
+
* Number of occurrences.
|
|
1103
1077
|
*/
|
|
1104
|
-
|
|
1078
|
+
count: number;
|
|
1079
|
+
};
|
|
1080
|
+
|
|
1081
|
+
type TopHitsResponse = {
|
|
1105
1082
|
/**
|
|
1106
|
-
*
|
|
1083
|
+
* Most frequent search results.
|
|
1107
1084
|
*/
|
|
1108
|
-
|
|
1085
|
+
hits: TopHit[];
|
|
1109
1086
|
};
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
*/
|
|
1113
|
-
type GetStatusProps = {
|
|
1087
|
+
|
|
1088
|
+
type TopHitWithAnalytics = {
|
|
1114
1089
|
/**
|
|
1115
|
-
*
|
|
1090
|
+
* Object ID of a record that\'s returned as a search result.
|
|
1116
1091
|
*/
|
|
1117
|
-
|
|
1118
|
-
};
|
|
1119
|
-
/**
|
|
1120
|
-
* Properties for the `getTopCountries` method.
|
|
1121
|
-
*/
|
|
1122
|
-
type GetTopCountriesProps = {
|
|
1092
|
+
hit: string;
|
|
1123
1093
|
/**
|
|
1124
|
-
*
|
|
1094
|
+
* Number of occurrences.
|
|
1125
1095
|
*/
|
|
1126
|
-
|
|
1096
|
+
count: number;
|
|
1127
1097
|
/**
|
|
1128
|
-
*
|
|
1098
|
+
* Click-through rate, calculated as number of tracked searches with at least one click event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
1129
1099
|
*/
|
|
1130
|
-
|
|
1100
|
+
clickThroughRate: number | null;
|
|
1131
1101
|
/**
|
|
1132
|
-
*
|
|
1102
|
+
* Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
1133
1103
|
*/
|
|
1134
|
-
|
|
1104
|
+
conversionRate: number | null;
|
|
1135
1105
|
/**
|
|
1136
|
-
* Number of
|
|
1106
|
+
* Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
|
|
1137
1107
|
*/
|
|
1138
|
-
|
|
1108
|
+
trackedHitCount: number;
|
|
1139
1109
|
/**
|
|
1140
|
-
*
|
|
1110
|
+
* Number of clicks associated with this search.
|
|
1141
1111
|
*/
|
|
1142
|
-
|
|
1112
|
+
clickCount: number;
|
|
1143
1113
|
/**
|
|
1144
|
-
*
|
|
1114
|
+
* Number of conversions from this search.
|
|
1145
1115
|
*/
|
|
1146
|
-
|
|
1116
|
+
conversionCount: number;
|
|
1147
1117
|
};
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
*/
|
|
1151
|
-
type GetTopFilterAttributesProps = {
|
|
1118
|
+
|
|
1119
|
+
type TopHitsResponseWithAnalytics = {
|
|
1152
1120
|
/**
|
|
1153
|
-
*
|
|
1121
|
+
* Most frequent search results with click and conversion metrics.
|
|
1154
1122
|
*/
|
|
1155
|
-
|
|
1123
|
+
hits: TopHitWithAnalytics[];
|
|
1124
|
+
};
|
|
1125
|
+
|
|
1126
|
+
type TopHitWithRevenueAnalytics = {
|
|
1127
|
+
/**
|
|
1128
|
+
* Object ID of a record that\'s returned as a search result.
|
|
1129
|
+
*/
|
|
1130
|
+
hit: string;
|
|
1131
|
+
/**
|
|
1132
|
+
* Number of occurrences.
|
|
1133
|
+
*/
|
|
1134
|
+
count: number;
|
|
1156
1135
|
/**
|
|
1157
|
-
*
|
|
1136
|
+
* Click-through rate, calculated as number of tracked searches with at least one click event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
1158
1137
|
*/
|
|
1159
|
-
|
|
1138
|
+
clickThroughRate: number | null;
|
|
1160
1139
|
/**
|
|
1161
|
-
*
|
|
1140
|
+
* Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
1162
1141
|
*/
|
|
1163
|
-
|
|
1142
|
+
conversionRate: number | null;
|
|
1164
1143
|
/**
|
|
1165
|
-
*
|
|
1144
|
+
* Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
|
|
1166
1145
|
*/
|
|
1167
|
-
|
|
1146
|
+
trackedHitCount: number;
|
|
1168
1147
|
/**
|
|
1169
|
-
* Number of
|
|
1148
|
+
* Number of clicks associated with this search.
|
|
1170
1149
|
*/
|
|
1171
|
-
|
|
1150
|
+
clickCount: number;
|
|
1172
1151
|
/**
|
|
1173
|
-
*
|
|
1152
|
+
* Number of conversions from this search.
|
|
1174
1153
|
*/
|
|
1175
|
-
|
|
1154
|
+
conversionCount: number;
|
|
1176
1155
|
/**
|
|
1177
|
-
*
|
|
1156
|
+
* Add-to-cart rate, calculated as number of tracked searches with at least one add-to-cart event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
1178
1157
|
*/
|
|
1179
|
-
|
|
1180
|
-
};
|
|
1181
|
-
/**
|
|
1182
|
-
* Properties for the `getTopFilterForAttribute` method.
|
|
1183
|
-
*/
|
|
1184
|
-
type GetTopFilterForAttributeProps = {
|
|
1158
|
+
addToCartRate: number | null;
|
|
1185
1159
|
/**
|
|
1186
|
-
*
|
|
1160
|
+
* Number of add-to-cart events from this search.
|
|
1187
1161
|
*/
|
|
1188
|
-
|
|
1162
|
+
addToCartCount: number;
|
|
1189
1163
|
/**
|
|
1190
|
-
*
|
|
1164
|
+
* Purchase rate, calculated as number of tracked searches with at least one purchase event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
1191
1165
|
*/
|
|
1192
|
-
|
|
1166
|
+
purchaseRate: number | null;
|
|
1193
1167
|
/**
|
|
1194
|
-
*
|
|
1168
|
+
* Number of purchase events from this search.
|
|
1195
1169
|
*/
|
|
1196
|
-
|
|
1170
|
+
purchaseCount: number;
|
|
1197
1171
|
/**
|
|
1198
|
-
*
|
|
1172
|
+
* Revenue associated with this search, broken-down by currencies.
|
|
1199
1173
|
*/
|
|
1200
|
-
|
|
1174
|
+
currencies: Record<string, CurrencyCode>;
|
|
1175
|
+
};
|
|
1176
|
+
|
|
1177
|
+
type TopHitsResponseWithRevenueAnalytics = {
|
|
1201
1178
|
/**
|
|
1202
|
-
*
|
|
1179
|
+
* Most frequent search results with click, conversion, and revenue metrics.
|
|
1203
1180
|
*/
|
|
1204
|
-
|
|
1181
|
+
hits: TopHitWithRevenueAnalytics[];
|
|
1182
|
+
};
|
|
1183
|
+
|
|
1184
|
+
type GetTopHitsResponse = TopHitsResponse | TopHitsResponseWithAnalytics | TopHitsResponseWithRevenueAnalytics;
|
|
1185
|
+
|
|
1186
|
+
type TopSearch = {
|
|
1205
1187
|
/**
|
|
1206
|
-
*
|
|
1188
|
+
* Search query.
|
|
1207
1189
|
*/
|
|
1208
|
-
|
|
1190
|
+
search: string;
|
|
1209
1191
|
/**
|
|
1210
|
-
*
|
|
1192
|
+
* Number of searches.
|
|
1211
1193
|
*/
|
|
1212
|
-
|
|
1194
|
+
count: number;
|
|
1213
1195
|
/**
|
|
1214
|
-
*
|
|
1196
|
+
* Number of results (hits).
|
|
1215
1197
|
*/
|
|
1216
|
-
|
|
1198
|
+
nbHits: number;
|
|
1217
1199
|
};
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
*/
|
|
1221
|
-
type GetTopFiltersNoResultsProps = {
|
|
1200
|
+
|
|
1201
|
+
type TopSearchesResponse = {
|
|
1222
1202
|
/**
|
|
1223
|
-
*
|
|
1203
|
+
* Most popular searches and their number of search results (hits).
|
|
1224
1204
|
*/
|
|
1225
|
-
|
|
1205
|
+
searches: TopSearch[];
|
|
1206
|
+
};
|
|
1207
|
+
|
|
1208
|
+
type TopSearchWithAnalytics = {
|
|
1226
1209
|
/**
|
|
1227
1210
|
* Search query.
|
|
1228
1211
|
*/
|
|
1229
|
-
search
|
|
1212
|
+
search: string;
|
|
1230
1213
|
/**
|
|
1231
|
-
*
|
|
1214
|
+
* Number of searches.
|
|
1232
1215
|
*/
|
|
1233
|
-
|
|
1216
|
+
count: number;
|
|
1234
1217
|
/**
|
|
1235
|
-
*
|
|
1218
|
+
* Click-through rate, calculated as number of tracked searches with at least one click event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
1236
1219
|
*/
|
|
1237
|
-
|
|
1220
|
+
clickThroughRate: number | null;
|
|
1238
1221
|
/**
|
|
1239
|
-
*
|
|
1222
|
+
* Average position of a clicked search result in the list of search results. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
1240
1223
|
*/
|
|
1241
|
-
|
|
1224
|
+
averageClickPosition: number | null;
|
|
1242
1225
|
/**
|
|
1243
|
-
*
|
|
1226
|
+
* List of positions in the search results and clicks associated with this search.
|
|
1244
1227
|
*/
|
|
1245
|
-
|
|
1228
|
+
clickPositions: ClickPosition[];
|
|
1246
1229
|
/**
|
|
1247
|
-
*
|
|
1230
|
+
* Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
1248
1231
|
*/
|
|
1249
|
-
|
|
1250
|
-
};
|
|
1251
|
-
/**
|
|
1252
|
-
* Properties for the `getTopHits` method.
|
|
1253
|
-
*/
|
|
1254
|
-
type GetTopHitsProps = {
|
|
1232
|
+
conversionRate: number | null;
|
|
1255
1233
|
/**
|
|
1256
|
-
*
|
|
1234
|
+
* Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
|
|
1257
1235
|
*/
|
|
1258
|
-
|
|
1236
|
+
trackedSearchCount: number;
|
|
1259
1237
|
/**
|
|
1260
|
-
*
|
|
1238
|
+
* Number of clicks associated with this search.
|
|
1261
1239
|
*/
|
|
1262
|
-
|
|
1240
|
+
clickCount: number;
|
|
1263
1241
|
/**
|
|
1264
|
-
*
|
|
1242
|
+
* Number of conversions from this search.
|
|
1265
1243
|
*/
|
|
1266
|
-
|
|
1244
|
+
conversionCount: number;
|
|
1267
1245
|
/**
|
|
1268
|
-
*
|
|
1246
|
+
* Number of results (hits).
|
|
1269
1247
|
*/
|
|
1270
|
-
|
|
1248
|
+
nbHits: number;
|
|
1249
|
+
};
|
|
1250
|
+
|
|
1251
|
+
type TopSearchesResponseWithAnalytics = {
|
|
1271
1252
|
/**
|
|
1272
|
-
*
|
|
1253
|
+
* Most popular searches and their associated click and conversion metrics.
|
|
1273
1254
|
*/
|
|
1274
|
-
|
|
1255
|
+
searches: TopSearchWithAnalytics[];
|
|
1256
|
+
};
|
|
1257
|
+
|
|
1258
|
+
type TopSearchWithRevenueAnalytics = {
|
|
1275
1259
|
/**
|
|
1276
|
-
*
|
|
1260
|
+
* Search query.
|
|
1277
1261
|
*/
|
|
1278
|
-
|
|
1262
|
+
search: string;
|
|
1279
1263
|
/**
|
|
1280
|
-
* Number of
|
|
1264
|
+
* Number of searches.
|
|
1281
1265
|
*/
|
|
1282
|
-
|
|
1266
|
+
count: number;
|
|
1283
1267
|
/**
|
|
1284
|
-
*
|
|
1268
|
+
* Click-through rate, calculated as number of tracked searches with at least one click event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
1285
1269
|
*/
|
|
1286
|
-
|
|
1270
|
+
clickThroughRate: number | null;
|
|
1287
1271
|
/**
|
|
1288
|
-
*
|
|
1272
|
+
* Average position of a clicked search result in the list of search results. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
1289
1273
|
*/
|
|
1290
|
-
|
|
1291
|
-
};
|
|
1292
|
-
/**
|
|
1293
|
-
* Properties for the `getTopSearches` method.
|
|
1294
|
-
*/
|
|
1295
|
-
type GetTopSearchesProps = {
|
|
1274
|
+
averageClickPosition: number | null;
|
|
1296
1275
|
/**
|
|
1297
|
-
*
|
|
1276
|
+
* List of positions in the search results and clicks associated with this search.
|
|
1298
1277
|
*/
|
|
1299
|
-
|
|
1278
|
+
clickPositions: ClickPosition[];
|
|
1300
1279
|
/**
|
|
1301
|
-
*
|
|
1280
|
+
* Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
1302
1281
|
*/
|
|
1303
|
-
|
|
1282
|
+
conversionRate: number | null;
|
|
1304
1283
|
/**
|
|
1305
|
-
*
|
|
1284
|
+
* Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
|
|
1306
1285
|
*/
|
|
1307
|
-
|
|
1286
|
+
trackedSearchCount: number;
|
|
1308
1287
|
/**
|
|
1309
|
-
*
|
|
1288
|
+
* Number of clicks associated with this search.
|
|
1310
1289
|
*/
|
|
1311
|
-
|
|
1290
|
+
clickCount: number;
|
|
1312
1291
|
/**
|
|
1313
|
-
*
|
|
1292
|
+
* Number of conversions from this search.
|
|
1314
1293
|
*/
|
|
1315
|
-
|
|
1294
|
+
conversionCount: number;
|
|
1316
1295
|
/**
|
|
1317
|
-
*
|
|
1296
|
+
* Number of results (hits).
|
|
1318
1297
|
*/
|
|
1319
|
-
|
|
1298
|
+
nbHits: number;
|
|
1320
1299
|
/**
|
|
1321
|
-
*
|
|
1300
|
+
* Revenue associated with this search, broken-down by currencies.
|
|
1322
1301
|
*/
|
|
1323
|
-
|
|
1302
|
+
currencies: Record<string, CurrencyCode>;
|
|
1324
1303
|
/**
|
|
1325
|
-
*
|
|
1304
|
+
* Add-to-cart rate, calculated as number of tracked searches with at least one add-to-cart event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
1326
1305
|
*/
|
|
1327
|
-
|
|
1306
|
+
addToCartRate: number | null;
|
|
1328
1307
|
/**
|
|
1329
|
-
*
|
|
1308
|
+
* Number of add-to-cart events from this search.
|
|
1330
1309
|
*/
|
|
1331
|
-
|
|
1310
|
+
addToCartCount: number;
|
|
1332
1311
|
/**
|
|
1333
|
-
*
|
|
1312
|
+
* Purchase rate, calculated as number of tracked searches with at least one purchase event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
1334
1313
|
*/
|
|
1335
|
-
|
|
1314
|
+
purchaseRate: number | null;
|
|
1315
|
+
/**
|
|
1316
|
+
* Number of purchase events from this search.
|
|
1317
|
+
*/
|
|
1318
|
+
purchaseCount: number;
|
|
1336
1319
|
};
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
*/
|
|
1340
|
-
type GetUsersCountProps = {
|
|
1320
|
+
|
|
1321
|
+
type TopSearchesResponseWithRevenueAnalytics = {
|
|
1341
1322
|
/**
|
|
1342
|
-
*
|
|
1323
|
+
* Most popular searches, including their click and revenue metrics.
|
|
1343
1324
|
*/
|
|
1344
|
-
|
|
1325
|
+
searches: TopSearchWithRevenueAnalytics[];
|
|
1326
|
+
};
|
|
1327
|
+
|
|
1328
|
+
type GetTopSearchesResponse = TopSearchesResponse | TopSearchesResponseWithAnalytics | TopSearchesResponseWithRevenueAnalytics;
|
|
1329
|
+
|
|
1330
|
+
type DailyUsers = {
|
|
1345
1331
|
/**
|
|
1346
|
-
*
|
|
1332
|
+
* Date in the format YYYY-MM-DD.
|
|
1347
1333
|
*/
|
|
1348
|
-
|
|
1334
|
+
date: string;
|
|
1349
1335
|
/**
|
|
1350
|
-
*
|
|
1336
|
+
* Number of unique users.
|
|
1351
1337
|
*/
|
|
1352
|
-
|
|
1338
|
+
count: number;
|
|
1339
|
+
};
|
|
1340
|
+
|
|
1341
|
+
type GetUsersCountResponse = {
|
|
1353
1342
|
/**
|
|
1354
|
-
*
|
|
1343
|
+
* Number of unique users.
|
|
1355
1344
|
*/
|
|
1356
|
-
|
|
1345
|
+
count: number;
|
|
1346
|
+
/**
|
|
1347
|
+
* Daily number of unique users.
|
|
1348
|
+
*/
|
|
1349
|
+
dates: DailyUsers[];
|
|
1357
1350
|
};
|
|
1358
1351
|
|
|
1359
|
-
declare const apiClientVersion = "5.
|
|
1352
|
+
declare const apiClientVersion = "5.3.1";
|
|
1360
1353
|
declare const REGIONS: readonly ["de", "us"];
|
|
1361
1354
|
type Region = (typeof REGIONS)[number];
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
*/
|
|
1366
|
-
type AnalyticsClient = ReturnType<typeof analyticsClient>;
|
|
1367
|
-
declare function analyticsClient(appId: string, apiKey: string, region?: Region, options?: ClientOptions): {
|
|
1355
|
+
declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
|
|
1356
|
+
region?: Region;
|
|
1357
|
+
}): {
|
|
1368
1358
|
transporter: _algolia_client_common.Transporter;
|
|
1359
|
+
/**
|
|
1360
|
+
* The `appId` currently in use.
|
|
1361
|
+
*/
|
|
1369
1362
|
appId: string;
|
|
1363
|
+
/**
|
|
1364
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
1365
|
+
*/
|
|
1370
1366
|
clearCache(): Promise<void>;
|
|
1367
|
+
/**
|
|
1368
|
+
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
1369
|
+
*/
|
|
1371
1370
|
readonly _ua: string;
|
|
1371
|
+
/**
|
|
1372
|
+
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
|
|
1373
|
+
*
|
|
1374
|
+
* @param segment - The algolia agent (user-agent) segment to add.
|
|
1375
|
+
* @param version - The version of the agent.
|
|
1376
|
+
*/
|
|
1372
1377
|
addAlgoliaAgent(segment: string, version?: string): void;
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1378
|
+
/**
|
|
1379
|
+
* Helper method to switch the API key used to authenticate the requests.
|
|
1380
|
+
*
|
|
1381
|
+
* @param params - Method params.
|
|
1382
|
+
* @param params.apiKey - The new API Key to use.
|
|
1383
|
+
*/
|
|
1384
|
+
setClientApiKey({ apiKey }: {
|
|
1385
|
+
apiKey: string;
|
|
1386
|
+
}): void;
|
|
1387
|
+
/**
|
|
1388
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
1389
|
+
*
|
|
1390
|
+
* @param customDelete - The customDelete object.
|
|
1391
|
+
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1392
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
1393
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1394
|
+
*/
|
|
1395
|
+
customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
|
|
1396
|
+
/**
|
|
1397
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
1398
|
+
*
|
|
1399
|
+
* @param customGet - The customGet object.
|
|
1400
|
+
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1401
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
1402
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1403
|
+
*/
|
|
1404
|
+
customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
|
|
1405
|
+
/**
|
|
1406
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
1407
|
+
*
|
|
1408
|
+
* @param customPost - The customPost object.
|
|
1409
|
+
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1410
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
1411
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
1412
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1413
|
+
*/
|
|
1414
|
+
customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
|
|
1415
|
+
/**
|
|
1416
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
1417
|
+
*
|
|
1418
|
+
* @param customPut - The customPut object.
|
|
1419
|
+
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1420
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
1421
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
1422
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1423
|
+
*/
|
|
1424
|
+
customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
|
|
1425
|
+
/**
|
|
1426
|
+
* Retrieves the add-to-cart rate for all of your searches with at least one add-to-cart event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
1427
|
+
*
|
|
1428
|
+
* Required API Key ACLs:
|
|
1429
|
+
* - analytics.
|
|
1430
|
+
*
|
|
1431
|
+
* @param getAddToCartRate - The getAddToCartRate object.
|
|
1432
|
+
* @param getAddToCartRate.index - Index name.
|
|
1433
|
+
* @param getAddToCartRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1434
|
+
* @param getAddToCartRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1435
|
+
* @param getAddToCartRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1436
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1437
|
+
*/
|
|
1438
|
+
getAddToCartRate({ index, startDate, endDate, tags }: GetAddToCartRateProps, requestOptions?: RequestOptions): Promise<GetAddToCartRateResponse>;
|
|
1439
|
+
/**
|
|
1440
|
+
* Retrieves the average click position of your search results, including a daily breakdown. The average click position is the average of all clicked search results\' positions. For example, if users only ever click on the first result for any search, the average click position is 1. By default, the analyzed period includes the last eight days including the current day.
|
|
1441
|
+
*
|
|
1442
|
+
* Required API Key ACLs:
|
|
1443
|
+
* - analytics.
|
|
1444
|
+
*
|
|
1445
|
+
* @param getAverageClickPosition - The getAverageClickPosition object.
|
|
1446
|
+
* @param getAverageClickPosition.index - Index name.
|
|
1447
|
+
* @param getAverageClickPosition.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1448
|
+
* @param getAverageClickPosition.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1449
|
+
* @param getAverageClickPosition.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1450
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1451
|
+
*/
|
|
1452
|
+
getAverageClickPosition({ index, startDate, endDate, tags }: GetAverageClickPositionProps, requestOptions?: RequestOptions): Promise<GetAverageClickPositionResponse>;
|
|
1453
|
+
/**
|
|
1454
|
+
* Retrieves the positions in the search results and their associated number of clicks. This lets you check how many clicks the first, second, or tenth search results receive.
|
|
1455
|
+
*
|
|
1456
|
+
* Required API Key ACLs:
|
|
1457
|
+
* - analytics.
|
|
1458
|
+
*
|
|
1459
|
+
* @param getClickPositions - The getClickPositions object.
|
|
1460
|
+
* @param getClickPositions.index - Index name.
|
|
1461
|
+
* @param getClickPositions.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1462
|
+
* @param getClickPositions.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1463
|
+
* @param getClickPositions.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1464
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1465
|
+
*/
|
|
1466
|
+
getClickPositions({ index, startDate, endDate, tags }: GetClickPositionsProps, requestOptions?: RequestOptions): Promise<GetClickPositionsResponse>;
|
|
1467
|
+
/**
|
|
1468
|
+
* Retrieves the click-through rate for all of your searches with at least one click event, including a daily breakdown By default, the analyzed period includes the last eight days including the current day.
|
|
1469
|
+
*
|
|
1470
|
+
* Required API Key ACLs:
|
|
1471
|
+
* - analytics.
|
|
1472
|
+
*
|
|
1473
|
+
* @param getClickThroughRate - The getClickThroughRate object.
|
|
1474
|
+
* @param getClickThroughRate.index - Index name.
|
|
1475
|
+
* @param getClickThroughRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1476
|
+
* @param getClickThroughRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1477
|
+
* @param getClickThroughRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1478
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1479
|
+
*/
|
|
1480
|
+
getClickThroughRate({ index, startDate, endDate, tags }: GetClickThroughRateProps, requestOptions?: RequestOptions): Promise<GetClickThroughRateResponse>;
|
|
1481
|
+
/**
|
|
1482
|
+
* Retrieves the conversion rate for all of your searches with at least one conversion event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
1483
|
+
*
|
|
1484
|
+
* Required API Key ACLs:
|
|
1485
|
+
* - analytics.
|
|
1486
|
+
*
|
|
1487
|
+
* @param getConversionRate - The getConversionRate object.
|
|
1488
|
+
* @param getConversionRate.index - Index name.
|
|
1489
|
+
* @param getConversionRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1490
|
+
* @param getConversionRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1491
|
+
* @param getConversionRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1492
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1493
|
+
*/
|
|
1494
|
+
getConversionRate({ index, startDate, endDate, tags }: GetConversionRateProps, requestOptions?: RequestOptions): Promise<GetConversionRateResponse>;
|
|
1495
|
+
/**
|
|
1496
|
+
* Retrieves the fraction of searches that didn\'t lead to any click within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
1497
|
+
*
|
|
1498
|
+
* Required API Key ACLs:
|
|
1499
|
+
* - analytics.
|
|
1500
|
+
*
|
|
1501
|
+
* @param getNoClickRate - The getNoClickRate object.
|
|
1502
|
+
* @param getNoClickRate.index - Index name.
|
|
1503
|
+
* @param getNoClickRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1504
|
+
* @param getNoClickRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1505
|
+
* @param getNoClickRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1506
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1507
|
+
*/
|
|
1508
|
+
getNoClickRate({ index, startDate, endDate, tags }: GetNoClickRateProps, requestOptions?: RequestOptions): Promise<GetNoClickRateResponse>;
|
|
1509
|
+
/**
|
|
1510
|
+
* Retrieves the fraction of searches that didn\'t return any results within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
1511
|
+
*
|
|
1512
|
+
* Required API Key ACLs:
|
|
1513
|
+
* - analytics.
|
|
1514
|
+
*
|
|
1515
|
+
* @param getNoResultsRate - The getNoResultsRate object.
|
|
1516
|
+
* @param getNoResultsRate.index - Index name.
|
|
1517
|
+
* @param getNoResultsRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1518
|
+
* @param getNoResultsRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1519
|
+
* @param getNoResultsRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1520
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1521
|
+
*/
|
|
1522
|
+
getNoResultsRate({ index, startDate, endDate, tags }: GetNoResultsRateProps, requestOptions?: RequestOptions): Promise<GetNoResultsRateResponse>;
|
|
1523
|
+
/**
|
|
1524
|
+
* Retrieves the purchase rate for all of your searches with at least one purchase event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
1525
|
+
*
|
|
1526
|
+
* Required API Key ACLs:
|
|
1527
|
+
* - analytics.
|
|
1528
|
+
*
|
|
1529
|
+
* @param getPurchaseRate - The getPurchaseRate object.
|
|
1530
|
+
* @param getPurchaseRate.index - Index name.
|
|
1531
|
+
* @param getPurchaseRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1532
|
+
* @param getPurchaseRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1533
|
+
* @param getPurchaseRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1534
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1535
|
+
*/
|
|
1536
|
+
getPurchaseRate({ index, startDate, endDate, tags }: GetPurchaseRateProps, requestOptions?: RequestOptions): Promise<GetPurchaseRateResponse>;
|
|
1537
|
+
/**
|
|
1538
|
+
* Retrieves revenue-related metrics, such as the total revenue or the average order value. To retrieve revenue-related metrics, sent purchase events. By default, the analyzed period includes the last eight days including the current day.
|
|
1539
|
+
*
|
|
1540
|
+
* Required API Key ACLs:
|
|
1541
|
+
* - analytics.
|
|
1542
|
+
*
|
|
1543
|
+
* @param getRevenue - The getRevenue object.
|
|
1544
|
+
* @param getRevenue.index - Index name.
|
|
1545
|
+
* @param getRevenue.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1546
|
+
* @param getRevenue.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1547
|
+
* @param getRevenue.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1548
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1549
|
+
*/
|
|
1550
|
+
getRevenue({ index, startDate, endDate, tags }: GetRevenueProps, requestOptions?: RequestOptions): Promise<GetRevenue>;
|
|
1551
|
+
/**
|
|
1552
|
+
* Retrieves the number of searches within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
1553
|
+
*
|
|
1554
|
+
* Required API Key ACLs:
|
|
1555
|
+
* - analytics.
|
|
1556
|
+
*
|
|
1557
|
+
* @param getSearchesCount - The getSearchesCount object.
|
|
1558
|
+
* @param getSearchesCount.index - Index name.
|
|
1559
|
+
* @param getSearchesCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1560
|
+
* @param getSearchesCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1561
|
+
* @param getSearchesCount.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1562
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1563
|
+
*/
|
|
1564
|
+
getSearchesCount({ index, startDate, endDate, tags }: GetSearchesCountProps, requestOptions?: RequestOptions): Promise<GetSearchesCountResponse>;
|
|
1565
|
+
/**
|
|
1566
|
+
* Retrieves the most popular searches that didn\'t lead to any clicks, from the 1,000 most frequent searches.
|
|
1567
|
+
*
|
|
1568
|
+
* Required API Key ACLs:
|
|
1569
|
+
* - analytics.
|
|
1570
|
+
*
|
|
1571
|
+
* @param getSearchesNoClicks - The getSearchesNoClicks object.
|
|
1572
|
+
* @param getSearchesNoClicks.index - Index name.
|
|
1573
|
+
* @param getSearchesNoClicks.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1574
|
+
* @param getSearchesNoClicks.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1575
|
+
* @param getSearchesNoClicks.limit - Number of items to return.
|
|
1576
|
+
* @param getSearchesNoClicks.offset - Position of the first item to return.
|
|
1577
|
+
* @param getSearchesNoClicks.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1578
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1579
|
+
*/
|
|
1580
|
+
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags }: GetSearchesNoClicksProps, requestOptions?: RequestOptions): Promise<GetSearchesNoClicksResponse>;
|
|
1581
|
+
/**
|
|
1582
|
+
* Retrieves the most popular searches that didn\'t return any results.
|
|
1583
|
+
*
|
|
1584
|
+
* Required API Key ACLs:
|
|
1585
|
+
* - analytics.
|
|
1586
|
+
*
|
|
1587
|
+
* @param getSearchesNoResults - The getSearchesNoResults object.
|
|
1588
|
+
* @param getSearchesNoResults.index - Index name.
|
|
1589
|
+
* @param getSearchesNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1590
|
+
* @param getSearchesNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1591
|
+
* @param getSearchesNoResults.limit - Number of items to return.
|
|
1592
|
+
* @param getSearchesNoResults.offset - Position of the first item to return.
|
|
1593
|
+
* @param getSearchesNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1594
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1595
|
+
*/
|
|
1596
|
+
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags }: GetSearchesNoResultsProps, requestOptions?: RequestOptions): Promise<GetSearchesNoResultsResponse>;
|
|
1597
|
+
/**
|
|
1598
|
+
* Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.
|
|
1599
|
+
*
|
|
1600
|
+
* Required API Key ACLs:
|
|
1601
|
+
* - analytics.
|
|
1602
|
+
*
|
|
1603
|
+
* @param getStatus - The getStatus object.
|
|
1604
|
+
* @param getStatus.index - Index name.
|
|
1605
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1606
|
+
*/
|
|
1607
|
+
getStatus({ index }: GetStatusProps, requestOptions?: RequestOptions): Promise<GetStatusResponse>;
|
|
1608
|
+
/**
|
|
1609
|
+
* Retrieves the countries with the most searches to your index.
|
|
1610
|
+
*
|
|
1611
|
+
* Required API Key ACLs:
|
|
1612
|
+
* - analytics.
|
|
1613
|
+
*
|
|
1614
|
+
* @param getTopCountries - The getTopCountries object.
|
|
1615
|
+
* @param getTopCountries.index - Index name.
|
|
1616
|
+
* @param getTopCountries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1617
|
+
* @param getTopCountries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1618
|
+
* @param getTopCountries.limit - Number of items to return.
|
|
1619
|
+
* @param getTopCountries.offset - Position of the first item to return.
|
|
1620
|
+
* @param getTopCountries.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1621
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1622
|
+
*/
|
|
1623
|
+
getTopCountries({ index, startDate, endDate, limit, offset, tags }: GetTopCountriesProps, requestOptions?: RequestOptions): Promise<GetTopCountriesResponse>;
|
|
1624
|
+
/**
|
|
1625
|
+
* Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
1626
|
+
*
|
|
1627
|
+
* Required API Key ACLs:
|
|
1628
|
+
* - analytics.
|
|
1629
|
+
*
|
|
1630
|
+
* @param getTopFilterAttributes - The getTopFilterAttributes object.
|
|
1631
|
+
* @param getTopFilterAttributes.index - Index name.
|
|
1632
|
+
* @param getTopFilterAttributes.search - Search query.
|
|
1633
|
+
* @param getTopFilterAttributes.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1634
|
+
* @param getTopFilterAttributes.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1635
|
+
* @param getTopFilterAttributes.limit - Number of items to return.
|
|
1636
|
+
* @param getTopFilterAttributes.offset - Position of the first item to return.
|
|
1637
|
+
* @param getTopFilterAttributes.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1638
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1639
|
+
*/
|
|
1640
|
+
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags }: GetTopFilterAttributesProps, requestOptions?: RequestOptions): Promise<GetTopFilterAttributesResponse>;
|
|
1641
|
+
/**
|
|
1642
|
+
* Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
1643
|
+
*
|
|
1644
|
+
* Required API Key ACLs:
|
|
1645
|
+
* - analytics.
|
|
1646
|
+
*
|
|
1647
|
+
* @param getTopFilterForAttribute - The getTopFilterForAttribute object.
|
|
1648
|
+
* @param getTopFilterForAttribute.attribute - Attribute name.
|
|
1649
|
+
* @param getTopFilterForAttribute.index - Index name.
|
|
1650
|
+
* @param getTopFilterForAttribute.search - Search query.
|
|
1651
|
+
* @param getTopFilterForAttribute.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1652
|
+
* @param getTopFilterForAttribute.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1653
|
+
* @param getTopFilterForAttribute.limit - Number of items to return.
|
|
1654
|
+
* @param getTopFilterForAttribute.offset - Position of the first item to return.
|
|
1655
|
+
* @param getTopFilterForAttribute.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1656
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1657
|
+
*/
|
|
1658
|
+
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags }: GetTopFilterForAttributeProps, requestOptions?: RequestOptions): Promise<GetTopFilterForAttributeResponse>;
|
|
1659
|
+
/**
|
|
1660
|
+
* Retrieves the most frequently used filters for a search that didn\'t return any results. To get the most frequent searches without results, use the [Retrieve searches without results](#tag/search/operation/getSearchesNoResults) operation.
|
|
1661
|
+
*
|
|
1662
|
+
* Required API Key ACLs:
|
|
1663
|
+
* - analytics.
|
|
1664
|
+
*
|
|
1665
|
+
* @param getTopFiltersNoResults - The getTopFiltersNoResults object.
|
|
1666
|
+
* @param getTopFiltersNoResults.index - Index name.
|
|
1667
|
+
* @param getTopFiltersNoResults.search - Search query.
|
|
1668
|
+
* @param getTopFiltersNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1669
|
+
* @param getTopFiltersNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1670
|
+
* @param getTopFiltersNoResults.limit - Number of items to return.
|
|
1671
|
+
* @param getTopFiltersNoResults.offset - Position of the first item to return.
|
|
1672
|
+
* @param getTopFiltersNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1673
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1674
|
+
*/
|
|
1675
|
+
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags }: GetTopFiltersNoResultsProps, requestOptions?: RequestOptions): Promise<GetTopFiltersNoResultsResponse>;
|
|
1676
|
+
/**
|
|
1677
|
+
* Retrieves the object IDs of the most frequent search results.
|
|
1678
|
+
*
|
|
1679
|
+
* Required API Key ACLs:
|
|
1680
|
+
* - analytics.
|
|
1681
|
+
*
|
|
1682
|
+
* @param getTopHits - The getTopHits object.
|
|
1683
|
+
* @param getTopHits.index - Index name.
|
|
1684
|
+
* @param getTopHits.search - Search query.
|
|
1685
|
+
* @param getTopHits.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
1686
|
+
* @param getTopHits.revenueAnalytics - Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
|
|
1687
|
+
* @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1688
|
+
* @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1689
|
+
* @param getTopHits.limit - Number of items to return.
|
|
1690
|
+
* @param getTopHits.offset - Position of the first item to return.
|
|
1691
|
+
* @param getTopHits.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1692
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1693
|
+
*/
|
|
1694
|
+
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags }: GetTopHitsProps, requestOptions?: RequestOptions): Promise<GetTopHitsResponse>;
|
|
1695
|
+
/**
|
|
1696
|
+
* Returns the most popular search terms.
|
|
1697
|
+
*
|
|
1698
|
+
* Required API Key ACLs:
|
|
1699
|
+
* - analytics.
|
|
1700
|
+
*
|
|
1701
|
+
* @param getTopSearches - The getTopSearches object.
|
|
1702
|
+
* @param getTopSearches.index - Index name.
|
|
1703
|
+
* @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
1704
|
+
* @param getTopSearches.revenueAnalytics - Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
|
|
1705
|
+
* @param getTopSearches.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1706
|
+
* @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1707
|
+
* @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
|
|
1708
|
+
* @param getTopSearches.direction - Sorting direction of the results: ascending or descending.
|
|
1709
|
+
* @param getTopSearches.limit - Number of items to return.
|
|
1710
|
+
* @param getTopSearches.offset - Position of the first item to return.
|
|
1711
|
+
* @param getTopSearches.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1712
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1713
|
+
*/
|
|
1714
|
+
getTopSearches({ index, clickAnalytics, revenueAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }: GetTopSearchesProps, requestOptions?: RequestOptions): Promise<GetTopSearchesResponse>;
|
|
1715
|
+
/**
|
|
1716
|
+
* Retrieves the number of unique users within a time range, including a daily breakdown. Since this endpoint returns the number of unique users, the sum of the daily values might be different from the total number. By default, Algolia distinguishes search users by their IP address, _unless_ you include a pseudonymous user identifier in your search requests with the `userToken` API parameter or `x-algolia-usertoken` request header. By default, the analyzed period includes the last eight days including the current day.
|
|
1717
|
+
*
|
|
1718
|
+
* Required API Key ACLs:
|
|
1719
|
+
* - analytics.
|
|
1720
|
+
*
|
|
1721
|
+
* @param getUsersCount - The getUsersCount object.
|
|
1722
|
+
* @param getUsersCount.index - Index name.
|
|
1723
|
+
* @param getUsersCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1724
|
+
* @param getUsersCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1725
|
+
* @param getUsersCount.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1726
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1727
|
+
*/
|
|
1728
|
+
getUsersCount({ index, startDate, endDate, tags }: GetUsersCountProps, requestOptions?: RequestOptions): Promise<GetUsersCountResponse>;
|
|
1729
|
+
};
|
|
1730
|
+
|
|
1731
|
+
/**
|
|
1732
|
+
* Error.
|
|
1733
|
+
*/
|
|
1734
|
+
type ErrorBase = Record<string, any> & {
|
|
1735
|
+
message?: string;
|
|
1397
1736
|
};
|
|
1398
1737
|
|
|
1738
|
+
type AnalyticsClient = ReturnType<typeof createAnalyticsClient>;
|
|
1739
|
+
|
|
1740
|
+
declare function analyticsClient(appId: string, apiKey: string, region?: Region, options?: ClientOptions): AnalyticsClient;
|
|
1741
|
+
|
|
1399
1742
|
export { type AnalyticsClient, type ClickPosition, type CurrencyCode, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DailyAddToCartRates, type DailyAverageClicks, type DailyClickThroughRates, type DailyConversionRates, type DailyNoClickRates, type DailyNoResultsRates, type DailyPurchaseRates, type DailyRevenue, type DailySearches, type DailySearchesNoClicks, type DailySearchesNoResults, type DailyUsers, type Direction, type ErrorBase, type GetAddToCartRateProps, type GetAddToCartRateResponse, type GetAverageClickPositionProps, type GetAverageClickPositionResponse, type GetClickPositionsProps, type GetClickPositionsResponse, type GetClickThroughRateProps, type GetClickThroughRateResponse, type GetConversionRateProps, type GetConversionRateResponse, type GetNoClickRateProps, type GetNoClickRateResponse, type GetNoResultsRateProps, type GetNoResultsRateResponse, type GetPurchaseRateProps, type GetPurchaseRateResponse, type GetRevenue, type GetRevenueProps, type GetSearchesCountProps, type GetSearchesCountResponse, type GetSearchesNoClicksProps, type GetSearchesNoClicksResponse, type GetSearchesNoResultsProps, type GetSearchesNoResultsResponse, type GetStatusProps, type GetStatusResponse, type GetTopCountriesProps, type GetTopCountriesResponse, type GetTopFilterAttribute, type GetTopFilterAttributesProps, type GetTopFilterAttributesResponse, type GetTopFilterForAttribute, type GetTopFilterForAttributeProps, type GetTopFilterForAttributeResponse, type GetTopFiltersNoResultsProps, type GetTopFiltersNoResultsResponse, type GetTopFiltersNoResultsValue, type GetTopFiltersNoResultsValues, type GetTopHitsProps, type GetTopHitsResponse, type GetTopSearchesProps, type GetTopSearchesResponse, type GetUsersCountProps, type GetUsersCountResponse, type Operator, type OrderBy, type Region, type TopCountry, type TopHit, type TopHitWithAnalytics, type TopHitWithRevenueAnalytics, type TopHitsResponse, type TopHitsResponseWithAnalytics, type TopHitsResponseWithRevenueAnalytics, type TopSearch, type TopSearchWithAnalytics, type TopSearchWithRevenueAnalytics, type TopSearchesResponse, type TopSearchesResponseWithAnalytics, type TopSearchesResponseWithRevenueAnalytics, analyticsClient, apiClientVersion };
|