@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
|
@@ -4,7 +4,7 @@ var clientCommon = require('@algolia/client-common');
|
|
|
4
4
|
var requesterNodeHttp = require('@algolia/requester-node-http');
|
|
5
5
|
|
|
6
6
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
7
|
-
const apiClientVersion = '5.0.0-
|
|
7
|
+
const apiClientVersion = '5.0.0-beta.1';
|
|
8
8
|
const REGIONS = ['de', 'us'];
|
|
9
9
|
function getDefaultHosts(region) {
|
|
10
10
|
const url = !region
|
|
@@ -66,7 +66,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
66
66
|
/**
|
|
67
67
|
* This method allow you to send requests to the Algolia REST API.
|
|
68
68
|
*
|
|
69
|
-
* @summary Send requests to the Algolia REST API.
|
|
70
69
|
* @param customDelete - The customDelete object.
|
|
71
70
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
72
71
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -76,7 +75,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
76
75
|
if (!path) {
|
|
77
76
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
78
77
|
}
|
|
79
|
-
const requestPath = '/
|
|
78
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
80
79
|
const headers = {};
|
|
81
80
|
const queryParameters = parameters ? parameters : {};
|
|
82
81
|
const request = {
|
|
@@ -90,7 +89,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
90
89
|
/**
|
|
91
90
|
* This method allow you to send requests to the Algolia REST API.
|
|
92
91
|
*
|
|
93
|
-
* @summary Send requests to the Algolia REST API.
|
|
94
92
|
* @param customGet - The customGet object.
|
|
95
93
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
96
94
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -100,7 +98,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
100
98
|
if (!path) {
|
|
101
99
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
102
100
|
}
|
|
103
|
-
const requestPath = '/
|
|
101
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
104
102
|
const headers = {};
|
|
105
103
|
const queryParameters = parameters ? parameters : {};
|
|
106
104
|
const request = {
|
|
@@ -114,7 +112,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
114
112
|
/**
|
|
115
113
|
* This method allow you to send requests to the Algolia REST API.
|
|
116
114
|
*
|
|
117
|
-
* @summary Send requests to the Algolia REST API.
|
|
118
115
|
* @param customPost - The customPost object.
|
|
119
116
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
120
117
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -125,7 +122,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
125
122
|
if (!path) {
|
|
126
123
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
127
124
|
}
|
|
128
|
-
const requestPath = '/
|
|
125
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
129
126
|
const headers = {};
|
|
130
127
|
const queryParameters = parameters ? parameters : {};
|
|
131
128
|
const request = {
|
|
@@ -140,7 +137,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
140
137
|
/**
|
|
141
138
|
* This method allow you to send requests to the Algolia REST API.
|
|
142
139
|
*
|
|
143
|
-
* @summary Send requests to the Algolia REST API.
|
|
144
140
|
* @param customPut - The customPut object.
|
|
145
141
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
146
142
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -151,7 +147,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
151
147
|
if (!path) {
|
|
152
148
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
153
149
|
}
|
|
154
|
-
const requestPath = '/
|
|
150
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
155
151
|
const headers = {};
|
|
156
152
|
const queryParameters = parameters ? parameters : {};
|
|
157
153
|
const request = {
|
|
@@ -164,14 +160,56 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
164
160
|
return transporter.request(request, requestOptions);
|
|
165
161
|
},
|
|
166
162
|
/**
|
|
167
|
-
*
|
|
163
|
+
* Retrieves the add-to-cart rate for all of your searches with at least one add-to-cart event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
164
|
+
*
|
|
165
|
+
* Required API Key ACLs:
|
|
166
|
+
* - analytics.
|
|
167
|
+
*
|
|
168
|
+
* @param getAddToCartRate - The getAddToCartRate object.
|
|
169
|
+
* @param getAddToCartRate.index - Index name.
|
|
170
|
+
* @param getAddToCartRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
171
|
+
* @param getAddToCartRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
172
|
+
* @param getAddToCartRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
173
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
174
|
+
*/
|
|
175
|
+
getAddToCartRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
176
|
+
if (!index) {
|
|
177
|
+
throw new Error('Parameter `index` is required when calling `getAddToCartRate`.');
|
|
178
|
+
}
|
|
179
|
+
const requestPath = '/2/conversions/addToCartRate';
|
|
180
|
+
const headers = {};
|
|
181
|
+
const queryParameters = {};
|
|
182
|
+
if (index !== undefined) {
|
|
183
|
+
queryParameters.index = index.toString();
|
|
184
|
+
}
|
|
185
|
+
if (startDate !== undefined) {
|
|
186
|
+
queryParameters.startDate = startDate.toString();
|
|
187
|
+
}
|
|
188
|
+
if (endDate !== undefined) {
|
|
189
|
+
queryParameters.endDate = endDate.toString();
|
|
190
|
+
}
|
|
191
|
+
if (tags !== undefined) {
|
|
192
|
+
queryParameters.tags = tags.toString();
|
|
193
|
+
}
|
|
194
|
+
const request = {
|
|
195
|
+
method: 'GET',
|
|
196
|
+
path: requestPath,
|
|
197
|
+
queryParameters,
|
|
198
|
+
headers,
|
|
199
|
+
};
|
|
200
|
+
return transporter.request(request, requestOptions);
|
|
201
|
+
},
|
|
202
|
+
/**
|
|
203
|
+
* Retrieves the average click position of your search results, including a daily breakdown. The average click position is the average of all clicked search results\' positions. For example, if users only ever click on the first result for any search, the average click position is 1. By default, the analyzed period includes the last eight days including the current day.
|
|
204
|
+
*
|
|
205
|
+
* Required API Key ACLs:
|
|
206
|
+
* - analytics.
|
|
168
207
|
*
|
|
169
|
-
* @summary Get average click position.
|
|
170
208
|
* @param getAverageClickPosition - The getAverageClickPosition object.
|
|
171
|
-
* @param getAverageClickPosition.index - Index name
|
|
172
|
-
* @param getAverageClickPosition.startDate - Start date
|
|
173
|
-
* @param getAverageClickPosition.endDate - End date
|
|
174
|
-
* @param getAverageClickPosition.tags -
|
|
209
|
+
* @param getAverageClickPosition.index - Index name.
|
|
210
|
+
* @param getAverageClickPosition.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
211
|
+
* @param getAverageClickPosition.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
212
|
+
* @param getAverageClickPosition.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
175
213
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
176
214
|
*/
|
|
177
215
|
getAverageClickPosition({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -202,14 +240,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
202
240
|
return transporter.request(request, requestOptions);
|
|
203
241
|
},
|
|
204
242
|
/**
|
|
205
|
-
*
|
|
243
|
+
* Retrieves the positions in the search results and their associated number of clicks. This lets you check how many clicks the first, second, or tenth search results receive.
|
|
244
|
+
*
|
|
245
|
+
* Required API Key ACLs:
|
|
246
|
+
* - analytics.
|
|
206
247
|
*
|
|
207
|
-
* @summary Get click positions.
|
|
208
248
|
* @param getClickPositions - The getClickPositions object.
|
|
209
|
-
* @param getClickPositions.index - Index name
|
|
210
|
-
* @param getClickPositions.startDate - Start date
|
|
211
|
-
* @param getClickPositions.endDate - End date
|
|
212
|
-
* @param getClickPositions.tags -
|
|
249
|
+
* @param getClickPositions.index - Index name.
|
|
250
|
+
* @param getClickPositions.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
251
|
+
* @param getClickPositions.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
252
|
+
* @param getClickPositions.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
213
253
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
214
254
|
*/
|
|
215
255
|
getClickPositions({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -240,14 +280,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
240
280
|
return transporter.request(request, requestOptions);
|
|
241
281
|
},
|
|
242
282
|
/**
|
|
243
|
-
*
|
|
283
|
+
* Retrieves the click-through rate for all of your searches with at least one click event, including a daily breakdown By default, the analyzed period includes the last eight days including the current day.
|
|
284
|
+
*
|
|
285
|
+
* Required API Key ACLs:
|
|
286
|
+
* - analytics.
|
|
244
287
|
*
|
|
245
|
-
* @summary Get click-through rate (CTR).
|
|
246
288
|
* @param getClickThroughRate - The getClickThroughRate object.
|
|
247
|
-
* @param getClickThroughRate.index - Index name
|
|
248
|
-
* @param getClickThroughRate.startDate - Start date
|
|
249
|
-
* @param getClickThroughRate.endDate - End date
|
|
250
|
-
* @param getClickThroughRate.tags -
|
|
289
|
+
* @param getClickThroughRate.index - Index name.
|
|
290
|
+
* @param getClickThroughRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
291
|
+
* @param getClickThroughRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
292
|
+
* @param getClickThroughRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
251
293
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
252
294
|
*/
|
|
253
295
|
getClickThroughRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -278,19 +320,21 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
278
320
|
return transporter.request(request, requestOptions);
|
|
279
321
|
},
|
|
280
322
|
/**
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
* @param
|
|
287
|
-
* @param
|
|
288
|
-
* @param
|
|
323
|
+
* Retrieves the conversion rate for all of your searches with at least one conversion event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
324
|
+
*
|
|
325
|
+
* Required API Key ACLs:
|
|
326
|
+
* - analytics.
|
|
327
|
+
*
|
|
328
|
+
* @param getConversionRate - The getConversionRate object.
|
|
329
|
+
* @param getConversionRate.index - Index name.
|
|
330
|
+
* @param getConversionRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
331
|
+
* @param getConversionRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
332
|
+
* @param getConversionRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
289
333
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
290
334
|
*/
|
|
291
|
-
|
|
335
|
+
getConversionRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
292
336
|
if (!index) {
|
|
293
|
-
throw new Error('Parameter `index` is required when calling `
|
|
337
|
+
throw new Error('Parameter `index` is required when calling `getConversionRate`.');
|
|
294
338
|
}
|
|
295
339
|
const requestPath = '/2/conversions/conversionRate';
|
|
296
340
|
const headers = {};
|
|
@@ -316,14 +360,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
316
360
|
return transporter.request(request, requestOptions);
|
|
317
361
|
},
|
|
318
362
|
/**
|
|
319
|
-
*
|
|
363
|
+
* Retrieves the fraction of searches that didn\'t lead to any click within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
364
|
+
*
|
|
365
|
+
* Required API Key ACLs:
|
|
366
|
+
* - analytics.
|
|
320
367
|
*
|
|
321
|
-
* @summary Get no click rate.
|
|
322
368
|
* @param getNoClickRate - The getNoClickRate object.
|
|
323
|
-
* @param getNoClickRate.index - Index name
|
|
324
|
-
* @param getNoClickRate.startDate - Start date
|
|
325
|
-
* @param getNoClickRate.endDate - End date
|
|
326
|
-
* @param getNoClickRate.tags -
|
|
369
|
+
* @param getNoClickRate.index - Index name.
|
|
370
|
+
* @param getNoClickRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
371
|
+
* @param getNoClickRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
372
|
+
* @param getNoClickRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
327
373
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
328
374
|
*/
|
|
329
375
|
getNoClickRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -354,14 +400,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
354
400
|
return transporter.request(request, requestOptions);
|
|
355
401
|
},
|
|
356
402
|
/**
|
|
357
|
-
*
|
|
403
|
+
* Retrieves the fraction of searches that didn\'t return any results within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
404
|
+
*
|
|
405
|
+
* Required API Key ACLs:
|
|
406
|
+
* - analytics.
|
|
358
407
|
*
|
|
359
|
-
* @summary Get no results rate.
|
|
360
408
|
* @param getNoResultsRate - The getNoResultsRate object.
|
|
361
|
-
* @param getNoResultsRate.index - Index name
|
|
362
|
-
* @param getNoResultsRate.startDate - Start date
|
|
363
|
-
* @param getNoResultsRate.endDate - End date
|
|
364
|
-
* @param getNoResultsRate.tags -
|
|
409
|
+
* @param getNoResultsRate.index - Index name.
|
|
410
|
+
* @param getNoResultsRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
411
|
+
* @param getNoResultsRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
412
|
+
* @param getNoResultsRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
365
413
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
366
414
|
*/
|
|
367
415
|
getNoResultsRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -392,14 +440,96 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
392
440
|
return transporter.request(request, requestOptions);
|
|
393
441
|
},
|
|
394
442
|
/**
|
|
395
|
-
*
|
|
443
|
+
* Retrieves the purchase rate for all of your searches with at least one purchase event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
444
|
+
*
|
|
445
|
+
* Required API Key ACLs:
|
|
446
|
+
* - analytics.
|
|
447
|
+
*
|
|
448
|
+
* @param getPurchaseRate - The getPurchaseRate object.
|
|
449
|
+
* @param getPurchaseRate.index - Index name.
|
|
450
|
+
* @param getPurchaseRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
451
|
+
* @param getPurchaseRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
452
|
+
* @param getPurchaseRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
453
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
454
|
+
*/
|
|
455
|
+
getPurchaseRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
456
|
+
if (!index) {
|
|
457
|
+
throw new Error('Parameter `index` is required when calling `getPurchaseRate`.');
|
|
458
|
+
}
|
|
459
|
+
const requestPath = '/2/conversions/purchaseRate';
|
|
460
|
+
const headers = {};
|
|
461
|
+
const queryParameters = {};
|
|
462
|
+
if (index !== undefined) {
|
|
463
|
+
queryParameters.index = index.toString();
|
|
464
|
+
}
|
|
465
|
+
if (startDate !== undefined) {
|
|
466
|
+
queryParameters.startDate = startDate.toString();
|
|
467
|
+
}
|
|
468
|
+
if (endDate !== undefined) {
|
|
469
|
+
queryParameters.endDate = endDate.toString();
|
|
470
|
+
}
|
|
471
|
+
if (tags !== undefined) {
|
|
472
|
+
queryParameters.tags = tags.toString();
|
|
473
|
+
}
|
|
474
|
+
const request = {
|
|
475
|
+
method: 'GET',
|
|
476
|
+
path: requestPath,
|
|
477
|
+
queryParameters,
|
|
478
|
+
headers,
|
|
479
|
+
};
|
|
480
|
+
return transporter.request(request, requestOptions);
|
|
481
|
+
},
|
|
482
|
+
/**
|
|
483
|
+
* Retrieves revenue-related metrics, such as the total revenue or the average order value. To retrieve revenue-related metrics, sent purchase events. By default, the analyzed period includes the last eight days including the current day.
|
|
484
|
+
*
|
|
485
|
+
* Required API Key ACLs:
|
|
486
|
+
* - analytics.
|
|
487
|
+
*
|
|
488
|
+
* @param getRevenue - The getRevenue object.
|
|
489
|
+
* @param getRevenue.index - Index name.
|
|
490
|
+
* @param getRevenue.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
491
|
+
* @param getRevenue.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
492
|
+
* @param getRevenue.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
493
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
494
|
+
*/
|
|
495
|
+
getRevenue({ index, startDate, endDate, tags }, requestOptions) {
|
|
496
|
+
if (!index) {
|
|
497
|
+
throw new Error('Parameter `index` is required when calling `getRevenue`.');
|
|
498
|
+
}
|
|
499
|
+
const requestPath = '/2/conversions/revenue';
|
|
500
|
+
const headers = {};
|
|
501
|
+
const queryParameters = {};
|
|
502
|
+
if (index !== undefined) {
|
|
503
|
+
queryParameters.index = index.toString();
|
|
504
|
+
}
|
|
505
|
+
if (startDate !== undefined) {
|
|
506
|
+
queryParameters.startDate = startDate.toString();
|
|
507
|
+
}
|
|
508
|
+
if (endDate !== undefined) {
|
|
509
|
+
queryParameters.endDate = endDate.toString();
|
|
510
|
+
}
|
|
511
|
+
if (tags !== undefined) {
|
|
512
|
+
queryParameters.tags = tags.toString();
|
|
513
|
+
}
|
|
514
|
+
const request = {
|
|
515
|
+
method: 'GET',
|
|
516
|
+
path: requestPath,
|
|
517
|
+
queryParameters,
|
|
518
|
+
headers,
|
|
519
|
+
};
|
|
520
|
+
return transporter.request(request, requestOptions);
|
|
521
|
+
},
|
|
522
|
+
/**
|
|
523
|
+
* Retrieves the number of searches within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
524
|
+
*
|
|
525
|
+
* Required API Key ACLs:
|
|
526
|
+
* - analytics.
|
|
396
527
|
*
|
|
397
|
-
* @summary Get number of searches.
|
|
398
528
|
* @param getSearchesCount - The getSearchesCount object.
|
|
399
|
-
* @param getSearchesCount.index - Index name
|
|
400
|
-
* @param getSearchesCount.startDate - Start date
|
|
401
|
-
* @param getSearchesCount.endDate - End date
|
|
402
|
-
* @param getSearchesCount.tags -
|
|
529
|
+
* @param getSearchesCount.index - Index name.
|
|
530
|
+
* @param getSearchesCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
531
|
+
* @param getSearchesCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
532
|
+
* @param getSearchesCount.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
403
533
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
404
534
|
*/
|
|
405
535
|
getSearchesCount({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -430,16 +560,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
430
560
|
return transporter.request(request, requestOptions);
|
|
431
561
|
},
|
|
432
562
|
/**
|
|
433
|
-
*
|
|
563
|
+
* Retrieves the most popular searches that didn\'t lead to any clicks, from the 1,000 most frequent searches.
|
|
564
|
+
*
|
|
565
|
+
* Required API Key ACLs:
|
|
566
|
+
* - analytics.
|
|
434
567
|
*
|
|
435
|
-
* @summary Get top searches with no clicks.
|
|
436
568
|
* @param getSearchesNoClicks - The getSearchesNoClicks object.
|
|
437
|
-
* @param getSearchesNoClicks.index - Index name
|
|
438
|
-
* @param getSearchesNoClicks.startDate - Start date
|
|
439
|
-
* @param getSearchesNoClicks.endDate - End date
|
|
440
|
-
* @param getSearchesNoClicks.limit - Number of
|
|
441
|
-
* @param getSearchesNoClicks.offset - Position of the
|
|
442
|
-
* @param getSearchesNoClicks.tags -
|
|
569
|
+
* @param getSearchesNoClicks.index - Index name.
|
|
570
|
+
* @param getSearchesNoClicks.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
571
|
+
* @param getSearchesNoClicks.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
572
|
+
* @param getSearchesNoClicks.limit - Number of items to return.
|
|
573
|
+
* @param getSearchesNoClicks.offset - Position of the first item to return.
|
|
574
|
+
* @param getSearchesNoClicks.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
443
575
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
444
576
|
*/
|
|
445
577
|
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -476,16 +608,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
476
608
|
return transporter.request(request, requestOptions);
|
|
477
609
|
},
|
|
478
610
|
/**
|
|
479
|
-
*
|
|
611
|
+
* Retrieves the most popular searches that didn\'t return any results.
|
|
612
|
+
*
|
|
613
|
+
* Required API Key ACLs:
|
|
614
|
+
* - analytics.
|
|
480
615
|
*
|
|
481
|
-
* @summary Get top searches with no results.
|
|
482
616
|
* @param getSearchesNoResults - The getSearchesNoResults object.
|
|
483
|
-
* @param getSearchesNoResults.index - Index name
|
|
484
|
-
* @param getSearchesNoResults.startDate - Start date
|
|
485
|
-
* @param getSearchesNoResults.endDate - End date
|
|
486
|
-
* @param getSearchesNoResults.limit - Number of
|
|
487
|
-
* @param getSearchesNoResults.offset - Position of the
|
|
488
|
-
* @param getSearchesNoResults.tags -
|
|
617
|
+
* @param getSearchesNoResults.index - Index name.
|
|
618
|
+
* @param getSearchesNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
619
|
+
* @param getSearchesNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
620
|
+
* @param getSearchesNoResults.limit - Number of items to return.
|
|
621
|
+
* @param getSearchesNoResults.offset - Position of the first item to return.
|
|
622
|
+
* @param getSearchesNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
489
623
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
490
624
|
*/
|
|
491
625
|
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -522,11 +656,13 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
522
656
|
return transporter.request(request, requestOptions);
|
|
523
657
|
},
|
|
524
658
|
/**
|
|
525
|
-
*
|
|
659
|
+
* Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.
|
|
660
|
+
*
|
|
661
|
+
* Required API Key ACLs:
|
|
662
|
+
* - analytics.
|
|
526
663
|
*
|
|
527
|
-
* @summary Get Analytics API status.
|
|
528
664
|
* @param getStatus - The getStatus object.
|
|
529
|
-
* @param getStatus.index - Index name
|
|
665
|
+
* @param getStatus.index - Index name.
|
|
530
666
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
531
667
|
*/
|
|
532
668
|
getStatus({ index }, requestOptions) {
|
|
@@ -548,16 +684,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
548
684
|
return transporter.request(request, requestOptions);
|
|
549
685
|
},
|
|
550
686
|
/**
|
|
551
|
-
*
|
|
687
|
+
* Retrieves the countries with the most searches to your index.
|
|
688
|
+
*
|
|
689
|
+
* Required API Key ACLs:
|
|
690
|
+
* - analytics.
|
|
552
691
|
*
|
|
553
|
-
* @summary Get top countries.
|
|
554
692
|
* @param getTopCountries - The getTopCountries object.
|
|
555
|
-
* @param getTopCountries.index - Index name
|
|
556
|
-
* @param getTopCountries.startDate - Start date
|
|
557
|
-
* @param getTopCountries.endDate - End date
|
|
558
|
-
* @param getTopCountries.limit - Number of
|
|
559
|
-
* @param getTopCountries.offset - Position of the
|
|
560
|
-
* @param getTopCountries.tags -
|
|
693
|
+
* @param getTopCountries.index - Index name.
|
|
694
|
+
* @param getTopCountries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
695
|
+
* @param getTopCountries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
696
|
+
* @param getTopCountries.limit - Number of items to return.
|
|
697
|
+
* @param getTopCountries.offset - Position of the first item to return.
|
|
698
|
+
* @param getTopCountries.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
561
699
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
562
700
|
*/
|
|
563
701
|
getTopCountries({ index, startDate, endDate, limit, offset, tags }, requestOptions) {
|
|
@@ -594,17 +732,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
594
732
|
return transporter.request(request, requestOptions);
|
|
595
733
|
},
|
|
596
734
|
/**
|
|
597
|
-
*
|
|
735
|
+
* Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
736
|
+
*
|
|
737
|
+
* Required API Key ACLs:
|
|
738
|
+
* - analytics.
|
|
598
739
|
*
|
|
599
|
-
* @summary Get top filterable attributes.
|
|
600
740
|
* @param getTopFilterAttributes - The getTopFilterAttributes object.
|
|
601
|
-
* @param getTopFilterAttributes.index - Index name
|
|
602
|
-
* @param getTopFilterAttributes.search -
|
|
603
|
-
* @param getTopFilterAttributes.startDate - Start date
|
|
604
|
-
* @param getTopFilterAttributes.endDate - End date
|
|
605
|
-
* @param getTopFilterAttributes.limit - Number of
|
|
606
|
-
* @param getTopFilterAttributes.offset - Position of the
|
|
607
|
-
* @param getTopFilterAttributes.tags -
|
|
741
|
+
* @param getTopFilterAttributes.index - Index name.
|
|
742
|
+
* @param getTopFilterAttributes.search - Search query.
|
|
743
|
+
* @param getTopFilterAttributes.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
744
|
+
* @param getTopFilterAttributes.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
745
|
+
* @param getTopFilterAttributes.limit - Number of items to return.
|
|
746
|
+
* @param getTopFilterAttributes.offset - Position of the first item to return.
|
|
747
|
+
* @param getTopFilterAttributes.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
608
748
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
609
749
|
*/
|
|
610
750
|
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -644,18 +784,20 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
644
784
|
return transporter.request(request, requestOptions);
|
|
645
785
|
},
|
|
646
786
|
/**
|
|
647
|
-
*
|
|
787
|
+
* Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
788
|
+
*
|
|
789
|
+
* Required API Key ACLs:
|
|
790
|
+
* - analytics.
|
|
648
791
|
*
|
|
649
|
-
* @summary Get top filter values for an attribute.
|
|
650
792
|
* @param getTopFilterForAttribute - The getTopFilterForAttribute object.
|
|
651
793
|
* @param getTopFilterForAttribute.attribute - Attribute name.
|
|
652
|
-
* @param getTopFilterForAttribute.index - Index name
|
|
653
|
-
* @param getTopFilterForAttribute.search -
|
|
654
|
-
* @param getTopFilterForAttribute.startDate - Start date
|
|
655
|
-
* @param getTopFilterForAttribute.endDate - End date
|
|
656
|
-
* @param getTopFilterForAttribute.limit - Number of
|
|
657
|
-
* @param getTopFilterForAttribute.offset - Position of the
|
|
658
|
-
* @param getTopFilterForAttribute.tags -
|
|
794
|
+
* @param getTopFilterForAttribute.index - Index name.
|
|
795
|
+
* @param getTopFilterForAttribute.search - Search query.
|
|
796
|
+
* @param getTopFilterForAttribute.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
797
|
+
* @param getTopFilterForAttribute.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
798
|
+
* @param getTopFilterForAttribute.limit - Number of items to return.
|
|
799
|
+
* @param getTopFilterForAttribute.offset - Position of the first item to return.
|
|
800
|
+
* @param getTopFilterForAttribute.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
659
801
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
660
802
|
*/
|
|
661
803
|
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -698,17 +840,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
698
840
|
return transporter.request(request, requestOptions);
|
|
699
841
|
},
|
|
700
842
|
/**
|
|
701
|
-
*
|
|
843
|
+
* Retrieves the most frequently used filters for a search that didn\'t return any results. To get the most frequent searches without results, use the [Retrieve searches without results](#tag/search/operation/getSearchesNoResults) operation.
|
|
844
|
+
*
|
|
845
|
+
* Required API Key ACLs:
|
|
846
|
+
* - analytics.
|
|
702
847
|
*
|
|
703
|
-
* @summary Get top filters for a no result search.
|
|
704
848
|
* @param getTopFiltersNoResults - The getTopFiltersNoResults object.
|
|
705
|
-
* @param getTopFiltersNoResults.index - Index name
|
|
706
|
-
* @param getTopFiltersNoResults.search -
|
|
707
|
-
* @param getTopFiltersNoResults.startDate - Start date
|
|
708
|
-
* @param getTopFiltersNoResults.endDate - End date
|
|
709
|
-
* @param getTopFiltersNoResults.limit - Number of
|
|
710
|
-
* @param getTopFiltersNoResults.offset - Position of the
|
|
711
|
-
* @param getTopFiltersNoResults.tags -
|
|
849
|
+
* @param getTopFiltersNoResults.index - Index name.
|
|
850
|
+
* @param getTopFiltersNoResults.search - Search query.
|
|
851
|
+
* @param getTopFiltersNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
852
|
+
* @param getTopFiltersNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
853
|
+
* @param getTopFiltersNoResults.limit - Number of items to return.
|
|
854
|
+
* @param getTopFiltersNoResults.offset - Position of the first item to return.
|
|
855
|
+
* @param getTopFiltersNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
712
856
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
713
857
|
*/
|
|
714
858
|
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -748,21 +892,24 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
748
892
|
return transporter.request(request, requestOptions);
|
|
749
893
|
},
|
|
750
894
|
/**
|
|
751
|
-
*
|
|
895
|
+
* Retrieves the object IDs of the most frequent search results.
|
|
896
|
+
*
|
|
897
|
+
* Required API Key ACLs:
|
|
898
|
+
* - analytics.
|
|
752
899
|
*
|
|
753
|
-
* @summary Get top hits.
|
|
754
900
|
* @param getTopHits - The getTopHits object.
|
|
755
|
-
* @param getTopHits.index - Index name
|
|
756
|
-
* @param getTopHits.search -
|
|
757
|
-
* @param getTopHits.clickAnalytics - Whether to include
|
|
758
|
-
* @param getTopHits.
|
|
759
|
-
* @param getTopHits.
|
|
760
|
-
* @param getTopHits.
|
|
761
|
-
* @param getTopHits.
|
|
762
|
-
* @param getTopHits.
|
|
901
|
+
* @param getTopHits.index - Index name.
|
|
902
|
+
* @param getTopHits.search - Search query.
|
|
903
|
+
* @param getTopHits.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
904
|
+
* @param getTopHits.revenueAnalytics - Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
|
|
905
|
+
* @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
906
|
+
* @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
907
|
+
* @param getTopHits.limit - Number of items to return.
|
|
908
|
+
* @param getTopHits.offset - Position of the first item to return.
|
|
909
|
+
* @param getTopHits.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
763
910
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
764
911
|
*/
|
|
765
|
-
getTopHits({ index, search, clickAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
912
|
+
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
766
913
|
if (!index) {
|
|
767
914
|
throw new Error('Parameter `index` is required when calling `getTopHits`.');
|
|
768
915
|
}
|
|
@@ -778,6 +925,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
778
925
|
if (clickAnalytics !== undefined) {
|
|
779
926
|
queryParameters.clickAnalytics = clickAnalytics.toString();
|
|
780
927
|
}
|
|
928
|
+
if (revenueAnalytics !== undefined) {
|
|
929
|
+
queryParameters.revenueAnalytics = revenueAnalytics.toString();
|
|
930
|
+
}
|
|
781
931
|
if (startDate !== undefined) {
|
|
782
932
|
queryParameters.startDate = startDate.toString();
|
|
783
933
|
}
|
|
@@ -802,22 +952,25 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
802
952
|
return transporter.request(request, requestOptions);
|
|
803
953
|
},
|
|
804
954
|
/**
|
|
805
|
-
* Returns the most popular
|
|
955
|
+
* Returns the most popular search terms.
|
|
956
|
+
*
|
|
957
|
+
* Required API Key ACLs:
|
|
958
|
+
* - analytics.
|
|
806
959
|
*
|
|
807
|
-
* @summary Get top searches.
|
|
808
960
|
* @param getTopSearches - The getTopSearches object.
|
|
809
|
-
* @param getTopSearches.index - Index name
|
|
810
|
-
* @param getTopSearches.clickAnalytics - Whether to include
|
|
811
|
-
* @param getTopSearches.
|
|
812
|
-
* @param getTopSearches.
|
|
813
|
-
* @param getTopSearches.
|
|
961
|
+
* @param getTopSearches.index - Index name.
|
|
962
|
+
* @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
963
|
+
* @param getTopSearches.revenueAnalytics - Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
|
|
964
|
+
* @param getTopSearches.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
965
|
+
* @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
966
|
+
* @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
|
|
814
967
|
* @param getTopSearches.direction - Sorting direction of the results: ascending or descending.
|
|
815
|
-
* @param getTopSearches.limit - Number of
|
|
816
|
-
* @param getTopSearches.offset - Position of the
|
|
817
|
-
* @param getTopSearches.tags -
|
|
968
|
+
* @param getTopSearches.limit - Number of items to return.
|
|
969
|
+
* @param getTopSearches.offset - Position of the first item to return.
|
|
970
|
+
* @param getTopSearches.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
818
971
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
819
972
|
*/
|
|
820
|
-
getTopSearches({ index, clickAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
|
|
973
|
+
getTopSearches({ index, clickAnalytics, revenueAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
|
|
821
974
|
if (!index) {
|
|
822
975
|
throw new Error('Parameter `index` is required when calling `getTopSearches`.');
|
|
823
976
|
}
|
|
@@ -830,6 +983,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
830
983
|
if (clickAnalytics !== undefined) {
|
|
831
984
|
queryParameters.clickAnalytics = clickAnalytics.toString();
|
|
832
985
|
}
|
|
986
|
+
if (revenueAnalytics !== undefined) {
|
|
987
|
+
queryParameters.revenueAnalytics = revenueAnalytics.toString();
|
|
988
|
+
}
|
|
833
989
|
if (startDate !== undefined) {
|
|
834
990
|
queryParameters.startDate = startDate.toString();
|
|
835
991
|
}
|
|
@@ -860,14 +1016,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
860
1016
|
return transporter.request(request, requestOptions);
|
|
861
1017
|
},
|
|
862
1018
|
/**
|
|
863
|
-
*
|
|
1019
|
+
* Retrieves the number of unique users within a time range, including a daily breakdown. Since this endpoint returns the number of unique users, the sum of the daily values might be different from the total number. By default, Algolia distinguishes search users by their IP address, _unless_ you include a pseudonymous user identifier in your search requests with the `userToken` API parameter or `x-algolia-usertoken` request header. By default, the analyzed period includes the last eight days including the current day.
|
|
1020
|
+
*
|
|
1021
|
+
* Required API Key ACLs:
|
|
1022
|
+
* - analytics.
|
|
864
1023
|
*
|
|
865
|
-
* @summary Get user count.
|
|
866
1024
|
* @param getUsersCount - The getUsersCount object.
|
|
867
|
-
* @param getUsersCount.index - Index name
|
|
868
|
-
* @param getUsersCount.startDate - Start date
|
|
869
|
-
* @param getUsersCount.endDate - End date
|
|
870
|
-
* @param getUsersCount.tags -
|
|
1025
|
+
* @param getUsersCount.index - Index name.
|
|
1026
|
+
* @param getUsersCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1027
|
+
* @param getUsersCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1028
|
+
* @param getUsersCount.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
871
1029
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
872
1030
|
*/
|
|
873
1031
|
getUsersCount({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -901,6 +1059,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
901
1059
|
}
|
|
902
1060
|
|
|
903
1061
|
// 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.
|
|
1062
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
904
1063
|
function analyticsClient(appId, apiKey, region, options) {
|
|
905
1064
|
if (!appId || typeof appId !== 'string') {
|
|
906
1065
|
throw new Error('`appId` is missing.');
|
|
@@ -911,22 +1070,24 @@ function analyticsClient(appId, apiKey, region, options) {
|
|
|
911
1070
|
if (region && (typeof region !== 'string' || !REGIONS.includes(region))) {
|
|
912
1071
|
throw new Error(`\`region\` must be one of the following: ${REGIONS.join(', ')}`);
|
|
913
1072
|
}
|
|
914
|
-
return
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
1073
|
+
return {
|
|
1074
|
+
...createAnalyticsClient({
|
|
1075
|
+
appId,
|
|
1076
|
+
apiKey,
|
|
1077
|
+
region,
|
|
1078
|
+
timeouts: {
|
|
1079
|
+
connect: clientCommon.DEFAULT_CONNECT_TIMEOUT_NODE,
|
|
1080
|
+
read: clientCommon.DEFAULT_READ_TIMEOUT_NODE,
|
|
1081
|
+
write: clientCommon.DEFAULT_WRITE_TIMEOUT_NODE,
|
|
1082
|
+
},
|
|
1083
|
+
requester: requesterNodeHttp.createHttpRequester(),
|
|
1084
|
+
algoliaAgents: [{ segment: 'Node.js', version: process.versions.node }],
|
|
1085
|
+
responsesCache: clientCommon.createNullCache(),
|
|
1086
|
+
requestsCache: clientCommon.createNullCache(),
|
|
1087
|
+
hostsCache: clientCommon.createMemoryCache(),
|
|
1088
|
+
...options,
|
|
1089
|
+
}),
|
|
1090
|
+
};
|
|
930
1091
|
}
|
|
931
1092
|
|
|
932
1093
|
exports.analyticsClient = analyticsClient;
|