@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
|
@@ -2,7 +2,7 @@ import { createAuth, createTransporter, getAlgoliaAgent, DEFAULT_CONNECT_TIMEOUT
|
|
|
2
2
|
import { createHttpRequester } from '@algolia/requester-node-http';
|
|
3
3
|
|
|
4
4
|
// 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.
|
|
5
|
-
const apiClientVersion = '5.0.0-alpha.
|
|
5
|
+
const apiClientVersion = '5.0.0-alpha.109';
|
|
6
6
|
const REGIONS = ['de', 'us'];
|
|
7
7
|
function getDefaultHosts(region) {
|
|
8
8
|
const url = !region
|
|
@@ -73,7 +73,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
73
73
|
if (!path) {
|
|
74
74
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
75
75
|
}
|
|
76
|
-
const requestPath = '/
|
|
76
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
77
77
|
const headers = {};
|
|
78
78
|
const queryParameters = parameters ? parameters : {};
|
|
79
79
|
const request = {
|
|
@@ -96,7 +96,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
96
96
|
if (!path) {
|
|
97
97
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
98
98
|
}
|
|
99
|
-
const requestPath = '/
|
|
99
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
100
100
|
const headers = {};
|
|
101
101
|
const queryParameters = parameters ? parameters : {};
|
|
102
102
|
const request = {
|
|
@@ -120,7 +120,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
120
120
|
if (!path) {
|
|
121
121
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
122
122
|
}
|
|
123
|
-
const requestPath = '/
|
|
123
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
124
124
|
const headers = {};
|
|
125
125
|
const queryParameters = parameters ? parameters : {};
|
|
126
126
|
const request = {
|
|
@@ -145,7 +145,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
145
145
|
if (!path) {
|
|
146
146
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
147
147
|
}
|
|
148
|
-
const requestPath = '/
|
|
148
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
149
149
|
const headers = {};
|
|
150
150
|
const queryParameters = parameters ? parameters : {};
|
|
151
151
|
const request = {
|
|
@@ -158,7 +158,47 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
158
158
|
return transporter.request(request, requestOptions);
|
|
159
159
|
},
|
|
160
160
|
/**
|
|
161
|
-
*
|
|
161
|
+
* 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.
|
|
162
|
+
*
|
|
163
|
+
* Required API Key ACLs:
|
|
164
|
+
* - analytics.
|
|
165
|
+
*
|
|
166
|
+
* @param getAddToCartRate - The getAddToCartRate object.
|
|
167
|
+
* @param getAddToCartRate.index - Index name.
|
|
168
|
+
* @param getAddToCartRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
169
|
+
* @param getAddToCartRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
170
|
+
* @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/).
|
|
171
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
172
|
+
*/
|
|
173
|
+
getAddToCartRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
174
|
+
if (!index) {
|
|
175
|
+
throw new Error('Parameter `index` is required when calling `getAddToCartRate`.');
|
|
176
|
+
}
|
|
177
|
+
const requestPath = '/2/conversions/addToCartRate';
|
|
178
|
+
const headers = {};
|
|
179
|
+
const queryParameters = {};
|
|
180
|
+
if (index !== undefined) {
|
|
181
|
+
queryParameters.index = index.toString();
|
|
182
|
+
}
|
|
183
|
+
if (startDate !== undefined) {
|
|
184
|
+
queryParameters.startDate = startDate.toString();
|
|
185
|
+
}
|
|
186
|
+
if (endDate !== undefined) {
|
|
187
|
+
queryParameters.endDate = endDate.toString();
|
|
188
|
+
}
|
|
189
|
+
if (tags !== undefined) {
|
|
190
|
+
queryParameters.tags = tags.toString();
|
|
191
|
+
}
|
|
192
|
+
const request = {
|
|
193
|
+
method: 'GET',
|
|
194
|
+
path: requestPath,
|
|
195
|
+
queryParameters,
|
|
196
|
+
headers,
|
|
197
|
+
};
|
|
198
|
+
return transporter.request(request, requestOptions);
|
|
199
|
+
},
|
|
200
|
+
/**
|
|
201
|
+
* 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.
|
|
162
202
|
*
|
|
163
203
|
* Required API Key ACLs:
|
|
164
204
|
* - analytics.
|
|
@@ -167,7 +207,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
167
207
|
* @param getAverageClickPosition.index - Index name.
|
|
168
208
|
* @param getAverageClickPosition.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
169
209
|
* @param getAverageClickPosition.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
170
|
-
* @param getAverageClickPosition.tags -
|
|
210
|
+
* @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/).
|
|
171
211
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
172
212
|
*/
|
|
173
213
|
getAverageClickPosition({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -198,7 +238,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
198
238
|
return transporter.request(request, requestOptions);
|
|
199
239
|
},
|
|
200
240
|
/**
|
|
201
|
-
*
|
|
241
|
+
* 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.
|
|
202
242
|
*
|
|
203
243
|
* Required API Key ACLs:
|
|
204
244
|
* - analytics.
|
|
@@ -207,7 +247,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
207
247
|
* @param getClickPositions.index - Index name.
|
|
208
248
|
* @param getClickPositions.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
209
249
|
* @param getClickPositions.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
210
|
-
* @param getClickPositions.tags -
|
|
250
|
+
* @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/).
|
|
211
251
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
212
252
|
*/
|
|
213
253
|
getClickPositions({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -238,7 +278,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
238
278
|
return transporter.request(request, requestOptions);
|
|
239
279
|
},
|
|
240
280
|
/**
|
|
241
|
-
*
|
|
281
|
+
* 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.
|
|
242
282
|
*
|
|
243
283
|
* Required API Key ACLs:
|
|
244
284
|
* - analytics.
|
|
@@ -247,7 +287,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
247
287
|
* @param getClickThroughRate.index - Index name.
|
|
248
288
|
* @param getClickThroughRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
249
289
|
* @param getClickThroughRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
250
|
-
* @param getClickThroughRate.tags -
|
|
290
|
+
* @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/).
|
|
251
291
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
252
292
|
*/
|
|
253
293
|
getClickThroughRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -278,21 +318,21 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
278
318
|
return transporter.request(request, requestOptions);
|
|
279
319
|
},
|
|
280
320
|
/**
|
|
281
|
-
*
|
|
321
|
+
* 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.
|
|
282
322
|
*
|
|
283
323
|
* Required API Key ACLs:
|
|
284
324
|
* - analytics.
|
|
285
325
|
*
|
|
286
|
-
* @param
|
|
287
|
-
* @param
|
|
288
|
-
* @param
|
|
289
|
-
* @param
|
|
290
|
-
* @param
|
|
326
|
+
* @param getConversionRate - The getConversionRate object.
|
|
327
|
+
* @param getConversionRate.index - Index name.
|
|
328
|
+
* @param getConversionRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
329
|
+
* @param getConversionRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
330
|
+
* @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/).
|
|
291
331
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
292
332
|
*/
|
|
293
|
-
|
|
333
|
+
getConversionRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
294
334
|
if (!index) {
|
|
295
|
-
throw new Error('Parameter `index` is required when calling `
|
|
335
|
+
throw new Error('Parameter `index` is required when calling `getConversionRate`.');
|
|
296
336
|
}
|
|
297
337
|
const requestPath = '/2/conversions/conversionRate';
|
|
298
338
|
const headers = {};
|
|
@@ -318,7 +358,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
318
358
|
return transporter.request(request, requestOptions);
|
|
319
359
|
},
|
|
320
360
|
/**
|
|
321
|
-
*
|
|
361
|
+
* 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.
|
|
322
362
|
*
|
|
323
363
|
* Required API Key ACLs:
|
|
324
364
|
* - analytics.
|
|
@@ -327,7 +367,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
327
367
|
* @param getNoClickRate.index - Index name.
|
|
328
368
|
* @param getNoClickRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
329
369
|
* @param getNoClickRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
330
|
-
* @param getNoClickRate.tags -
|
|
370
|
+
* @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/).
|
|
331
371
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
332
372
|
*/
|
|
333
373
|
getNoClickRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -358,7 +398,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
358
398
|
return transporter.request(request, requestOptions);
|
|
359
399
|
},
|
|
360
400
|
/**
|
|
361
|
-
*
|
|
401
|
+
* 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.
|
|
362
402
|
*
|
|
363
403
|
* Required API Key ACLs:
|
|
364
404
|
* - analytics.
|
|
@@ -367,7 +407,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
367
407
|
* @param getNoResultsRate.index - Index name.
|
|
368
408
|
* @param getNoResultsRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
369
409
|
* @param getNoResultsRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
370
|
-
* @param getNoResultsRate.tags -
|
|
410
|
+
* @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/).
|
|
371
411
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
372
412
|
*/
|
|
373
413
|
getNoResultsRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -398,7 +438,87 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
398
438
|
return transporter.request(request, requestOptions);
|
|
399
439
|
},
|
|
400
440
|
/**
|
|
401
|
-
*
|
|
441
|
+
* 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.
|
|
442
|
+
*
|
|
443
|
+
* Required API Key ACLs:
|
|
444
|
+
* - analytics.
|
|
445
|
+
*
|
|
446
|
+
* @param getPurchaseRate - The getPurchaseRate object.
|
|
447
|
+
* @param getPurchaseRate.index - Index name.
|
|
448
|
+
* @param getPurchaseRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
449
|
+
* @param getPurchaseRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
450
|
+
* @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/).
|
|
451
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
452
|
+
*/
|
|
453
|
+
getPurchaseRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
454
|
+
if (!index) {
|
|
455
|
+
throw new Error('Parameter `index` is required when calling `getPurchaseRate`.');
|
|
456
|
+
}
|
|
457
|
+
const requestPath = '/2/conversions/purchaseRate';
|
|
458
|
+
const headers = {};
|
|
459
|
+
const queryParameters = {};
|
|
460
|
+
if (index !== undefined) {
|
|
461
|
+
queryParameters.index = index.toString();
|
|
462
|
+
}
|
|
463
|
+
if (startDate !== undefined) {
|
|
464
|
+
queryParameters.startDate = startDate.toString();
|
|
465
|
+
}
|
|
466
|
+
if (endDate !== undefined) {
|
|
467
|
+
queryParameters.endDate = endDate.toString();
|
|
468
|
+
}
|
|
469
|
+
if (tags !== undefined) {
|
|
470
|
+
queryParameters.tags = tags.toString();
|
|
471
|
+
}
|
|
472
|
+
const request = {
|
|
473
|
+
method: 'GET',
|
|
474
|
+
path: requestPath,
|
|
475
|
+
queryParameters,
|
|
476
|
+
headers,
|
|
477
|
+
};
|
|
478
|
+
return transporter.request(request, requestOptions);
|
|
479
|
+
},
|
|
480
|
+
/**
|
|
481
|
+
* 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.
|
|
482
|
+
*
|
|
483
|
+
* Required API Key ACLs:
|
|
484
|
+
* - analytics.
|
|
485
|
+
*
|
|
486
|
+
* @param getRevenue - The getRevenue object.
|
|
487
|
+
* @param getRevenue.index - Index name.
|
|
488
|
+
* @param getRevenue.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
489
|
+
* @param getRevenue.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
490
|
+
* @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/).
|
|
491
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
492
|
+
*/
|
|
493
|
+
getRevenue({ index, startDate, endDate, tags }, requestOptions) {
|
|
494
|
+
if (!index) {
|
|
495
|
+
throw new Error('Parameter `index` is required when calling `getRevenue`.');
|
|
496
|
+
}
|
|
497
|
+
const requestPath = '/2/conversions/revenue';
|
|
498
|
+
const headers = {};
|
|
499
|
+
const queryParameters = {};
|
|
500
|
+
if (index !== undefined) {
|
|
501
|
+
queryParameters.index = index.toString();
|
|
502
|
+
}
|
|
503
|
+
if (startDate !== undefined) {
|
|
504
|
+
queryParameters.startDate = startDate.toString();
|
|
505
|
+
}
|
|
506
|
+
if (endDate !== undefined) {
|
|
507
|
+
queryParameters.endDate = endDate.toString();
|
|
508
|
+
}
|
|
509
|
+
if (tags !== undefined) {
|
|
510
|
+
queryParameters.tags = tags.toString();
|
|
511
|
+
}
|
|
512
|
+
const request = {
|
|
513
|
+
method: 'GET',
|
|
514
|
+
path: requestPath,
|
|
515
|
+
queryParameters,
|
|
516
|
+
headers,
|
|
517
|
+
};
|
|
518
|
+
return transporter.request(request, requestOptions);
|
|
519
|
+
},
|
|
520
|
+
/**
|
|
521
|
+
* 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.
|
|
402
522
|
*
|
|
403
523
|
* Required API Key ACLs:
|
|
404
524
|
* - analytics.
|
|
@@ -407,7 +527,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
407
527
|
* @param getSearchesCount.index - Index name.
|
|
408
528
|
* @param getSearchesCount.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
409
529
|
* @param getSearchesCount.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
410
|
-
* @param getSearchesCount.tags -
|
|
530
|
+
* @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/).
|
|
411
531
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
412
532
|
*/
|
|
413
533
|
getSearchesCount({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -438,7 +558,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
438
558
|
return transporter.request(request, requestOptions);
|
|
439
559
|
},
|
|
440
560
|
/**
|
|
441
|
-
*
|
|
561
|
+
* Retrieves the most popular searches that didn\'t lead to any clicks, from the 1,000 most frequent searches.
|
|
442
562
|
*
|
|
443
563
|
* Required API Key ACLs:
|
|
444
564
|
* - analytics.
|
|
@@ -449,7 +569,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
449
569
|
* @param getSearchesNoClicks.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
450
570
|
* @param getSearchesNoClicks.limit - Number of items to return.
|
|
451
571
|
* @param getSearchesNoClicks.offset - Position of the first item to return.
|
|
452
|
-
* @param getSearchesNoClicks.tags -
|
|
572
|
+
* @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/).
|
|
453
573
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
454
574
|
*/
|
|
455
575
|
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -486,7 +606,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
486
606
|
return transporter.request(request, requestOptions);
|
|
487
607
|
},
|
|
488
608
|
/**
|
|
489
|
-
*
|
|
609
|
+
* Retrieves the most popular searches that didn\'t return any results.
|
|
490
610
|
*
|
|
491
611
|
* Required API Key ACLs:
|
|
492
612
|
* - analytics.
|
|
@@ -497,7 +617,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
497
617
|
* @param getSearchesNoResults.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
498
618
|
* @param getSearchesNoResults.limit - Number of items to return.
|
|
499
619
|
* @param getSearchesNoResults.offset - Position of the first item to return.
|
|
500
|
-
* @param getSearchesNoResults.tags -
|
|
620
|
+
* @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/).
|
|
501
621
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
502
622
|
*/
|
|
503
623
|
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -534,7 +654,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
534
654
|
return transporter.request(request, requestOptions);
|
|
535
655
|
},
|
|
536
656
|
/**
|
|
537
|
-
*
|
|
657
|
+
* Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.
|
|
538
658
|
*
|
|
539
659
|
* Required API Key ACLs:
|
|
540
660
|
* - analytics.
|
|
@@ -562,7 +682,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
562
682
|
return transporter.request(request, requestOptions);
|
|
563
683
|
},
|
|
564
684
|
/**
|
|
565
|
-
*
|
|
685
|
+
* Retrieves the countries with the most searches to your index.
|
|
566
686
|
*
|
|
567
687
|
* Required API Key ACLs:
|
|
568
688
|
* - analytics.
|
|
@@ -573,7 +693,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
573
693
|
* @param getTopCountries.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
574
694
|
* @param getTopCountries.limit - Number of items to return.
|
|
575
695
|
* @param getTopCountries.offset - Position of the first item to return.
|
|
576
|
-
* @param getTopCountries.tags -
|
|
696
|
+
* @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/).
|
|
577
697
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
578
698
|
*/
|
|
579
699
|
getTopCountries({ index, startDate, endDate, limit, offset, tags }, requestOptions) {
|
|
@@ -610,19 +730,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
610
730
|
return transporter.request(request, requestOptions);
|
|
611
731
|
},
|
|
612
732
|
/**
|
|
613
|
-
*
|
|
733
|
+
* Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
614
734
|
*
|
|
615
735
|
* Required API Key ACLs:
|
|
616
736
|
* - analytics.
|
|
617
737
|
*
|
|
618
738
|
* @param getTopFilterAttributes - The getTopFilterAttributes object.
|
|
619
739
|
* @param getTopFilterAttributes.index - Index name.
|
|
620
|
-
* @param getTopFilterAttributes.search -
|
|
740
|
+
* @param getTopFilterAttributes.search - Search query.
|
|
621
741
|
* @param getTopFilterAttributes.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
622
742
|
* @param getTopFilterAttributes.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
623
743
|
* @param getTopFilterAttributes.limit - Number of items to return.
|
|
624
744
|
* @param getTopFilterAttributes.offset - Position of the first item to return.
|
|
625
|
-
* @param getTopFilterAttributes.tags -
|
|
745
|
+
* @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/).
|
|
626
746
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
627
747
|
*/
|
|
628
748
|
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -662,7 +782,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
662
782
|
return transporter.request(request, requestOptions);
|
|
663
783
|
},
|
|
664
784
|
/**
|
|
665
|
-
*
|
|
785
|
+
* Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
666
786
|
*
|
|
667
787
|
* Required API Key ACLs:
|
|
668
788
|
* - analytics.
|
|
@@ -670,12 +790,12 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
670
790
|
* @param getTopFilterForAttribute - The getTopFilterForAttribute object.
|
|
671
791
|
* @param getTopFilterForAttribute.attribute - Attribute name.
|
|
672
792
|
* @param getTopFilterForAttribute.index - Index name.
|
|
673
|
-
* @param getTopFilterForAttribute.search -
|
|
793
|
+
* @param getTopFilterForAttribute.search - Search query.
|
|
674
794
|
* @param getTopFilterForAttribute.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
675
795
|
* @param getTopFilterForAttribute.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
676
796
|
* @param getTopFilterForAttribute.limit - Number of items to return.
|
|
677
797
|
* @param getTopFilterForAttribute.offset - Position of the first item to return.
|
|
678
|
-
* @param getTopFilterForAttribute.tags -
|
|
798
|
+
* @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/).
|
|
679
799
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
680
800
|
*/
|
|
681
801
|
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -718,19 +838,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
718
838
|
return transporter.request(request, requestOptions);
|
|
719
839
|
},
|
|
720
840
|
/**
|
|
721
|
-
*
|
|
841
|
+
* 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.
|
|
722
842
|
*
|
|
723
843
|
* Required API Key ACLs:
|
|
724
844
|
* - analytics.
|
|
725
845
|
*
|
|
726
846
|
* @param getTopFiltersNoResults - The getTopFiltersNoResults object.
|
|
727
847
|
* @param getTopFiltersNoResults.index - Index name.
|
|
728
|
-
* @param getTopFiltersNoResults.search -
|
|
848
|
+
* @param getTopFiltersNoResults.search - Search query.
|
|
729
849
|
* @param getTopFiltersNoResults.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
730
850
|
* @param getTopFiltersNoResults.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
731
851
|
* @param getTopFiltersNoResults.limit - Number of items to return.
|
|
732
852
|
* @param getTopFiltersNoResults.offset - Position of the first item to return.
|
|
733
|
-
* @param getTopFiltersNoResults.tags -
|
|
853
|
+
* @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/).
|
|
734
854
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
735
855
|
*/
|
|
736
856
|
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -770,23 +890,24 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
770
890
|
return transporter.request(request, requestOptions);
|
|
771
891
|
},
|
|
772
892
|
/**
|
|
773
|
-
*
|
|
893
|
+
* Retrieves the object IDs of the most frequent search results.
|
|
774
894
|
*
|
|
775
895
|
* Required API Key ACLs:
|
|
776
896
|
* - analytics.
|
|
777
897
|
*
|
|
778
898
|
* @param getTopHits - The getTopHits object.
|
|
779
899
|
* @param getTopHits.index - Index name.
|
|
780
|
-
* @param getTopHits.search -
|
|
781
|
-
* @param getTopHits.clickAnalytics - Whether to include
|
|
900
|
+
* @param getTopHits.search - Search query.
|
|
901
|
+
* @param getTopHits.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
902
|
+
* @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.
|
|
782
903
|
* @param getTopHits.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
783
904
|
* @param getTopHits.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
784
905
|
* @param getTopHits.limit - Number of items to return.
|
|
785
906
|
* @param getTopHits.offset - Position of the first item to return.
|
|
786
|
-
* @param getTopHits.tags -
|
|
907
|
+
* @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/).
|
|
787
908
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
788
909
|
*/
|
|
789
|
-
getTopHits({ index, search, clickAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
910
|
+
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
790
911
|
if (!index) {
|
|
791
912
|
throw new Error('Parameter `index` is required when calling `getTopHits`.');
|
|
792
913
|
}
|
|
@@ -802,6 +923,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
802
923
|
if (clickAnalytics !== undefined) {
|
|
803
924
|
queryParameters.clickAnalytics = clickAnalytics.toString();
|
|
804
925
|
}
|
|
926
|
+
if (revenueAnalytics !== undefined) {
|
|
927
|
+
queryParameters.revenueAnalytics = revenueAnalytics.toString();
|
|
928
|
+
}
|
|
805
929
|
if (startDate !== undefined) {
|
|
806
930
|
queryParameters.startDate = startDate.toString();
|
|
807
931
|
}
|
|
@@ -826,24 +950,25 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
826
950
|
return transporter.request(request, requestOptions);
|
|
827
951
|
},
|
|
828
952
|
/**
|
|
829
|
-
* Returns the most popular
|
|
953
|
+
* Returns the most popular search terms.
|
|
830
954
|
*
|
|
831
955
|
* Required API Key ACLs:
|
|
832
956
|
* - analytics.
|
|
833
957
|
*
|
|
834
958
|
* @param getTopSearches - The getTopSearches object.
|
|
835
959
|
* @param getTopSearches.index - Index name.
|
|
836
|
-
* @param getTopSearches.clickAnalytics - Whether to include
|
|
960
|
+
* @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
961
|
+
* @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.
|
|
837
962
|
* @param getTopSearches.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
838
963
|
* @param getTopSearches.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
839
|
-
* @param getTopSearches.orderBy -
|
|
964
|
+
* @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
|
|
840
965
|
* @param getTopSearches.direction - Sorting direction of the results: ascending or descending.
|
|
841
966
|
* @param getTopSearches.limit - Number of items to return.
|
|
842
967
|
* @param getTopSearches.offset - Position of the first item to return.
|
|
843
|
-
* @param getTopSearches.tags -
|
|
968
|
+
* @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/).
|
|
844
969
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
845
970
|
*/
|
|
846
|
-
getTopSearches({ index, clickAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
|
|
971
|
+
getTopSearches({ index, clickAnalytics, revenueAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
|
|
847
972
|
if (!index) {
|
|
848
973
|
throw new Error('Parameter `index` is required when calling `getTopSearches`.');
|
|
849
974
|
}
|
|
@@ -856,6 +981,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
856
981
|
if (clickAnalytics !== undefined) {
|
|
857
982
|
queryParameters.clickAnalytics = clickAnalytics.toString();
|
|
858
983
|
}
|
|
984
|
+
if (revenueAnalytics !== undefined) {
|
|
985
|
+
queryParameters.revenueAnalytics = revenueAnalytics.toString();
|
|
986
|
+
}
|
|
859
987
|
if (startDate !== undefined) {
|
|
860
988
|
queryParameters.startDate = startDate.toString();
|
|
861
989
|
}
|
|
@@ -886,7 +1014,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
886
1014
|
return transporter.request(request, requestOptions);
|
|
887
1015
|
},
|
|
888
1016
|
/**
|
|
889
|
-
*
|
|
1017
|
+
* 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.
|
|
890
1018
|
*
|
|
891
1019
|
* Required API Key ACLs:
|
|
892
1020
|
* - analytics.
|
|
@@ -895,7 +1023,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
895
1023
|
* @param getUsersCount.index - Index name.
|
|
896
1024
|
* @param getUsersCount.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
897
1025
|
* @param getUsersCount.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
898
|
-
* @param getUsersCount.tags -
|
|
1026
|
+
* @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/).
|
|
899
1027
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
900
1028
|
*/
|
|
901
1029
|
getUsersCount({ index, startDate, endDate, tags }, requestOptions) {
|