@algolia/client-analytics 5.0.0-alpha.107 → 5.0.0-alpha.109
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/builds/browser.d.ts +6 -3
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +6 -3
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/client-analytics.cjs +181 -53
- package/dist/client-analytics.esm.browser.js +182 -54
- package/dist/client-analytics.esm.node.js +181 -53
- package/dist/client-analytics.umd.js +2 -2
- package/dist/model/clickPositionsInner.d.ts +14 -0
- package/dist/model/clickPositionsInner.d.ts.map +1 -0
- package/dist/model/clientMethodProps.d.ts +96 -25
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/currenciesValue.d.ts +14 -0
- package/dist/model/currenciesValue.d.ts.map +1 -0
- package/dist/model/dailyAddToCartRates.d.ts +19 -0
- package/dist/model/dailyAddToCartRates.d.ts.map +1 -0
- package/dist/model/dailyAverageClicks.d.ts +15 -0
- package/dist/model/dailyAverageClicks.d.ts.map +1 -0
- package/dist/model/dailyClickThroughRates.d.ts +19 -0
- package/dist/model/dailyClickThroughRates.d.ts.map +1 -0
- package/dist/model/dailyConversionRates.d.ts +19 -0
- package/dist/model/dailyConversionRates.d.ts.map +1 -0
- package/dist/model/dailyNoClickRates.d.ts +19 -0
- package/dist/model/dailyNoClickRates.d.ts.map +1 -0
- package/dist/model/dailyNoResultsRates.d.ts +19 -0
- package/dist/model/dailyNoResultsRates.d.ts.map +1 -0
- package/dist/model/dailyPurchaseRates.d.ts +19 -0
- package/dist/model/dailyPurchaseRates.d.ts.map +1 -0
- package/dist/model/dailyRevenue.d.ts +12 -0
- package/dist/model/dailyRevenue.d.ts.map +1 -0
- package/dist/model/dailySearches.d.ts +11 -0
- package/dist/model/dailySearches.d.ts.map +1 -0
- package/dist/model/dailySearchesNoClicks.d.ts +15 -0
- package/dist/model/dailySearchesNoClicks.d.ts.map +1 -0
- package/dist/model/dailySearchesNoResults.d.ts +15 -0
- package/dist/model/dailySearchesNoResults.d.ts.map +1 -0
- package/dist/model/dailyUsers.d.ts +11 -0
- package/dist/model/dailyUsers.d.ts.map +1 -0
- package/dist/model/getAddToCartRateResponse.d.ts +20 -0
- package/dist/model/getAddToCartRateResponse.d.ts.map +1 -0
- package/dist/model/getAverageClickPositionResponse.d.ts +6 -6
- package/dist/model/getAverageClickPositionResponse.d.ts.map +1 -1
- package/dist/model/getClickPositionsResponse.d.ts +3 -3
- package/dist/model/getClickPositionsResponse.d.ts.map +1 -1
- package/dist/model/getClickThroughRateResponse.d.ts +8 -8
- package/dist/model/getClickThroughRateResponse.d.ts.map +1 -1
- package/dist/model/getConversionRateResponse.d.ts +20 -0
- package/dist/model/getConversionRateResponse.d.ts.map +1 -0
- package/dist/model/getNoClickRateResponse.d.ts +6 -6
- package/dist/model/getNoClickRateResponse.d.ts.map +1 -1
- package/dist/model/getNoResultsRateResponse.d.ts +6 -6
- package/dist/model/getNoResultsRateResponse.d.ts.map +1 -1
- package/dist/model/getPurchaseRateResponse.d.ts +20 -0
- package/dist/model/getPurchaseRateResponse.d.ts.map +1 -0
- package/dist/model/getRevenue.d.ts +13 -0
- package/dist/model/getRevenue.d.ts.map +1 -0
- package/dist/model/getSearchesCountResponse.d.ts +3 -3
- package/dist/model/getSearchesCountResponse.d.ts.map +1 -1
- package/dist/model/getSearchesNoClicksResponse.d.ts +3 -3
- package/dist/model/getSearchesNoClicksResponse.d.ts.map +1 -1
- package/dist/model/getSearchesNoResultsResponse.d.ts +3 -3
- package/dist/model/getSearchesNoResultsResponse.d.ts.map +1 -1
- package/dist/model/getStatusResponse.d.ts +2 -2
- package/dist/model/getStatusResponse.d.ts.map +1 -1
- package/dist/model/getTopCountriesResponse.d.ts +1 -1
- package/dist/model/getTopFilterAttributesResponse.d.ts +1 -1
- package/dist/model/getTopFilterForAttribute.d.ts +2 -4
- package/dist/model/getTopFilterForAttribute.d.ts.map +1 -1
- package/dist/model/getTopFiltersNoResultsResponse.d.ts +2 -2
- package/dist/model/getTopFiltersNoResultsResponse.d.ts.map +1 -1
- package/dist/model/getTopFiltersNoResultsValue.d.ts +2 -4
- package/dist/model/getTopFiltersNoResultsValue.d.ts.map +1 -1
- package/dist/model/getTopHitsResponse.d.ts +2 -1
- package/dist/model/getTopHitsResponse.d.ts.map +1 -1
- package/dist/model/getTopSearchesResponse.d.ts +2 -1
- package/dist/model/getTopSearchesResponse.d.ts.map +1 -1
- package/dist/model/getUsersCountResponse.d.ts +4 -4
- package/dist/model/getUsersCountResponse.d.ts.map +1 -1
- package/dist/model/index.d.ts +23 -11
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/operator.d.ts +5 -0
- package/dist/model/operator.d.ts.map +1 -0
- package/dist/model/orderBy.d.ts +1 -1
- package/dist/model/topCountry.d.ts +1 -1
- package/dist/model/topHit.d.ts +1 -1
- package/dist/model/topHitWithAnalytics.d.ts +9 -9
- package/dist/model/topHitWithAnalytics.d.ts.map +1 -1
- package/dist/model/topHitWithRevenueAnalytics.d.ts +52 -0
- package/dist/model/topHitWithRevenueAnalytics.d.ts.map +1 -0
- package/dist/model/topHitsResponse.d.ts +1 -1
- package/dist/model/topHitsResponseWithAnalytics.d.ts +1 -1
- package/dist/model/topHitsResponseWithRevenueAnalytics.d.ts +8 -0
- package/dist/model/topHitsResponseWithRevenueAnalytics.d.ts.map +1 -0
- package/dist/model/topSearch.d.ts +2 -2
- package/dist/model/topSearchWithAnalytics.d.ts +17 -12
- package/dist/model/topSearchWithAnalytics.d.ts.map +1 -1
- package/dist/model/topSearchWithRevenueAnalytics.d.ts +65 -0
- package/dist/model/topSearchWithRevenueAnalytics.d.ts.map +1 -0
- package/dist/model/topSearchesResponse.d.ts +1 -1
- package/dist/model/topSearchesResponseWithAnalytics.d.ts +1 -1
- package/dist/model/topSearchesResponseWithRevenueAnalytics.d.ts +8 -0
- package/dist/model/topSearchesResponseWithRevenueAnalytics.d.ts.map +1 -0
- package/dist/src/analyticsClient.d.ts +97 -50
- package/dist/src/analyticsClient.d.ts.map +1 -1
- package/model/clickPositionsInner.ts +16 -0
- package/model/clientMethodProps.ts +99 -25
- package/model/currenciesValue.ts +16 -0
- package/model/dailyAddToCartRates.ts +23 -0
- package/model/dailyAverageClicks.ts +18 -0
- package/model/dailyClickThroughRates.ts +23 -0
- package/model/dailyConversionRates.ts +23 -0
- package/model/dailyNoClickRates.ts +23 -0
- package/model/dailyNoResultsRates.ts +23 -0
- package/model/dailyPurchaseRates.ts +23 -0
- package/model/dailyRevenue.ts +15 -0
- package/model/{searchEvent.ts → dailySearches.ts} +2 -2
- package/model/{searchNoResultEvent.ts → dailySearchesNoClicks.ts} +3 -3
- package/model/{searchNoClickEvent.ts → dailySearchesNoResults.ts} +3 -3
- package/model/{userWithDate.ts → dailyUsers.ts} +3 -3
- package/model/getAddToCartRateResponse.ts +25 -0
- package/model/getAverageClickPositionResponse.ts +6 -6
- package/model/getClickPositionsResponse.ts +3 -3
- package/model/getClickThroughRateResponse.ts +8 -8
- package/model/getConversionRateResponse.ts +25 -0
- package/model/getNoClickRateResponse.ts +6 -6
- package/model/getNoResultsRateResponse.ts +6 -6
- package/model/getPurchaseRateResponse.ts +25 -0
- package/model/getRevenue.ts +16 -0
- package/model/getSearchesCountResponse.ts +3 -3
- package/model/getSearchesNoClicksResponse.ts +3 -3
- package/model/getSearchesNoResultsResponse.ts +3 -3
- package/model/getStatusResponse.ts +2 -2
- package/model/getTopCountriesResponse.ts +1 -1
- package/model/getTopFilterAttributesResponse.ts +1 -1
- package/model/getTopFilterForAttribute.ts +3 -4
- package/model/getTopFiltersNoResultsResponse.ts +2 -2
- package/model/getTopFiltersNoResultsValue.ts +3 -4
- package/model/getTopHitsResponse.ts +5 -1
- package/model/getTopSearchesResponse.ts +3 -1
- package/model/getUsersCountResponse.ts +4 -4
- package/model/index.ts +23 -11
- package/model/operator.ts +6 -0
- package/model/orderBy.ts +1 -1
- package/model/topCountry.ts +1 -1
- package/model/topHit.ts +1 -1
- package/model/topHitWithAnalytics.ts +9 -9
- package/model/topHitWithRevenueAnalytics.ts +65 -0
- package/model/topHitsResponse.ts +1 -1
- package/model/topHitsResponseWithAnalytics.ts +1 -1
- package/model/topHitsResponseWithRevenueAnalytics.ts +10 -0
- package/model/topSearch.ts +2 -2
- package/model/topSearchWithAnalytics.ts +19 -12
- package/model/topSearchWithRevenueAnalytics.ts +81 -0
- package/model/topSearchesResponse.ts +1 -1
- package/model/topSearchesResponseWithAnalytics.ts +1 -1
- package/model/topSearchesResponseWithRevenueAnalytics.ts +10 -0
- package/package.json +7 -7
- package/dist/model/averageClickEvent.d.ts +0 -15
- package/dist/model/averageClickEvent.d.ts.map +0 -1
- package/dist/model/clickPosition.d.ts +0 -11
- package/dist/model/clickPosition.d.ts.map +0 -1
- package/dist/model/clickThroughRateEvent.d.ts +0 -19
- package/dist/model/clickThroughRateEvent.d.ts.map +0 -1
- package/dist/model/conversionRateEvent.d.ts +0 -19
- package/dist/model/conversionRateEvent.d.ts.map +0 -1
- package/dist/model/getConversationRateResponse.d.ts +0 -20
- package/dist/model/getConversationRateResponse.d.ts.map +0 -1
- package/dist/model/noClickRateEvent.d.ts +0 -19
- package/dist/model/noClickRateEvent.d.ts.map +0 -1
- package/dist/model/noResultsRateEvent.d.ts +0 -19
- package/dist/model/noResultsRateEvent.d.ts.map +0 -1
- package/dist/model/searchEvent.d.ts +0 -11
- package/dist/model/searchEvent.d.ts.map +0 -1
- package/dist/model/searchNoClickEvent.d.ts +0 -15
- package/dist/model/searchNoClickEvent.d.ts.map +0 -1
- package/dist/model/searchNoResultEvent.d.ts +0 -15
- package/dist/model/searchNoResultEvent.d.ts.map +0 -1
- package/dist/model/userWithDate.d.ts +0 -11
- package/dist/model/userWithDate.d.ts.map +0 -1
- package/model/averageClickEvent.ts +0 -18
- package/model/clickPosition.ts +0 -13
- package/model/clickThroughRateEvent.ts +0 -23
- package/model/conversionRateEvent.ts +0 -23
- package/model/getConversationRateResponse.ts +0 -25
- package/model/noClickRateEvent.ts +0 -23
- package/model/noResultsRateEvent.ts +0 -23
|
@@ -4,7 +4,7 @@ var clientCommon = require('@algolia/client-common');
|
|
|
4
4
|
var requesterNodeHttp = require('@algolia/requester-node-http');
|
|
5
5
|
|
|
6
6
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
7
|
-
const apiClientVersion = '5.0.0-alpha.
|
|
7
|
+
const apiClientVersion = '5.0.0-alpha.109';
|
|
8
8
|
const REGIONS = ['de', 'us'];
|
|
9
9
|
function getDefaultHosts(region) {
|
|
10
10
|
const url = !region
|
|
@@ -75,7 +75,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
75
75
|
if (!path) {
|
|
76
76
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
77
77
|
}
|
|
78
|
-
const requestPath = '/
|
|
78
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
79
79
|
const headers = {};
|
|
80
80
|
const queryParameters = parameters ? parameters : {};
|
|
81
81
|
const request = {
|
|
@@ -98,7 +98,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
98
98
|
if (!path) {
|
|
99
99
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
100
100
|
}
|
|
101
|
-
const requestPath = '/
|
|
101
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
102
102
|
const headers = {};
|
|
103
103
|
const queryParameters = parameters ? parameters : {};
|
|
104
104
|
const request = {
|
|
@@ -122,7 +122,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
122
122
|
if (!path) {
|
|
123
123
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
124
124
|
}
|
|
125
|
-
const requestPath = '/
|
|
125
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
126
126
|
const headers = {};
|
|
127
127
|
const queryParameters = parameters ? parameters : {};
|
|
128
128
|
const request = {
|
|
@@ -147,7 +147,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
147
147
|
if (!path) {
|
|
148
148
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
149
149
|
}
|
|
150
|
-
const requestPath = '/
|
|
150
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
151
151
|
const headers = {};
|
|
152
152
|
const queryParameters = parameters ? parameters : {};
|
|
153
153
|
const request = {
|
|
@@ -160,7 +160,47 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
160
160
|
return transporter.request(request, requestOptions);
|
|
161
161
|
},
|
|
162
162
|
/**
|
|
163
|
-
*
|
|
163
|
+
* 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.
|
|
164
|
+
*
|
|
165
|
+
* Required API Key ACLs:
|
|
166
|
+
* - analytics.
|
|
167
|
+
*
|
|
168
|
+
* @param getAddToCartRate - The getAddToCartRate object.
|
|
169
|
+
* @param getAddToCartRate.index - Index name.
|
|
170
|
+
* @param getAddToCartRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
171
|
+
* @param getAddToCartRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
172
|
+
* @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/).
|
|
173
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
174
|
+
*/
|
|
175
|
+
getAddToCartRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
176
|
+
if (!index) {
|
|
177
|
+
throw new Error('Parameter `index` is required when calling `getAddToCartRate`.');
|
|
178
|
+
}
|
|
179
|
+
const requestPath = '/2/conversions/addToCartRate';
|
|
180
|
+
const headers = {};
|
|
181
|
+
const queryParameters = {};
|
|
182
|
+
if (index !== undefined) {
|
|
183
|
+
queryParameters.index = index.toString();
|
|
184
|
+
}
|
|
185
|
+
if (startDate !== undefined) {
|
|
186
|
+
queryParameters.startDate = startDate.toString();
|
|
187
|
+
}
|
|
188
|
+
if (endDate !== undefined) {
|
|
189
|
+
queryParameters.endDate = endDate.toString();
|
|
190
|
+
}
|
|
191
|
+
if (tags !== undefined) {
|
|
192
|
+
queryParameters.tags = tags.toString();
|
|
193
|
+
}
|
|
194
|
+
const request = {
|
|
195
|
+
method: 'GET',
|
|
196
|
+
path: requestPath,
|
|
197
|
+
queryParameters,
|
|
198
|
+
headers,
|
|
199
|
+
};
|
|
200
|
+
return transporter.request(request, requestOptions);
|
|
201
|
+
},
|
|
202
|
+
/**
|
|
203
|
+
* 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.
|
|
164
204
|
*
|
|
165
205
|
* Required API Key ACLs:
|
|
166
206
|
* - analytics.
|
|
@@ -169,7 +209,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
169
209
|
* @param getAverageClickPosition.index - Index name.
|
|
170
210
|
* @param getAverageClickPosition.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
171
211
|
* @param getAverageClickPosition.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
172
|
-
* @param getAverageClickPosition.tags -
|
|
212
|
+
* @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/).
|
|
173
213
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
174
214
|
*/
|
|
175
215
|
getAverageClickPosition({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -200,7 +240,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
200
240
|
return transporter.request(request, requestOptions);
|
|
201
241
|
},
|
|
202
242
|
/**
|
|
203
|
-
*
|
|
243
|
+
* 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.
|
|
204
244
|
*
|
|
205
245
|
* Required API Key ACLs:
|
|
206
246
|
* - analytics.
|
|
@@ -209,7 +249,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
209
249
|
* @param getClickPositions.index - Index name.
|
|
210
250
|
* @param getClickPositions.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
211
251
|
* @param getClickPositions.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
212
|
-
* @param getClickPositions.tags -
|
|
252
|
+
* @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/).
|
|
213
253
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
214
254
|
*/
|
|
215
255
|
getClickPositions({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -240,7 +280,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
240
280
|
return transporter.request(request, requestOptions);
|
|
241
281
|
},
|
|
242
282
|
/**
|
|
243
|
-
*
|
|
283
|
+
* 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.
|
|
244
284
|
*
|
|
245
285
|
* Required API Key ACLs:
|
|
246
286
|
* - analytics.
|
|
@@ -249,7 +289,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
249
289
|
* @param getClickThroughRate.index - Index name.
|
|
250
290
|
* @param getClickThroughRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
251
291
|
* @param getClickThroughRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
252
|
-
* @param getClickThroughRate.tags -
|
|
292
|
+
* @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/).
|
|
253
293
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
254
294
|
*/
|
|
255
295
|
getClickThroughRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -280,21 +320,21 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
280
320
|
return transporter.request(request, requestOptions);
|
|
281
321
|
},
|
|
282
322
|
/**
|
|
283
|
-
*
|
|
323
|
+
* 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.
|
|
284
324
|
*
|
|
285
325
|
* Required API Key ACLs:
|
|
286
326
|
* - analytics.
|
|
287
327
|
*
|
|
288
|
-
* @param
|
|
289
|
-
* @param
|
|
290
|
-
* @param
|
|
291
|
-
* @param
|
|
292
|
-
* @param
|
|
328
|
+
* @param getConversionRate - The getConversionRate object.
|
|
329
|
+
* @param getConversionRate.index - Index name.
|
|
330
|
+
* @param getConversionRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
331
|
+
* @param getConversionRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
332
|
+
* @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/).
|
|
293
333
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
294
334
|
*/
|
|
295
|
-
|
|
335
|
+
getConversionRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
296
336
|
if (!index) {
|
|
297
|
-
throw new Error('Parameter `index` is required when calling `
|
|
337
|
+
throw new Error('Parameter `index` is required when calling `getConversionRate`.');
|
|
298
338
|
}
|
|
299
339
|
const requestPath = '/2/conversions/conversionRate';
|
|
300
340
|
const headers = {};
|
|
@@ -320,7 +360,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
320
360
|
return transporter.request(request, requestOptions);
|
|
321
361
|
},
|
|
322
362
|
/**
|
|
323
|
-
*
|
|
363
|
+
* 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.
|
|
324
364
|
*
|
|
325
365
|
* Required API Key ACLs:
|
|
326
366
|
* - analytics.
|
|
@@ -329,7 +369,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
329
369
|
* @param getNoClickRate.index - Index name.
|
|
330
370
|
* @param getNoClickRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
331
371
|
* @param getNoClickRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
332
|
-
* @param getNoClickRate.tags -
|
|
372
|
+
* @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/).
|
|
333
373
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
334
374
|
*/
|
|
335
375
|
getNoClickRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -360,7 +400,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
360
400
|
return transporter.request(request, requestOptions);
|
|
361
401
|
},
|
|
362
402
|
/**
|
|
363
|
-
*
|
|
403
|
+
* 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.
|
|
364
404
|
*
|
|
365
405
|
* Required API Key ACLs:
|
|
366
406
|
* - analytics.
|
|
@@ -369,7 +409,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
369
409
|
* @param getNoResultsRate.index - Index name.
|
|
370
410
|
* @param getNoResultsRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
371
411
|
* @param getNoResultsRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
372
|
-
* @param getNoResultsRate.tags -
|
|
412
|
+
* @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/).
|
|
373
413
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
374
414
|
*/
|
|
375
415
|
getNoResultsRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -400,7 +440,87 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
400
440
|
return transporter.request(request, requestOptions);
|
|
401
441
|
},
|
|
402
442
|
/**
|
|
403
|
-
*
|
|
443
|
+
* 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.
|
|
444
|
+
*
|
|
445
|
+
* Required API Key ACLs:
|
|
446
|
+
* - analytics.
|
|
447
|
+
*
|
|
448
|
+
* @param getPurchaseRate - The getPurchaseRate object.
|
|
449
|
+
* @param getPurchaseRate.index - Index name.
|
|
450
|
+
* @param getPurchaseRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
451
|
+
* @param getPurchaseRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
452
|
+
* @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/).
|
|
453
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
454
|
+
*/
|
|
455
|
+
getPurchaseRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
456
|
+
if (!index) {
|
|
457
|
+
throw new Error('Parameter `index` is required when calling `getPurchaseRate`.');
|
|
458
|
+
}
|
|
459
|
+
const requestPath = '/2/conversions/purchaseRate';
|
|
460
|
+
const headers = {};
|
|
461
|
+
const queryParameters = {};
|
|
462
|
+
if (index !== undefined) {
|
|
463
|
+
queryParameters.index = index.toString();
|
|
464
|
+
}
|
|
465
|
+
if (startDate !== undefined) {
|
|
466
|
+
queryParameters.startDate = startDate.toString();
|
|
467
|
+
}
|
|
468
|
+
if (endDate !== undefined) {
|
|
469
|
+
queryParameters.endDate = endDate.toString();
|
|
470
|
+
}
|
|
471
|
+
if (tags !== undefined) {
|
|
472
|
+
queryParameters.tags = tags.toString();
|
|
473
|
+
}
|
|
474
|
+
const request = {
|
|
475
|
+
method: 'GET',
|
|
476
|
+
path: requestPath,
|
|
477
|
+
queryParameters,
|
|
478
|
+
headers,
|
|
479
|
+
};
|
|
480
|
+
return transporter.request(request, requestOptions);
|
|
481
|
+
},
|
|
482
|
+
/**
|
|
483
|
+
* 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.
|
|
484
|
+
*
|
|
485
|
+
* Required API Key ACLs:
|
|
486
|
+
* - analytics.
|
|
487
|
+
*
|
|
488
|
+
* @param getRevenue - The getRevenue object.
|
|
489
|
+
* @param getRevenue.index - Index name.
|
|
490
|
+
* @param getRevenue.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
491
|
+
* @param getRevenue.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
492
|
+
* @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/).
|
|
493
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
494
|
+
*/
|
|
495
|
+
getRevenue({ index, startDate, endDate, tags }, requestOptions) {
|
|
496
|
+
if (!index) {
|
|
497
|
+
throw new Error('Parameter `index` is required when calling `getRevenue`.');
|
|
498
|
+
}
|
|
499
|
+
const requestPath = '/2/conversions/revenue';
|
|
500
|
+
const headers = {};
|
|
501
|
+
const queryParameters = {};
|
|
502
|
+
if (index !== undefined) {
|
|
503
|
+
queryParameters.index = index.toString();
|
|
504
|
+
}
|
|
505
|
+
if (startDate !== undefined) {
|
|
506
|
+
queryParameters.startDate = startDate.toString();
|
|
507
|
+
}
|
|
508
|
+
if (endDate !== undefined) {
|
|
509
|
+
queryParameters.endDate = endDate.toString();
|
|
510
|
+
}
|
|
511
|
+
if (tags !== undefined) {
|
|
512
|
+
queryParameters.tags = tags.toString();
|
|
513
|
+
}
|
|
514
|
+
const request = {
|
|
515
|
+
method: 'GET',
|
|
516
|
+
path: requestPath,
|
|
517
|
+
queryParameters,
|
|
518
|
+
headers,
|
|
519
|
+
};
|
|
520
|
+
return transporter.request(request, requestOptions);
|
|
521
|
+
},
|
|
522
|
+
/**
|
|
523
|
+
* 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.
|
|
404
524
|
*
|
|
405
525
|
* Required API Key ACLs:
|
|
406
526
|
* - analytics.
|
|
@@ -409,7 +529,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
409
529
|
* @param getSearchesCount.index - Index name.
|
|
410
530
|
* @param getSearchesCount.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
411
531
|
* @param getSearchesCount.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
412
|
-
* @param getSearchesCount.tags -
|
|
532
|
+
* @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/).
|
|
413
533
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
414
534
|
*/
|
|
415
535
|
getSearchesCount({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -440,7 +560,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
440
560
|
return transporter.request(request, requestOptions);
|
|
441
561
|
},
|
|
442
562
|
/**
|
|
443
|
-
*
|
|
563
|
+
* Retrieves the most popular searches that didn\'t lead to any clicks, from the 1,000 most frequent searches.
|
|
444
564
|
*
|
|
445
565
|
* Required API Key ACLs:
|
|
446
566
|
* - analytics.
|
|
@@ -451,7 +571,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
451
571
|
* @param getSearchesNoClicks.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
452
572
|
* @param getSearchesNoClicks.limit - Number of items to return.
|
|
453
573
|
* @param getSearchesNoClicks.offset - Position of the first item to return.
|
|
454
|
-
* @param getSearchesNoClicks.tags -
|
|
574
|
+
* @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/).
|
|
455
575
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
456
576
|
*/
|
|
457
577
|
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -488,7 +608,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
488
608
|
return transporter.request(request, requestOptions);
|
|
489
609
|
},
|
|
490
610
|
/**
|
|
491
|
-
*
|
|
611
|
+
* Retrieves the most popular searches that didn\'t return any results.
|
|
492
612
|
*
|
|
493
613
|
* Required API Key ACLs:
|
|
494
614
|
* - analytics.
|
|
@@ -499,7 +619,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
499
619
|
* @param getSearchesNoResults.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
500
620
|
* @param getSearchesNoResults.limit - Number of items to return.
|
|
501
621
|
* @param getSearchesNoResults.offset - Position of the first item to return.
|
|
502
|
-
* @param getSearchesNoResults.tags -
|
|
622
|
+
* @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/).
|
|
503
623
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
504
624
|
*/
|
|
505
625
|
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -536,7 +656,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
536
656
|
return transporter.request(request, requestOptions);
|
|
537
657
|
},
|
|
538
658
|
/**
|
|
539
|
-
*
|
|
659
|
+
* Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.
|
|
540
660
|
*
|
|
541
661
|
* Required API Key ACLs:
|
|
542
662
|
* - analytics.
|
|
@@ -564,7 +684,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
564
684
|
return transporter.request(request, requestOptions);
|
|
565
685
|
},
|
|
566
686
|
/**
|
|
567
|
-
*
|
|
687
|
+
* Retrieves the countries with the most searches to your index.
|
|
568
688
|
*
|
|
569
689
|
* Required API Key ACLs:
|
|
570
690
|
* - analytics.
|
|
@@ -575,7 +695,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
575
695
|
* @param getTopCountries.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
576
696
|
* @param getTopCountries.limit - Number of items to return.
|
|
577
697
|
* @param getTopCountries.offset - Position of the first item to return.
|
|
578
|
-
* @param getTopCountries.tags -
|
|
698
|
+
* @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/).
|
|
579
699
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
580
700
|
*/
|
|
581
701
|
getTopCountries({ index, startDate, endDate, limit, offset, tags }, requestOptions) {
|
|
@@ -612,19 +732,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
612
732
|
return transporter.request(request, requestOptions);
|
|
613
733
|
},
|
|
614
734
|
/**
|
|
615
|
-
*
|
|
735
|
+
* Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
616
736
|
*
|
|
617
737
|
* Required API Key ACLs:
|
|
618
738
|
* - analytics.
|
|
619
739
|
*
|
|
620
740
|
* @param getTopFilterAttributes - The getTopFilterAttributes object.
|
|
621
741
|
* @param getTopFilterAttributes.index - Index name.
|
|
622
|
-
* @param getTopFilterAttributes.search -
|
|
742
|
+
* @param getTopFilterAttributes.search - Search query.
|
|
623
743
|
* @param getTopFilterAttributes.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
624
744
|
* @param getTopFilterAttributes.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
625
745
|
* @param getTopFilterAttributes.limit - Number of items to return.
|
|
626
746
|
* @param getTopFilterAttributes.offset - Position of the first item to return.
|
|
627
|
-
* @param getTopFilterAttributes.tags -
|
|
747
|
+
* @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/).
|
|
628
748
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
629
749
|
*/
|
|
630
750
|
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -664,7 +784,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
664
784
|
return transporter.request(request, requestOptions);
|
|
665
785
|
},
|
|
666
786
|
/**
|
|
667
|
-
*
|
|
787
|
+
* Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
668
788
|
*
|
|
669
789
|
* Required API Key ACLs:
|
|
670
790
|
* - analytics.
|
|
@@ -672,12 +792,12 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
672
792
|
* @param getTopFilterForAttribute - The getTopFilterForAttribute object.
|
|
673
793
|
* @param getTopFilterForAttribute.attribute - Attribute name.
|
|
674
794
|
* @param getTopFilterForAttribute.index - Index name.
|
|
675
|
-
* @param getTopFilterForAttribute.search -
|
|
795
|
+
* @param getTopFilterForAttribute.search - Search query.
|
|
676
796
|
* @param getTopFilterForAttribute.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
677
797
|
* @param getTopFilterForAttribute.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
678
798
|
* @param getTopFilterForAttribute.limit - Number of items to return.
|
|
679
799
|
* @param getTopFilterForAttribute.offset - Position of the first item to return.
|
|
680
|
-
* @param getTopFilterForAttribute.tags -
|
|
800
|
+
* @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/).
|
|
681
801
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
682
802
|
*/
|
|
683
803
|
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -720,19 +840,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
720
840
|
return transporter.request(request, requestOptions);
|
|
721
841
|
},
|
|
722
842
|
/**
|
|
723
|
-
*
|
|
843
|
+
* 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.
|
|
724
844
|
*
|
|
725
845
|
* Required API Key ACLs:
|
|
726
846
|
* - analytics.
|
|
727
847
|
*
|
|
728
848
|
* @param getTopFiltersNoResults - The getTopFiltersNoResults object.
|
|
729
849
|
* @param getTopFiltersNoResults.index - Index name.
|
|
730
|
-
* @param getTopFiltersNoResults.search -
|
|
850
|
+
* @param getTopFiltersNoResults.search - Search query.
|
|
731
851
|
* @param getTopFiltersNoResults.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
732
852
|
* @param getTopFiltersNoResults.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
733
853
|
* @param getTopFiltersNoResults.limit - Number of items to return.
|
|
734
854
|
* @param getTopFiltersNoResults.offset - Position of the first item to return.
|
|
735
|
-
* @param getTopFiltersNoResults.tags -
|
|
855
|
+
* @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/).
|
|
736
856
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
737
857
|
*/
|
|
738
858
|
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -772,23 +892,24 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
772
892
|
return transporter.request(request, requestOptions);
|
|
773
893
|
},
|
|
774
894
|
/**
|
|
775
|
-
*
|
|
895
|
+
* Retrieves the object IDs of the most frequent search results.
|
|
776
896
|
*
|
|
777
897
|
* Required API Key ACLs:
|
|
778
898
|
* - analytics.
|
|
779
899
|
*
|
|
780
900
|
* @param getTopHits - The getTopHits object.
|
|
781
901
|
* @param getTopHits.index - Index name.
|
|
782
|
-
* @param getTopHits.search -
|
|
783
|
-
* @param getTopHits.clickAnalytics - Whether to include
|
|
902
|
+
* @param getTopHits.search - Search query.
|
|
903
|
+
* @param getTopHits.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
904
|
+
* @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.
|
|
784
905
|
* @param getTopHits.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
785
906
|
* @param getTopHits.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
786
907
|
* @param getTopHits.limit - Number of items to return.
|
|
787
908
|
* @param getTopHits.offset - Position of the first item to return.
|
|
788
|
-
* @param getTopHits.tags -
|
|
909
|
+
* @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/).
|
|
789
910
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
790
911
|
*/
|
|
791
|
-
getTopHits({ index, search, clickAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
912
|
+
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
792
913
|
if (!index) {
|
|
793
914
|
throw new Error('Parameter `index` is required when calling `getTopHits`.');
|
|
794
915
|
}
|
|
@@ -804,6 +925,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
804
925
|
if (clickAnalytics !== undefined) {
|
|
805
926
|
queryParameters.clickAnalytics = clickAnalytics.toString();
|
|
806
927
|
}
|
|
928
|
+
if (revenueAnalytics !== undefined) {
|
|
929
|
+
queryParameters.revenueAnalytics = revenueAnalytics.toString();
|
|
930
|
+
}
|
|
807
931
|
if (startDate !== undefined) {
|
|
808
932
|
queryParameters.startDate = startDate.toString();
|
|
809
933
|
}
|
|
@@ -828,24 +952,25 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
828
952
|
return transporter.request(request, requestOptions);
|
|
829
953
|
},
|
|
830
954
|
/**
|
|
831
|
-
* Returns the most popular
|
|
955
|
+
* Returns the most popular search terms.
|
|
832
956
|
*
|
|
833
957
|
* Required API Key ACLs:
|
|
834
958
|
* - analytics.
|
|
835
959
|
*
|
|
836
960
|
* @param getTopSearches - The getTopSearches object.
|
|
837
961
|
* @param getTopSearches.index - Index name.
|
|
838
|
-
* @param getTopSearches.clickAnalytics - Whether to include
|
|
962
|
+
* @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
963
|
+
* @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.
|
|
839
964
|
* @param getTopSearches.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
840
965
|
* @param getTopSearches.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
841
|
-
* @param getTopSearches.orderBy -
|
|
966
|
+
* @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
|
|
842
967
|
* @param getTopSearches.direction - Sorting direction of the results: ascending or descending.
|
|
843
968
|
* @param getTopSearches.limit - Number of items to return.
|
|
844
969
|
* @param getTopSearches.offset - Position of the first item to return.
|
|
845
|
-
* @param getTopSearches.tags -
|
|
970
|
+
* @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/).
|
|
846
971
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
847
972
|
*/
|
|
848
|
-
getTopSearches({ index, clickAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
|
|
973
|
+
getTopSearches({ index, clickAnalytics, revenueAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
|
|
849
974
|
if (!index) {
|
|
850
975
|
throw new Error('Parameter `index` is required when calling `getTopSearches`.');
|
|
851
976
|
}
|
|
@@ -858,6 +983,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
858
983
|
if (clickAnalytics !== undefined) {
|
|
859
984
|
queryParameters.clickAnalytics = clickAnalytics.toString();
|
|
860
985
|
}
|
|
986
|
+
if (revenueAnalytics !== undefined) {
|
|
987
|
+
queryParameters.revenueAnalytics = revenueAnalytics.toString();
|
|
988
|
+
}
|
|
861
989
|
if (startDate !== undefined) {
|
|
862
990
|
queryParameters.startDate = startDate.toString();
|
|
863
991
|
}
|
|
@@ -888,7 +1016,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
888
1016
|
return transporter.request(request, requestOptions);
|
|
889
1017
|
},
|
|
890
1018
|
/**
|
|
891
|
-
*
|
|
1019
|
+
* 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.
|
|
892
1020
|
*
|
|
893
1021
|
* Required API Key ACLs:
|
|
894
1022
|
* - analytics.
|
|
@@ -897,7 +1025,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
897
1025
|
* @param getUsersCount.index - Index name.
|
|
898
1026
|
* @param getUsersCount.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
899
1027
|
* @param getUsersCount.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
900
|
-
* @param getUsersCount.tags -
|
|
1028
|
+
* @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/).
|
|
901
1029
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
902
1030
|
*/
|
|
903
1031
|
getUsersCount({ index, startDate, endDate, tags }, requestOptions) {
|