@algolia/client-analytics 5.0.0-alpha.99 → 5.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builds/browser.d.ts +37 -3
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +37 -3
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/client-analytics.cjs +314 -153
- package/dist/client-analytics.esm.browser.js +300 -144
- package/dist/client-analytics.esm.node.js +314 -153
- 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 +161 -90
- 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 +7 -7
- 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 +3 -3
- 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 +211 -138
- package/dist/src/analyticsClient.d.ts.map +1 -1
- package/model/clickPositionsInner.ts +16 -0
- package/model/clientMethodProps.ts +164 -90
- 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} +4 -4
- 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 +7 -7
- 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 +3 -3
- 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-
|
|
5
|
+
const apiClientVersion = '5.0.0-beta.1';
|
|
6
6
|
const REGIONS = ['de', 'us'];
|
|
7
7
|
function getDefaultHosts(region) {
|
|
8
8
|
const url = !region
|
|
@@ -64,7 +64,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
64
64
|
/**
|
|
65
65
|
* This method allow you to send requests to the Algolia REST API.
|
|
66
66
|
*
|
|
67
|
-
* @summary Send requests to the Algolia REST API.
|
|
68
67
|
* @param customDelete - The customDelete object.
|
|
69
68
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
70
69
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -74,7 +73,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
74
73
|
if (!path) {
|
|
75
74
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
76
75
|
}
|
|
77
|
-
const requestPath = '/
|
|
76
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
78
77
|
const headers = {};
|
|
79
78
|
const queryParameters = parameters ? parameters : {};
|
|
80
79
|
const request = {
|
|
@@ -88,7 +87,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
88
87
|
/**
|
|
89
88
|
* This method allow you to send requests to the Algolia REST API.
|
|
90
89
|
*
|
|
91
|
-
* @summary Send requests to the Algolia REST API.
|
|
92
90
|
* @param customGet - The customGet object.
|
|
93
91
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
94
92
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -98,7 +96,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
98
96
|
if (!path) {
|
|
99
97
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
100
98
|
}
|
|
101
|
-
const requestPath = '/
|
|
99
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
102
100
|
const headers = {};
|
|
103
101
|
const queryParameters = parameters ? parameters : {};
|
|
104
102
|
const request = {
|
|
@@ -112,7 +110,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
112
110
|
/**
|
|
113
111
|
* This method allow you to send requests to the Algolia REST API.
|
|
114
112
|
*
|
|
115
|
-
* @summary Send requests to the Algolia REST API.
|
|
116
113
|
* @param customPost - The customPost object.
|
|
117
114
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
118
115
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -123,7 +120,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
123
120
|
if (!path) {
|
|
124
121
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
125
122
|
}
|
|
126
|
-
const requestPath = '/
|
|
123
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
127
124
|
const headers = {};
|
|
128
125
|
const queryParameters = parameters ? parameters : {};
|
|
129
126
|
const request = {
|
|
@@ -138,7 +135,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
138
135
|
/**
|
|
139
136
|
* This method allow you to send requests to the Algolia REST API.
|
|
140
137
|
*
|
|
141
|
-
* @summary Send requests to the Algolia REST API.
|
|
142
138
|
* @param customPut - The customPut object.
|
|
143
139
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
144
140
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -149,7 +145,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
149
145
|
if (!path) {
|
|
150
146
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
151
147
|
}
|
|
152
|
-
const requestPath = '/
|
|
148
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
153
149
|
const headers = {};
|
|
154
150
|
const queryParameters = parameters ? parameters : {};
|
|
155
151
|
const request = {
|
|
@@ -162,14 +158,56 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
162
158
|
return transporter.request(request, requestOptions);
|
|
163
159
|
},
|
|
164
160
|
/**
|
|
165
|
-
*
|
|
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 of the period to analyze, in `YYYY-MM-DD` format.
|
|
169
|
+
* @param getAddToCartRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
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.
|
|
202
|
+
*
|
|
203
|
+
* Required API Key ACLs:
|
|
204
|
+
* - analytics.
|
|
166
205
|
*
|
|
167
|
-
* @summary Get average click position.
|
|
168
206
|
* @param getAverageClickPosition - The getAverageClickPosition object.
|
|
169
|
-
* @param getAverageClickPosition.index - Index name
|
|
170
|
-
* @param getAverageClickPosition.startDate - Start date
|
|
171
|
-
* @param getAverageClickPosition.endDate - End date
|
|
172
|
-
* @param getAverageClickPosition.tags -
|
|
207
|
+
* @param getAverageClickPosition.index - Index name.
|
|
208
|
+
* @param getAverageClickPosition.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
209
|
+
* @param getAverageClickPosition.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
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/).
|
|
173
211
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
174
212
|
*/
|
|
175
213
|
getAverageClickPosition({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -200,14 +238,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
200
238
|
return transporter.request(request, requestOptions);
|
|
201
239
|
},
|
|
202
240
|
/**
|
|
203
|
-
*
|
|
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.
|
|
242
|
+
*
|
|
243
|
+
* Required API Key ACLs:
|
|
244
|
+
* - analytics.
|
|
204
245
|
*
|
|
205
|
-
* @summary Get click positions.
|
|
206
246
|
* @param getClickPositions - The getClickPositions object.
|
|
207
|
-
* @param getClickPositions.index - Index name
|
|
208
|
-
* @param getClickPositions.startDate - Start date
|
|
209
|
-
* @param getClickPositions.endDate - End date
|
|
210
|
-
* @param getClickPositions.tags -
|
|
247
|
+
* @param getClickPositions.index - Index name.
|
|
248
|
+
* @param getClickPositions.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
249
|
+
* @param getClickPositions.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
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,14 +278,16 @@ 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.
|
|
282
|
+
*
|
|
283
|
+
* Required API Key ACLs:
|
|
284
|
+
* - analytics.
|
|
242
285
|
*
|
|
243
|
-
* @summary Get click-through rate (CTR).
|
|
244
286
|
* @param getClickThroughRate - The getClickThroughRate object.
|
|
245
|
-
* @param getClickThroughRate.index - Index name
|
|
246
|
-
* @param getClickThroughRate.startDate - Start date
|
|
247
|
-
* @param getClickThroughRate.endDate - End date
|
|
248
|
-
* @param getClickThroughRate.tags -
|
|
287
|
+
* @param getClickThroughRate.index - Index name.
|
|
288
|
+
* @param getClickThroughRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
289
|
+
* @param getClickThroughRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
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/).
|
|
249
291
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
250
292
|
*/
|
|
251
293
|
getClickThroughRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -276,19 +318,21 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
276
318
|
return transporter.request(request, requestOptions);
|
|
277
319
|
},
|
|
278
320
|
/**
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
* @param
|
|
285
|
-
* @param
|
|
286
|
-
* @param
|
|
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.
|
|
322
|
+
*
|
|
323
|
+
* Required API Key ACLs:
|
|
324
|
+
* - analytics.
|
|
325
|
+
*
|
|
326
|
+
* @param getConversionRate - The getConversionRate object.
|
|
327
|
+
* @param getConversionRate.index - Index name.
|
|
328
|
+
* @param getConversionRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
329
|
+
* @param getConversionRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
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/).
|
|
287
331
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
288
332
|
*/
|
|
289
|
-
|
|
333
|
+
getConversionRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
290
334
|
if (!index) {
|
|
291
|
-
throw new Error('Parameter `index` is required when calling `
|
|
335
|
+
throw new Error('Parameter `index` is required when calling `getConversionRate`.');
|
|
292
336
|
}
|
|
293
337
|
const requestPath = '/2/conversions/conversionRate';
|
|
294
338
|
const headers = {};
|
|
@@ -314,14 +358,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
314
358
|
return transporter.request(request, requestOptions);
|
|
315
359
|
},
|
|
316
360
|
/**
|
|
317
|
-
*
|
|
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.
|
|
362
|
+
*
|
|
363
|
+
* Required API Key ACLs:
|
|
364
|
+
* - analytics.
|
|
318
365
|
*
|
|
319
|
-
* @summary Get no click rate.
|
|
320
366
|
* @param getNoClickRate - The getNoClickRate object.
|
|
321
|
-
* @param getNoClickRate.index - Index name
|
|
322
|
-
* @param getNoClickRate.startDate - Start date
|
|
323
|
-
* @param getNoClickRate.endDate - End date
|
|
324
|
-
* @param getNoClickRate.tags -
|
|
367
|
+
* @param getNoClickRate.index - Index name.
|
|
368
|
+
* @param getNoClickRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
369
|
+
* @param getNoClickRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
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/).
|
|
325
371
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
326
372
|
*/
|
|
327
373
|
getNoClickRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -352,14 +398,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
352
398
|
return transporter.request(request, requestOptions);
|
|
353
399
|
},
|
|
354
400
|
/**
|
|
355
|
-
*
|
|
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.
|
|
402
|
+
*
|
|
403
|
+
* Required API Key ACLs:
|
|
404
|
+
* - analytics.
|
|
356
405
|
*
|
|
357
|
-
* @summary Get no results rate.
|
|
358
406
|
* @param getNoResultsRate - The getNoResultsRate object.
|
|
359
|
-
* @param getNoResultsRate.index - Index name
|
|
360
|
-
* @param getNoResultsRate.startDate - Start date
|
|
361
|
-
* @param getNoResultsRate.endDate - End date
|
|
362
|
-
* @param getNoResultsRate.tags -
|
|
407
|
+
* @param getNoResultsRate.index - Index name.
|
|
408
|
+
* @param getNoResultsRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
409
|
+
* @param getNoResultsRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
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/).
|
|
363
411
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
364
412
|
*/
|
|
365
413
|
getNoResultsRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -390,14 +438,96 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
390
438
|
return transporter.request(request, requestOptions);
|
|
391
439
|
},
|
|
392
440
|
/**
|
|
393
|
-
*
|
|
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 of the period to analyze, in `YYYY-MM-DD` format.
|
|
449
|
+
* @param getPurchaseRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
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 of the period to analyze, in `YYYY-MM-DD` format.
|
|
489
|
+
* @param getRevenue.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
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.
|
|
522
|
+
*
|
|
523
|
+
* Required API Key ACLs:
|
|
524
|
+
* - analytics.
|
|
394
525
|
*
|
|
395
|
-
* @summary Get number of searches.
|
|
396
526
|
* @param getSearchesCount - The getSearchesCount object.
|
|
397
|
-
* @param getSearchesCount.index - Index name
|
|
398
|
-
* @param getSearchesCount.startDate - Start date
|
|
399
|
-
* @param getSearchesCount.endDate - End date
|
|
400
|
-
* @param getSearchesCount.tags -
|
|
527
|
+
* @param getSearchesCount.index - Index name.
|
|
528
|
+
* @param getSearchesCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
529
|
+
* @param getSearchesCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
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/).
|
|
401
531
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
402
532
|
*/
|
|
403
533
|
getSearchesCount({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -428,16 +558,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
428
558
|
return transporter.request(request, requestOptions);
|
|
429
559
|
},
|
|
430
560
|
/**
|
|
431
|
-
*
|
|
561
|
+
* Retrieves the most popular searches that didn\'t lead to any clicks, from the 1,000 most frequent searches.
|
|
562
|
+
*
|
|
563
|
+
* Required API Key ACLs:
|
|
564
|
+
* - analytics.
|
|
432
565
|
*
|
|
433
|
-
* @summary Get top searches with no clicks.
|
|
434
566
|
* @param getSearchesNoClicks - The getSearchesNoClicks object.
|
|
435
|
-
* @param getSearchesNoClicks.index - Index name
|
|
436
|
-
* @param getSearchesNoClicks.startDate - Start date
|
|
437
|
-
* @param getSearchesNoClicks.endDate - End date
|
|
438
|
-
* @param getSearchesNoClicks.limit - Number of
|
|
439
|
-
* @param getSearchesNoClicks.offset - Position of the
|
|
440
|
-
* @param getSearchesNoClicks.tags -
|
|
567
|
+
* @param getSearchesNoClicks.index - Index name.
|
|
568
|
+
* @param getSearchesNoClicks.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
569
|
+
* @param getSearchesNoClicks.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
570
|
+
* @param getSearchesNoClicks.limit - Number of items to return.
|
|
571
|
+
* @param getSearchesNoClicks.offset - Position of the first item to return.
|
|
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/).
|
|
441
573
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
442
574
|
*/
|
|
443
575
|
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -474,16 +606,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
474
606
|
return transporter.request(request, requestOptions);
|
|
475
607
|
},
|
|
476
608
|
/**
|
|
477
|
-
*
|
|
609
|
+
* Retrieves the most popular searches that didn\'t return any results.
|
|
610
|
+
*
|
|
611
|
+
* Required API Key ACLs:
|
|
612
|
+
* - analytics.
|
|
478
613
|
*
|
|
479
|
-
* @summary Get top searches with no results.
|
|
480
614
|
* @param getSearchesNoResults - The getSearchesNoResults object.
|
|
481
|
-
* @param getSearchesNoResults.index - Index name
|
|
482
|
-
* @param getSearchesNoResults.startDate - Start date
|
|
483
|
-
* @param getSearchesNoResults.endDate - End date
|
|
484
|
-
* @param getSearchesNoResults.limit - Number of
|
|
485
|
-
* @param getSearchesNoResults.offset - Position of the
|
|
486
|
-
* @param getSearchesNoResults.tags -
|
|
615
|
+
* @param getSearchesNoResults.index - Index name.
|
|
616
|
+
* @param getSearchesNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
617
|
+
* @param getSearchesNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
618
|
+
* @param getSearchesNoResults.limit - Number of items to return.
|
|
619
|
+
* @param getSearchesNoResults.offset - Position of the first item to return.
|
|
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/).
|
|
487
621
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
488
622
|
*/
|
|
489
623
|
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -520,11 +654,13 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
520
654
|
return transporter.request(request, requestOptions);
|
|
521
655
|
},
|
|
522
656
|
/**
|
|
523
|
-
*
|
|
657
|
+
* Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.
|
|
658
|
+
*
|
|
659
|
+
* Required API Key ACLs:
|
|
660
|
+
* - analytics.
|
|
524
661
|
*
|
|
525
|
-
* @summary Get Analytics API status.
|
|
526
662
|
* @param getStatus - The getStatus object.
|
|
527
|
-
* @param getStatus.index - Index name
|
|
663
|
+
* @param getStatus.index - Index name.
|
|
528
664
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
529
665
|
*/
|
|
530
666
|
getStatus({ index }, requestOptions) {
|
|
@@ -546,16 +682,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
546
682
|
return transporter.request(request, requestOptions);
|
|
547
683
|
},
|
|
548
684
|
/**
|
|
549
|
-
*
|
|
685
|
+
* Retrieves the countries with the most searches to your index.
|
|
686
|
+
*
|
|
687
|
+
* Required API Key ACLs:
|
|
688
|
+
* - analytics.
|
|
550
689
|
*
|
|
551
|
-
* @summary Get top countries.
|
|
552
690
|
* @param getTopCountries - The getTopCountries object.
|
|
553
|
-
* @param getTopCountries.index - Index name
|
|
554
|
-
* @param getTopCountries.startDate - Start date
|
|
555
|
-
* @param getTopCountries.endDate - End date
|
|
556
|
-
* @param getTopCountries.limit - Number of
|
|
557
|
-
* @param getTopCountries.offset - Position of the
|
|
558
|
-
* @param getTopCountries.tags -
|
|
691
|
+
* @param getTopCountries.index - Index name.
|
|
692
|
+
* @param getTopCountries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
693
|
+
* @param getTopCountries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
694
|
+
* @param getTopCountries.limit - Number of items to return.
|
|
695
|
+
* @param getTopCountries.offset - Position of the first item to return.
|
|
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/).
|
|
559
697
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
560
698
|
*/
|
|
561
699
|
getTopCountries({ index, startDate, endDate, limit, offset, tags }, requestOptions) {
|
|
@@ -592,17 +730,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
592
730
|
return transporter.request(request, requestOptions);
|
|
593
731
|
},
|
|
594
732
|
/**
|
|
595
|
-
*
|
|
733
|
+
* Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
734
|
+
*
|
|
735
|
+
* Required API Key ACLs:
|
|
736
|
+
* - analytics.
|
|
596
737
|
*
|
|
597
|
-
* @summary Get top filterable attributes.
|
|
598
738
|
* @param getTopFilterAttributes - The getTopFilterAttributes object.
|
|
599
|
-
* @param getTopFilterAttributes.index - Index name
|
|
600
|
-
* @param getTopFilterAttributes.search -
|
|
601
|
-
* @param getTopFilterAttributes.startDate - Start date
|
|
602
|
-
* @param getTopFilterAttributes.endDate - End date
|
|
603
|
-
* @param getTopFilterAttributes.limit - Number of
|
|
604
|
-
* @param getTopFilterAttributes.offset - Position of the
|
|
605
|
-
* @param getTopFilterAttributes.tags -
|
|
739
|
+
* @param getTopFilterAttributes.index - Index name.
|
|
740
|
+
* @param getTopFilterAttributes.search - Search query.
|
|
741
|
+
* @param getTopFilterAttributes.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
742
|
+
* @param getTopFilterAttributes.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
743
|
+
* @param getTopFilterAttributes.limit - Number of items to return.
|
|
744
|
+
* @param getTopFilterAttributes.offset - Position of the first item to return.
|
|
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/).
|
|
606
746
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
607
747
|
*/
|
|
608
748
|
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -642,18 +782,20 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
642
782
|
return transporter.request(request, requestOptions);
|
|
643
783
|
},
|
|
644
784
|
/**
|
|
645
|
-
*
|
|
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.
|
|
786
|
+
*
|
|
787
|
+
* Required API Key ACLs:
|
|
788
|
+
* - analytics.
|
|
646
789
|
*
|
|
647
|
-
* @summary Get top filter values for an attribute.
|
|
648
790
|
* @param getTopFilterForAttribute - The getTopFilterForAttribute object.
|
|
649
791
|
* @param getTopFilterForAttribute.attribute - Attribute name.
|
|
650
|
-
* @param getTopFilterForAttribute.index - Index name
|
|
651
|
-
* @param getTopFilterForAttribute.search -
|
|
652
|
-
* @param getTopFilterForAttribute.startDate - Start date
|
|
653
|
-
* @param getTopFilterForAttribute.endDate - End date
|
|
654
|
-
* @param getTopFilterForAttribute.limit - Number of
|
|
655
|
-
* @param getTopFilterForAttribute.offset - Position of the
|
|
656
|
-
* @param getTopFilterForAttribute.tags -
|
|
792
|
+
* @param getTopFilterForAttribute.index - Index name.
|
|
793
|
+
* @param getTopFilterForAttribute.search - Search query.
|
|
794
|
+
* @param getTopFilterForAttribute.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
795
|
+
* @param getTopFilterForAttribute.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
796
|
+
* @param getTopFilterForAttribute.limit - Number of items to return.
|
|
797
|
+
* @param getTopFilterForAttribute.offset - Position of the first item to return.
|
|
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/).
|
|
657
799
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
658
800
|
*/
|
|
659
801
|
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -696,17 +838,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
696
838
|
return transporter.request(request, requestOptions);
|
|
697
839
|
},
|
|
698
840
|
/**
|
|
699
|
-
*
|
|
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.
|
|
842
|
+
*
|
|
843
|
+
* Required API Key ACLs:
|
|
844
|
+
* - analytics.
|
|
700
845
|
*
|
|
701
|
-
* @summary Get top filters for a no result search.
|
|
702
846
|
* @param getTopFiltersNoResults - The getTopFiltersNoResults object.
|
|
703
|
-
* @param getTopFiltersNoResults.index - Index name
|
|
704
|
-
* @param getTopFiltersNoResults.search -
|
|
705
|
-
* @param getTopFiltersNoResults.startDate - Start date
|
|
706
|
-
* @param getTopFiltersNoResults.endDate - End date
|
|
707
|
-
* @param getTopFiltersNoResults.limit - Number of
|
|
708
|
-
* @param getTopFiltersNoResults.offset - Position of the
|
|
709
|
-
* @param getTopFiltersNoResults.tags -
|
|
847
|
+
* @param getTopFiltersNoResults.index - Index name.
|
|
848
|
+
* @param getTopFiltersNoResults.search - Search query.
|
|
849
|
+
* @param getTopFiltersNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
850
|
+
* @param getTopFiltersNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
851
|
+
* @param getTopFiltersNoResults.limit - Number of items to return.
|
|
852
|
+
* @param getTopFiltersNoResults.offset - Position of the first item to return.
|
|
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/).
|
|
710
854
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
711
855
|
*/
|
|
712
856
|
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -746,21 +890,24 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
746
890
|
return transporter.request(request, requestOptions);
|
|
747
891
|
},
|
|
748
892
|
/**
|
|
749
|
-
*
|
|
893
|
+
* Retrieves the object IDs of the most frequent search results.
|
|
894
|
+
*
|
|
895
|
+
* Required API Key ACLs:
|
|
896
|
+
* - analytics.
|
|
750
897
|
*
|
|
751
|
-
* @summary Get top hits.
|
|
752
898
|
* @param getTopHits - The getTopHits object.
|
|
753
|
-
* @param getTopHits.index - Index name
|
|
754
|
-
* @param getTopHits.search -
|
|
755
|
-
* @param getTopHits.clickAnalytics - Whether to include
|
|
756
|
-
* @param getTopHits.
|
|
757
|
-
* @param getTopHits.
|
|
758
|
-
* @param getTopHits.
|
|
759
|
-
* @param getTopHits.
|
|
760
|
-
* @param getTopHits.
|
|
899
|
+
* @param getTopHits.index - Index name.
|
|
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.
|
|
903
|
+
* @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
904
|
+
* @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
905
|
+
* @param getTopHits.limit - Number of items to return.
|
|
906
|
+
* @param getTopHits.offset - Position of the first item to return.
|
|
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/).
|
|
761
908
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
762
909
|
*/
|
|
763
|
-
getTopHits({ index, search, clickAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
910
|
+
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
764
911
|
if (!index) {
|
|
765
912
|
throw new Error('Parameter `index` is required when calling `getTopHits`.');
|
|
766
913
|
}
|
|
@@ -776,6 +923,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
776
923
|
if (clickAnalytics !== undefined) {
|
|
777
924
|
queryParameters.clickAnalytics = clickAnalytics.toString();
|
|
778
925
|
}
|
|
926
|
+
if (revenueAnalytics !== undefined) {
|
|
927
|
+
queryParameters.revenueAnalytics = revenueAnalytics.toString();
|
|
928
|
+
}
|
|
779
929
|
if (startDate !== undefined) {
|
|
780
930
|
queryParameters.startDate = startDate.toString();
|
|
781
931
|
}
|
|
@@ -800,22 +950,25 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
800
950
|
return transporter.request(request, requestOptions);
|
|
801
951
|
},
|
|
802
952
|
/**
|
|
803
|
-
* Returns the most popular
|
|
953
|
+
* Returns the most popular search terms.
|
|
954
|
+
*
|
|
955
|
+
* Required API Key ACLs:
|
|
956
|
+
* - analytics.
|
|
804
957
|
*
|
|
805
|
-
* @summary Get top searches.
|
|
806
958
|
* @param getTopSearches - The getTopSearches object.
|
|
807
|
-
* @param getTopSearches.index - Index name
|
|
808
|
-
* @param getTopSearches.clickAnalytics - Whether to include
|
|
809
|
-
* @param getTopSearches.
|
|
810
|
-
* @param getTopSearches.
|
|
811
|
-
* @param getTopSearches.
|
|
959
|
+
* @param getTopSearches.index - Index name.
|
|
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.
|
|
962
|
+
* @param getTopSearches.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
963
|
+
* @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
964
|
+
* @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
|
|
812
965
|
* @param getTopSearches.direction - Sorting direction of the results: ascending or descending.
|
|
813
|
-
* @param getTopSearches.limit - Number of
|
|
814
|
-
* @param getTopSearches.offset - Position of the
|
|
815
|
-
* @param getTopSearches.tags -
|
|
966
|
+
* @param getTopSearches.limit - Number of items to return.
|
|
967
|
+
* @param getTopSearches.offset - Position of the first item to return.
|
|
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/).
|
|
816
969
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
817
970
|
*/
|
|
818
|
-
getTopSearches({ index, clickAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
|
|
971
|
+
getTopSearches({ index, clickAnalytics, revenueAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
|
|
819
972
|
if (!index) {
|
|
820
973
|
throw new Error('Parameter `index` is required when calling `getTopSearches`.');
|
|
821
974
|
}
|
|
@@ -828,6 +981,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
828
981
|
if (clickAnalytics !== undefined) {
|
|
829
982
|
queryParameters.clickAnalytics = clickAnalytics.toString();
|
|
830
983
|
}
|
|
984
|
+
if (revenueAnalytics !== undefined) {
|
|
985
|
+
queryParameters.revenueAnalytics = revenueAnalytics.toString();
|
|
986
|
+
}
|
|
831
987
|
if (startDate !== undefined) {
|
|
832
988
|
queryParameters.startDate = startDate.toString();
|
|
833
989
|
}
|
|
@@ -858,14 +1014,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
858
1014
|
return transporter.request(request, requestOptions);
|
|
859
1015
|
},
|
|
860
1016
|
/**
|
|
861
|
-
*
|
|
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.
|
|
1018
|
+
*
|
|
1019
|
+
* Required API Key ACLs:
|
|
1020
|
+
* - analytics.
|
|
862
1021
|
*
|
|
863
|
-
* @summary Get user count.
|
|
864
1022
|
* @param getUsersCount - The getUsersCount object.
|
|
865
|
-
* @param getUsersCount.index - Index name
|
|
866
|
-
* @param getUsersCount.startDate - Start date
|
|
867
|
-
* @param getUsersCount.endDate - End date
|
|
868
|
-
* @param getUsersCount.tags -
|
|
1023
|
+
* @param getUsersCount.index - Index name.
|
|
1024
|
+
* @param getUsersCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1025
|
+
* @param getUsersCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
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/).
|
|
869
1027
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
870
1028
|
*/
|
|
871
1029
|
getUsersCount({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -899,6 +1057,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
899
1057
|
}
|
|
900
1058
|
|
|
901
1059
|
// 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.
|
|
1060
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
902
1061
|
function analyticsClient(appId, apiKey, region, options) {
|
|
903
1062
|
if (!appId || typeof appId !== 'string') {
|
|
904
1063
|
throw new Error('`appId` is missing.');
|
|
@@ -909,22 +1068,24 @@ function analyticsClient(appId, apiKey, region, options) {
|
|
|
909
1068
|
if (region && (typeof region !== 'string' || !REGIONS.includes(region))) {
|
|
910
1069
|
throw new Error(`\`region\` must be one of the following: ${REGIONS.join(', ')}`);
|
|
911
1070
|
}
|
|
912
|
-
return
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
1071
|
+
return {
|
|
1072
|
+
...createAnalyticsClient({
|
|
1073
|
+
appId,
|
|
1074
|
+
apiKey,
|
|
1075
|
+
region,
|
|
1076
|
+
timeouts: {
|
|
1077
|
+
connect: DEFAULT_CONNECT_TIMEOUT_NODE,
|
|
1078
|
+
read: DEFAULT_READ_TIMEOUT_NODE,
|
|
1079
|
+
write: DEFAULT_WRITE_TIMEOUT_NODE,
|
|
1080
|
+
},
|
|
1081
|
+
requester: createHttpRequester(),
|
|
1082
|
+
algoliaAgents: [{ segment: 'Node.js', version: process.versions.node }],
|
|
1083
|
+
responsesCache: createNullCache(),
|
|
1084
|
+
requestsCache: createNullCache(),
|
|
1085
|
+
hostsCache: createMemoryCache(),
|
|
1086
|
+
...options,
|
|
1087
|
+
}),
|
|
1088
|
+
};
|
|
928
1089
|
}
|
|
929
1090
|
|
|
930
1091
|
export { analyticsClient, apiClientVersion };
|