@algolia/client-analytics 5.0.0-alpha.99 → 5.0.0-beta.10
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/LICENSE +21 -0
- 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 +309 -160
- 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 +11 -8
- 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
|
@@ -195,6 +195,14 @@ function createStatefulHost(host, status = 'up') {
|
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
+
function _defineProperty(e, r, t) {
|
|
199
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
200
|
+
value: t,
|
|
201
|
+
enumerable: !0,
|
|
202
|
+
configurable: !0,
|
|
203
|
+
writable: !0
|
|
204
|
+
}) : e[r] = t, e;
|
|
205
|
+
}
|
|
198
206
|
function _toPrimitive(t, r) {
|
|
199
207
|
if ("object" != typeof t || !t) return t;
|
|
200
208
|
var e = t[Symbol.toPrimitive];
|
|
@@ -207,21 +215,7 @@ function _toPrimitive(t, r) {
|
|
|
207
215
|
}
|
|
208
216
|
function _toPropertyKey(t) {
|
|
209
217
|
var i = _toPrimitive(t, "string");
|
|
210
|
-
return "symbol" == typeof i ? i :
|
|
211
|
-
}
|
|
212
|
-
function _defineProperty(obj, key, value) {
|
|
213
|
-
key = _toPropertyKey(key);
|
|
214
|
-
if (key in obj) {
|
|
215
|
-
Object.defineProperty(obj, key, {
|
|
216
|
-
value: value,
|
|
217
|
-
enumerable: true,
|
|
218
|
-
configurable: true,
|
|
219
|
-
writable: true
|
|
220
|
-
});
|
|
221
|
-
} else {
|
|
222
|
-
obj[key] = value;
|
|
223
|
-
}
|
|
224
|
-
return obj;
|
|
218
|
+
return "symbol" == typeof i ? i : i + "";
|
|
225
219
|
}
|
|
226
220
|
|
|
227
221
|
class AlgoliaError extends Error {
|
|
@@ -243,7 +237,7 @@ class ErrorWithStackTrace extends AlgoliaError {
|
|
|
243
237
|
}
|
|
244
238
|
class RetryError extends ErrorWithStackTrace {
|
|
245
239
|
constructor(stackTrace) {
|
|
246
|
-
super('Unreachable hosts - your application id may be incorrect. If the error persists, please
|
|
240
|
+
super('Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.', stackTrace, 'RetryError');
|
|
247
241
|
}
|
|
248
242
|
}
|
|
249
243
|
class ApiError extends ErrorWithStackTrace {
|
|
@@ -270,15 +264,14 @@ class DetailedApiError extends ApiError {
|
|
|
270
264
|
}
|
|
271
265
|
function serializeUrl(host, path, queryParameters) {
|
|
272
266
|
const queryParametersAsString = serializeQueryParameters(queryParameters);
|
|
273
|
-
let url = `${host.protocol}://${host.url}/${path.charAt(0) === '/' ? path.
|
|
267
|
+
let url = `${host.protocol}://${host.url}${host.port ? `:${host.port}` : ''}/${path.charAt(0) === '/' ? path.substring(1) : path}`;
|
|
274
268
|
if (queryParametersAsString.length) {
|
|
275
269
|
url += `?${queryParametersAsString}`;
|
|
276
270
|
}
|
|
277
271
|
return url;
|
|
278
272
|
}
|
|
279
273
|
function serializeQueryParameters(parameters) {
|
|
280
|
-
|
|
281
|
-
return Object.keys(parameters).map(key => `${key}=${encodeURIComponent(isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key])}`).join('&');
|
|
274
|
+
return Object.keys(parameters).filter(key => parameters[key] !== undefined).sort().map(key => `${key}=${encodeURIComponent(Object.prototype.toString.call(parameters[key]) === '[object Array]' ? parameters[key].join(',') : parameters[key]).replaceAll('+', '%20')}`).join('&');
|
|
282
275
|
}
|
|
283
276
|
function serializeData(request, requestOptions) {
|
|
284
277
|
if (request.method === 'GET' || request.data === undefined && requestOptions.data === undefined) {
|
|
@@ -449,16 +442,13 @@ function createTransporter({
|
|
|
449
442
|
if (host === undefined) {
|
|
450
443
|
throw new RetryError(stackTraceWithoutCredentials(stackTrace));
|
|
451
444
|
}
|
|
452
|
-
let responseTimeout = requestOptions.
|
|
453
|
-
if (responseTimeout === undefined) {
|
|
454
|
-
responseTimeout = isRead ? timeouts.read : timeouts.write;
|
|
455
|
-
}
|
|
445
|
+
let responseTimeout = isRead ? requestOptions.timeouts?.read || timeouts.read : requestOptions.timeouts?.write || timeouts.write;
|
|
456
446
|
const payload = {
|
|
457
447
|
data,
|
|
458
448
|
headers,
|
|
459
449
|
method: request.method,
|
|
460
450
|
url: serializeUrl(host, request.path, queryParameters),
|
|
461
|
-
connectTimeout: getTimeout(timeoutsCount, timeouts.connect),
|
|
451
|
+
connectTimeout: getTimeout(timeoutsCount, requestOptions.timeouts?.connect || timeouts.connect),
|
|
462
452
|
responseTimeout: getTimeout(timeoutsCount, responseTimeout)
|
|
463
453
|
};
|
|
464
454
|
/**
|
|
@@ -686,7 +676,7 @@ function createXhrRequester() {
|
|
|
686
676
|
}
|
|
687
677
|
|
|
688
678
|
// 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.
|
|
689
|
-
const apiClientVersion = '5.0.0-
|
|
679
|
+
const apiClientVersion = '5.0.0-beta.10';
|
|
690
680
|
const REGIONS = ['de', 'us'];
|
|
691
681
|
function getDefaultHosts(region) {
|
|
692
682
|
const url = !region
|
|
@@ -748,7 +738,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
748
738
|
/**
|
|
749
739
|
* This method allow you to send requests to the Algolia REST API.
|
|
750
740
|
*
|
|
751
|
-
* @summary Send requests to the Algolia REST API.
|
|
752
741
|
* @param customDelete - The customDelete object.
|
|
753
742
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
754
743
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -758,7 +747,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
758
747
|
if (!path) {
|
|
759
748
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
760
749
|
}
|
|
761
|
-
const requestPath = '/
|
|
750
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
762
751
|
const headers = {};
|
|
763
752
|
const queryParameters = parameters ? parameters : {};
|
|
764
753
|
const request = {
|
|
@@ -772,7 +761,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
772
761
|
/**
|
|
773
762
|
* This method allow you to send requests to the Algolia REST API.
|
|
774
763
|
*
|
|
775
|
-
* @summary Send requests to the Algolia REST API.
|
|
776
764
|
* @param customGet - The customGet object.
|
|
777
765
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
778
766
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -782,7 +770,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
782
770
|
if (!path) {
|
|
783
771
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
784
772
|
}
|
|
785
|
-
const requestPath = '/
|
|
773
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
786
774
|
const headers = {};
|
|
787
775
|
const queryParameters = parameters ? parameters : {};
|
|
788
776
|
const request = {
|
|
@@ -796,7 +784,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
796
784
|
/**
|
|
797
785
|
* This method allow you to send requests to the Algolia REST API.
|
|
798
786
|
*
|
|
799
|
-
* @summary Send requests to the Algolia REST API.
|
|
800
787
|
* @param customPost - The customPost object.
|
|
801
788
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
802
789
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -807,7 +794,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
807
794
|
if (!path) {
|
|
808
795
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
809
796
|
}
|
|
810
|
-
const requestPath = '/
|
|
797
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
811
798
|
const headers = {};
|
|
812
799
|
const queryParameters = parameters ? parameters : {};
|
|
813
800
|
const request = {
|
|
@@ -822,7 +809,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
822
809
|
/**
|
|
823
810
|
* This method allow you to send requests to the Algolia REST API.
|
|
824
811
|
*
|
|
825
|
-
* @summary Send requests to the Algolia REST API.
|
|
826
812
|
* @param customPut - The customPut object.
|
|
827
813
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
828
814
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -833,7 +819,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
833
819
|
if (!path) {
|
|
834
820
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
835
821
|
}
|
|
836
|
-
const requestPath = '/
|
|
822
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
837
823
|
const headers = {};
|
|
838
824
|
const queryParameters = parameters ? parameters : {};
|
|
839
825
|
const request = {
|
|
@@ -846,14 +832,56 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
846
832
|
return transporter.request(request, requestOptions);
|
|
847
833
|
},
|
|
848
834
|
/**
|
|
849
|
-
*
|
|
835
|
+
* 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.
|
|
836
|
+
*
|
|
837
|
+
* Required API Key ACLs:
|
|
838
|
+
* - analytics.
|
|
839
|
+
*
|
|
840
|
+
* @param getAddToCartRate - The getAddToCartRate object.
|
|
841
|
+
* @param getAddToCartRate.index - Index name.
|
|
842
|
+
* @param getAddToCartRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
843
|
+
* @param getAddToCartRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
844
|
+
* @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/).
|
|
845
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
846
|
+
*/
|
|
847
|
+
getAddToCartRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
848
|
+
if (!index) {
|
|
849
|
+
throw new Error('Parameter `index` is required when calling `getAddToCartRate`.');
|
|
850
|
+
}
|
|
851
|
+
const requestPath = '/2/conversions/addToCartRate';
|
|
852
|
+
const headers = {};
|
|
853
|
+
const queryParameters = {};
|
|
854
|
+
if (index !== undefined) {
|
|
855
|
+
queryParameters.index = index.toString();
|
|
856
|
+
}
|
|
857
|
+
if (startDate !== undefined) {
|
|
858
|
+
queryParameters.startDate = startDate.toString();
|
|
859
|
+
}
|
|
860
|
+
if (endDate !== undefined) {
|
|
861
|
+
queryParameters.endDate = endDate.toString();
|
|
862
|
+
}
|
|
863
|
+
if (tags !== undefined) {
|
|
864
|
+
queryParameters.tags = tags.toString();
|
|
865
|
+
}
|
|
866
|
+
const request = {
|
|
867
|
+
method: 'GET',
|
|
868
|
+
path: requestPath,
|
|
869
|
+
queryParameters,
|
|
870
|
+
headers,
|
|
871
|
+
};
|
|
872
|
+
return transporter.request(request, requestOptions);
|
|
873
|
+
},
|
|
874
|
+
/**
|
|
875
|
+
* 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.
|
|
876
|
+
*
|
|
877
|
+
* Required API Key ACLs:
|
|
878
|
+
* - analytics.
|
|
850
879
|
*
|
|
851
|
-
* @summary Get average click position.
|
|
852
880
|
* @param getAverageClickPosition - The getAverageClickPosition object.
|
|
853
|
-
* @param getAverageClickPosition.index - Index name
|
|
854
|
-
* @param getAverageClickPosition.startDate - Start date
|
|
855
|
-
* @param getAverageClickPosition.endDate - End date
|
|
856
|
-
* @param getAverageClickPosition.tags -
|
|
881
|
+
* @param getAverageClickPosition.index - Index name.
|
|
882
|
+
* @param getAverageClickPosition.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
883
|
+
* @param getAverageClickPosition.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
884
|
+
* @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/).
|
|
857
885
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
858
886
|
*/
|
|
859
887
|
getAverageClickPosition({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -884,14 +912,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
884
912
|
return transporter.request(request, requestOptions);
|
|
885
913
|
},
|
|
886
914
|
/**
|
|
887
|
-
*
|
|
915
|
+
* 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.
|
|
916
|
+
*
|
|
917
|
+
* Required API Key ACLs:
|
|
918
|
+
* - analytics.
|
|
888
919
|
*
|
|
889
|
-
* @summary Get click positions.
|
|
890
920
|
* @param getClickPositions - The getClickPositions object.
|
|
891
|
-
* @param getClickPositions.index - Index name
|
|
892
|
-
* @param getClickPositions.startDate - Start date
|
|
893
|
-
* @param getClickPositions.endDate - End date
|
|
894
|
-
* @param getClickPositions.tags -
|
|
921
|
+
* @param getClickPositions.index - Index name.
|
|
922
|
+
* @param getClickPositions.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
923
|
+
* @param getClickPositions.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
924
|
+
* @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/).
|
|
895
925
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
896
926
|
*/
|
|
897
927
|
getClickPositions({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -922,14 +952,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
922
952
|
return transporter.request(request, requestOptions);
|
|
923
953
|
},
|
|
924
954
|
/**
|
|
925
|
-
*
|
|
955
|
+
* 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.
|
|
956
|
+
*
|
|
957
|
+
* Required API Key ACLs:
|
|
958
|
+
* - analytics.
|
|
926
959
|
*
|
|
927
|
-
* @summary Get click-through rate (CTR).
|
|
928
960
|
* @param getClickThroughRate - The getClickThroughRate object.
|
|
929
|
-
* @param getClickThroughRate.index - Index name
|
|
930
|
-
* @param getClickThroughRate.startDate - Start date
|
|
931
|
-
* @param getClickThroughRate.endDate - End date
|
|
932
|
-
* @param getClickThroughRate.tags -
|
|
961
|
+
* @param getClickThroughRate.index - Index name.
|
|
962
|
+
* @param getClickThroughRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
963
|
+
* @param getClickThroughRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
964
|
+
* @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/).
|
|
933
965
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
934
966
|
*/
|
|
935
967
|
getClickThroughRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -960,19 +992,21 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
960
992
|
return transporter.request(request, requestOptions);
|
|
961
993
|
},
|
|
962
994
|
/**
|
|
963
|
-
*
|
|
995
|
+
* 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.
|
|
964
996
|
*
|
|
965
|
-
*
|
|
966
|
-
*
|
|
967
|
-
*
|
|
968
|
-
* @param
|
|
969
|
-
* @param
|
|
970
|
-
* @param
|
|
997
|
+
* Required API Key ACLs:
|
|
998
|
+
* - analytics.
|
|
999
|
+
*
|
|
1000
|
+
* @param getConversionRate - The getConversionRate object.
|
|
1001
|
+
* @param getConversionRate.index - Index name.
|
|
1002
|
+
* @param getConversionRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1003
|
+
* @param getConversionRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1004
|
+
* @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/).
|
|
971
1005
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
972
1006
|
*/
|
|
973
|
-
|
|
1007
|
+
getConversionRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
974
1008
|
if (!index) {
|
|
975
|
-
throw new Error('Parameter `index` is required when calling `
|
|
1009
|
+
throw new Error('Parameter `index` is required when calling `getConversionRate`.');
|
|
976
1010
|
}
|
|
977
1011
|
const requestPath = '/2/conversions/conversionRate';
|
|
978
1012
|
const headers = {};
|
|
@@ -998,14 +1032,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
998
1032
|
return transporter.request(request, requestOptions);
|
|
999
1033
|
},
|
|
1000
1034
|
/**
|
|
1001
|
-
*
|
|
1035
|
+
* 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.
|
|
1036
|
+
*
|
|
1037
|
+
* Required API Key ACLs:
|
|
1038
|
+
* - analytics.
|
|
1002
1039
|
*
|
|
1003
|
-
* @summary Get no click rate.
|
|
1004
1040
|
* @param getNoClickRate - The getNoClickRate object.
|
|
1005
|
-
* @param getNoClickRate.index - Index name
|
|
1006
|
-
* @param getNoClickRate.startDate - Start date
|
|
1007
|
-
* @param getNoClickRate.endDate - End date
|
|
1008
|
-
* @param getNoClickRate.tags -
|
|
1041
|
+
* @param getNoClickRate.index - Index name.
|
|
1042
|
+
* @param getNoClickRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1043
|
+
* @param getNoClickRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1044
|
+
* @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/).
|
|
1009
1045
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1010
1046
|
*/
|
|
1011
1047
|
getNoClickRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -1036,14 +1072,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1036
1072
|
return transporter.request(request, requestOptions);
|
|
1037
1073
|
},
|
|
1038
1074
|
/**
|
|
1039
|
-
*
|
|
1075
|
+
* 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.
|
|
1076
|
+
*
|
|
1077
|
+
* Required API Key ACLs:
|
|
1078
|
+
* - analytics.
|
|
1040
1079
|
*
|
|
1041
|
-
* @summary Get no results rate.
|
|
1042
1080
|
* @param getNoResultsRate - The getNoResultsRate object.
|
|
1043
|
-
* @param getNoResultsRate.index - Index name
|
|
1044
|
-
* @param getNoResultsRate.startDate - Start date
|
|
1045
|
-
* @param getNoResultsRate.endDate - End date
|
|
1046
|
-
* @param getNoResultsRate.tags -
|
|
1081
|
+
* @param getNoResultsRate.index - Index name.
|
|
1082
|
+
* @param getNoResultsRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1083
|
+
* @param getNoResultsRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1084
|
+
* @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/).
|
|
1047
1085
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1048
1086
|
*/
|
|
1049
1087
|
getNoResultsRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -1074,14 +1112,96 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1074
1112
|
return transporter.request(request, requestOptions);
|
|
1075
1113
|
},
|
|
1076
1114
|
/**
|
|
1077
|
-
*
|
|
1115
|
+
* 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.
|
|
1116
|
+
*
|
|
1117
|
+
* Required API Key ACLs:
|
|
1118
|
+
* - analytics.
|
|
1119
|
+
*
|
|
1120
|
+
* @param getPurchaseRate - The getPurchaseRate object.
|
|
1121
|
+
* @param getPurchaseRate.index - Index name.
|
|
1122
|
+
* @param getPurchaseRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1123
|
+
* @param getPurchaseRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1124
|
+
* @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/).
|
|
1125
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1126
|
+
*/
|
|
1127
|
+
getPurchaseRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
1128
|
+
if (!index) {
|
|
1129
|
+
throw new Error('Parameter `index` is required when calling `getPurchaseRate`.');
|
|
1130
|
+
}
|
|
1131
|
+
const requestPath = '/2/conversions/purchaseRate';
|
|
1132
|
+
const headers = {};
|
|
1133
|
+
const queryParameters = {};
|
|
1134
|
+
if (index !== undefined) {
|
|
1135
|
+
queryParameters.index = index.toString();
|
|
1136
|
+
}
|
|
1137
|
+
if (startDate !== undefined) {
|
|
1138
|
+
queryParameters.startDate = startDate.toString();
|
|
1139
|
+
}
|
|
1140
|
+
if (endDate !== undefined) {
|
|
1141
|
+
queryParameters.endDate = endDate.toString();
|
|
1142
|
+
}
|
|
1143
|
+
if (tags !== undefined) {
|
|
1144
|
+
queryParameters.tags = tags.toString();
|
|
1145
|
+
}
|
|
1146
|
+
const request = {
|
|
1147
|
+
method: 'GET',
|
|
1148
|
+
path: requestPath,
|
|
1149
|
+
queryParameters,
|
|
1150
|
+
headers,
|
|
1151
|
+
};
|
|
1152
|
+
return transporter.request(request, requestOptions);
|
|
1153
|
+
},
|
|
1154
|
+
/**
|
|
1155
|
+
* 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.
|
|
1156
|
+
*
|
|
1157
|
+
* Required API Key ACLs:
|
|
1158
|
+
* - analytics.
|
|
1159
|
+
*
|
|
1160
|
+
* @param getRevenue - The getRevenue object.
|
|
1161
|
+
* @param getRevenue.index - Index name.
|
|
1162
|
+
* @param getRevenue.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1163
|
+
* @param getRevenue.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1164
|
+
* @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/).
|
|
1165
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1166
|
+
*/
|
|
1167
|
+
getRevenue({ index, startDate, endDate, tags }, requestOptions) {
|
|
1168
|
+
if (!index) {
|
|
1169
|
+
throw new Error('Parameter `index` is required when calling `getRevenue`.');
|
|
1170
|
+
}
|
|
1171
|
+
const requestPath = '/2/conversions/revenue';
|
|
1172
|
+
const headers = {};
|
|
1173
|
+
const queryParameters = {};
|
|
1174
|
+
if (index !== undefined) {
|
|
1175
|
+
queryParameters.index = index.toString();
|
|
1176
|
+
}
|
|
1177
|
+
if (startDate !== undefined) {
|
|
1178
|
+
queryParameters.startDate = startDate.toString();
|
|
1179
|
+
}
|
|
1180
|
+
if (endDate !== undefined) {
|
|
1181
|
+
queryParameters.endDate = endDate.toString();
|
|
1182
|
+
}
|
|
1183
|
+
if (tags !== undefined) {
|
|
1184
|
+
queryParameters.tags = tags.toString();
|
|
1185
|
+
}
|
|
1186
|
+
const request = {
|
|
1187
|
+
method: 'GET',
|
|
1188
|
+
path: requestPath,
|
|
1189
|
+
queryParameters,
|
|
1190
|
+
headers,
|
|
1191
|
+
};
|
|
1192
|
+
return transporter.request(request, requestOptions);
|
|
1193
|
+
},
|
|
1194
|
+
/**
|
|
1195
|
+
* 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.
|
|
1196
|
+
*
|
|
1197
|
+
* Required API Key ACLs:
|
|
1198
|
+
* - analytics.
|
|
1078
1199
|
*
|
|
1079
|
-
* @summary Get number of searches.
|
|
1080
1200
|
* @param getSearchesCount - The getSearchesCount object.
|
|
1081
|
-
* @param getSearchesCount.index - Index name
|
|
1082
|
-
* @param getSearchesCount.startDate - Start date
|
|
1083
|
-
* @param getSearchesCount.endDate - End date
|
|
1084
|
-
* @param getSearchesCount.tags -
|
|
1201
|
+
* @param getSearchesCount.index - Index name.
|
|
1202
|
+
* @param getSearchesCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1203
|
+
* @param getSearchesCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1204
|
+
* @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/).
|
|
1085
1205
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1086
1206
|
*/
|
|
1087
1207
|
getSearchesCount({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -1112,16 +1232,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1112
1232
|
return transporter.request(request, requestOptions);
|
|
1113
1233
|
},
|
|
1114
1234
|
/**
|
|
1115
|
-
*
|
|
1235
|
+
* Retrieves the most popular searches that didn\'t lead to any clicks, from the 1,000 most frequent searches.
|
|
1236
|
+
*
|
|
1237
|
+
* Required API Key ACLs:
|
|
1238
|
+
* - analytics.
|
|
1116
1239
|
*
|
|
1117
|
-
* @summary Get top searches with no clicks.
|
|
1118
1240
|
* @param getSearchesNoClicks - The getSearchesNoClicks object.
|
|
1119
|
-
* @param getSearchesNoClicks.index - Index name
|
|
1120
|
-
* @param getSearchesNoClicks.startDate - Start date
|
|
1121
|
-
* @param getSearchesNoClicks.endDate - End date
|
|
1122
|
-
* @param getSearchesNoClicks.limit - Number of
|
|
1123
|
-
* @param getSearchesNoClicks.offset - Position of the
|
|
1124
|
-
* @param getSearchesNoClicks.tags -
|
|
1241
|
+
* @param getSearchesNoClicks.index - Index name.
|
|
1242
|
+
* @param getSearchesNoClicks.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1243
|
+
* @param getSearchesNoClicks.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1244
|
+
* @param getSearchesNoClicks.limit - Number of items to return.
|
|
1245
|
+
* @param getSearchesNoClicks.offset - Position of the first item to return.
|
|
1246
|
+
* @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/).
|
|
1125
1247
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1126
1248
|
*/
|
|
1127
1249
|
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -1158,16 +1280,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1158
1280
|
return transporter.request(request, requestOptions);
|
|
1159
1281
|
},
|
|
1160
1282
|
/**
|
|
1161
|
-
*
|
|
1283
|
+
* Retrieves the most popular searches that didn\'t return any results.
|
|
1284
|
+
*
|
|
1285
|
+
* Required API Key ACLs:
|
|
1286
|
+
* - analytics.
|
|
1162
1287
|
*
|
|
1163
|
-
* @summary Get top searches with no results.
|
|
1164
1288
|
* @param getSearchesNoResults - The getSearchesNoResults object.
|
|
1165
|
-
* @param getSearchesNoResults.index - Index name
|
|
1166
|
-
* @param getSearchesNoResults.startDate - Start date
|
|
1167
|
-
* @param getSearchesNoResults.endDate - End date
|
|
1168
|
-
* @param getSearchesNoResults.limit - Number of
|
|
1169
|
-
* @param getSearchesNoResults.offset - Position of the
|
|
1170
|
-
* @param getSearchesNoResults.tags -
|
|
1289
|
+
* @param getSearchesNoResults.index - Index name.
|
|
1290
|
+
* @param getSearchesNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1291
|
+
* @param getSearchesNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1292
|
+
* @param getSearchesNoResults.limit - Number of items to return.
|
|
1293
|
+
* @param getSearchesNoResults.offset - Position of the first item to return.
|
|
1294
|
+
* @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/).
|
|
1171
1295
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1172
1296
|
*/
|
|
1173
1297
|
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -1204,11 +1328,13 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1204
1328
|
return transporter.request(request, requestOptions);
|
|
1205
1329
|
},
|
|
1206
1330
|
/**
|
|
1207
|
-
*
|
|
1331
|
+
* Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.
|
|
1332
|
+
*
|
|
1333
|
+
* Required API Key ACLs:
|
|
1334
|
+
* - analytics.
|
|
1208
1335
|
*
|
|
1209
|
-
* @summary Get Analytics API status.
|
|
1210
1336
|
* @param getStatus - The getStatus object.
|
|
1211
|
-
* @param getStatus.index - Index name
|
|
1337
|
+
* @param getStatus.index - Index name.
|
|
1212
1338
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1213
1339
|
*/
|
|
1214
1340
|
getStatus({ index }, requestOptions) {
|
|
@@ -1230,16 +1356,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1230
1356
|
return transporter.request(request, requestOptions);
|
|
1231
1357
|
},
|
|
1232
1358
|
/**
|
|
1233
|
-
*
|
|
1359
|
+
* Retrieves the countries with the most searches to your index.
|
|
1360
|
+
*
|
|
1361
|
+
* Required API Key ACLs:
|
|
1362
|
+
* - analytics.
|
|
1234
1363
|
*
|
|
1235
|
-
* @summary Get top countries.
|
|
1236
1364
|
* @param getTopCountries - The getTopCountries object.
|
|
1237
|
-
* @param getTopCountries.index - Index name
|
|
1238
|
-
* @param getTopCountries.startDate - Start date
|
|
1239
|
-
* @param getTopCountries.endDate - End date
|
|
1240
|
-
* @param getTopCountries.limit - Number of
|
|
1241
|
-
* @param getTopCountries.offset - Position of the
|
|
1242
|
-
* @param getTopCountries.tags -
|
|
1365
|
+
* @param getTopCountries.index - Index name.
|
|
1366
|
+
* @param getTopCountries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1367
|
+
* @param getTopCountries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1368
|
+
* @param getTopCountries.limit - Number of items to return.
|
|
1369
|
+
* @param getTopCountries.offset - Position of the first item to return.
|
|
1370
|
+
* @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/).
|
|
1243
1371
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1244
1372
|
*/
|
|
1245
1373
|
getTopCountries({ index, startDate, endDate, limit, offset, tags }, requestOptions) {
|
|
@@ -1276,17 +1404,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1276
1404
|
return transporter.request(request, requestOptions);
|
|
1277
1405
|
},
|
|
1278
1406
|
/**
|
|
1279
|
-
*
|
|
1407
|
+
* Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
1408
|
+
*
|
|
1409
|
+
* Required API Key ACLs:
|
|
1410
|
+
* - analytics.
|
|
1280
1411
|
*
|
|
1281
|
-
* @summary Get top filterable attributes.
|
|
1282
1412
|
* @param getTopFilterAttributes - The getTopFilterAttributes object.
|
|
1283
|
-
* @param getTopFilterAttributes.index - Index name
|
|
1284
|
-
* @param getTopFilterAttributes.search -
|
|
1285
|
-
* @param getTopFilterAttributes.startDate - Start date
|
|
1286
|
-
* @param getTopFilterAttributes.endDate - End date
|
|
1287
|
-
* @param getTopFilterAttributes.limit - Number of
|
|
1288
|
-
* @param getTopFilterAttributes.offset - Position of the
|
|
1289
|
-
* @param getTopFilterAttributes.tags -
|
|
1413
|
+
* @param getTopFilterAttributes.index - Index name.
|
|
1414
|
+
* @param getTopFilterAttributes.search - Search query.
|
|
1415
|
+
* @param getTopFilterAttributes.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1416
|
+
* @param getTopFilterAttributes.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1417
|
+
* @param getTopFilterAttributes.limit - Number of items to return.
|
|
1418
|
+
* @param getTopFilterAttributes.offset - Position of the first item to return.
|
|
1419
|
+
* @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/).
|
|
1290
1420
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1291
1421
|
*/
|
|
1292
1422
|
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -1326,18 +1456,20 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1326
1456
|
return transporter.request(request, requestOptions);
|
|
1327
1457
|
},
|
|
1328
1458
|
/**
|
|
1329
|
-
*
|
|
1459
|
+
* Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
1460
|
+
*
|
|
1461
|
+
* Required API Key ACLs:
|
|
1462
|
+
* - analytics.
|
|
1330
1463
|
*
|
|
1331
|
-
* @summary Get top filter values for an attribute.
|
|
1332
1464
|
* @param getTopFilterForAttribute - The getTopFilterForAttribute object.
|
|
1333
1465
|
* @param getTopFilterForAttribute.attribute - Attribute name.
|
|
1334
|
-
* @param getTopFilterForAttribute.index - Index name
|
|
1335
|
-
* @param getTopFilterForAttribute.search -
|
|
1336
|
-
* @param getTopFilterForAttribute.startDate - Start date
|
|
1337
|
-
* @param getTopFilterForAttribute.endDate - End date
|
|
1338
|
-
* @param getTopFilterForAttribute.limit - Number of
|
|
1339
|
-
* @param getTopFilterForAttribute.offset - Position of the
|
|
1340
|
-
* @param getTopFilterForAttribute.tags -
|
|
1466
|
+
* @param getTopFilterForAttribute.index - Index name.
|
|
1467
|
+
* @param getTopFilterForAttribute.search - Search query.
|
|
1468
|
+
* @param getTopFilterForAttribute.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1469
|
+
* @param getTopFilterForAttribute.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1470
|
+
* @param getTopFilterForAttribute.limit - Number of items to return.
|
|
1471
|
+
* @param getTopFilterForAttribute.offset - Position of the first item to return.
|
|
1472
|
+
* @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/).
|
|
1341
1473
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1342
1474
|
*/
|
|
1343
1475
|
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -1380,17 +1512,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1380
1512
|
return transporter.request(request, requestOptions);
|
|
1381
1513
|
},
|
|
1382
1514
|
/**
|
|
1383
|
-
*
|
|
1515
|
+
* 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.
|
|
1516
|
+
*
|
|
1517
|
+
* Required API Key ACLs:
|
|
1518
|
+
* - analytics.
|
|
1384
1519
|
*
|
|
1385
|
-
* @summary Get top filters for a no result search.
|
|
1386
1520
|
* @param getTopFiltersNoResults - The getTopFiltersNoResults object.
|
|
1387
|
-
* @param getTopFiltersNoResults.index - Index name
|
|
1388
|
-
* @param getTopFiltersNoResults.search -
|
|
1389
|
-
* @param getTopFiltersNoResults.startDate - Start date
|
|
1390
|
-
* @param getTopFiltersNoResults.endDate - End date
|
|
1391
|
-
* @param getTopFiltersNoResults.limit - Number of
|
|
1392
|
-
* @param getTopFiltersNoResults.offset - Position of the
|
|
1393
|
-
* @param getTopFiltersNoResults.tags -
|
|
1521
|
+
* @param getTopFiltersNoResults.index - Index name.
|
|
1522
|
+
* @param getTopFiltersNoResults.search - Search query.
|
|
1523
|
+
* @param getTopFiltersNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1524
|
+
* @param getTopFiltersNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1525
|
+
* @param getTopFiltersNoResults.limit - Number of items to return.
|
|
1526
|
+
* @param getTopFiltersNoResults.offset - Position of the first item to return.
|
|
1527
|
+
* @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/).
|
|
1394
1528
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1395
1529
|
*/
|
|
1396
1530
|
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -1430,21 +1564,24 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1430
1564
|
return transporter.request(request, requestOptions);
|
|
1431
1565
|
},
|
|
1432
1566
|
/**
|
|
1433
|
-
*
|
|
1567
|
+
* Retrieves the object IDs of the most frequent search results.
|
|
1568
|
+
*
|
|
1569
|
+
* Required API Key ACLs:
|
|
1570
|
+
* - analytics.
|
|
1434
1571
|
*
|
|
1435
|
-
* @summary Get top hits.
|
|
1436
1572
|
* @param getTopHits - The getTopHits object.
|
|
1437
|
-
* @param getTopHits.index - Index name
|
|
1438
|
-
* @param getTopHits.search -
|
|
1439
|
-
* @param getTopHits.clickAnalytics - Whether to include
|
|
1440
|
-
* @param getTopHits.
|
|
1441
|
-
* @param getTopHits.
|
|
1442
|
-
* @param getTopHits.
|
|
1443
|
-
* @param getTopHits.
|
|
1444
|
-
* @param getTopHits.
|
|
1573
|
+
* @param getTopHits.index - Index name.
|
|
1574
|
+
* @param getTopHits.search - Search query.
|
|
1575
|
+
* @param getTopHits.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
1576
|
+
* @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.
|
|
1577
|
+
* @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1578
|
+
* @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1579
|
+
* @param getTopHits.limit - Number of items to return.
|
|
1580
|
+
* @param getTopHits.offset - Position of the first item to return.
|
|
1581
|
+
* @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/).
|
|
1445
1582
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1446
1583
|
*/
|
|
1447
|
-
getTopHits({ index, search, clickAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
1584
|
+
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
1448
1585
|
if (!index) {
|
|
1449
1586
|
throw new Error('Parameter `index` is required when calling `getTopHits`.');
|
|
1450
1587
|
}
|
|
@@ -1460,6 +1597,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1460
1597
|
if (clickAnalytics !== undefined) {
|
|
1461
1598
|
queryParameters.clickAnalytics = clickAnalytics.toString();
|
|
1462
1599
|
}
|
|
1600
|
+
if (revenueAnalytics !== undefined) {
|
|
1601
|
+
queryParameters.revenueAnalytics = revenueAnalytics.toString();
|
|
1602
|
+
}
|
|
1463
1603
|
if (startDate !== undefined) {
|
|
1464
1604
|
queryParameters.startDate = startDate.toString();
|
|
1465
1605
|
}
|
|
@@ -1484,22 +1624,25 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1484
1624
|
return transporter.request(request, requestOptions);
|
|
1485
1625
|
},
|
|
1486
1626
|
/**
|
|
1487
|
-
* Returns the most popular
|
|
1627
|
+
* Returns the most popular search terms.
|
|
1628
|
+
*
|
|
1629
|
+
* Required API Key ACLs:
|
|
1630
|
+
* - analytics.
|
|
1488
1631
|
*
|
|
1489
|
-
* @summary Get top searches.
|
|
1490
1632
|
* @param getTopSearches - The getTopSearches object.
|
|
1491
|
-
* @param getTopSearches.index - Index name
|
|
1492
|
-
* @param getTopSearches.clickAnalytics - Whether to include
|
|
1493
|
-
* @param getTopSearches.
|
|
1494
|
-
* @param getTopSearches.
|
|
1495
|
-
* @param getTopSearches.
|
|
1633
|
+
* @param getTopSearches.index - Index name.
|
|
1634
|
+
* @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
1635
|
+
* @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.
|
|
1636
|
+
* @param getTopSearches.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1637
|
+
* @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1638
|
+
* @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
|
|
1496
1639
|
* @param getTopSearches.direction - Sorting direction of the results: ascending or descending.
|
|
1497
|
-
* @param getTopSearches.limit - Number of
|
|
1498
|
-
* @param getTopSearches.offset - Position of the
|
|
1499
|
-
* @param getTopSearches.tags -
|
|
1640
|
+
* @param getTopSearches.limit - Number of items to return.
|
|
1641
|
+
* @param getTopSearches.offset - Position of the first item to return.
|
|
1642
|
+
* @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/).
|
|
1500
1643
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1501
1644
|
*/
|
|
1502
|
-
getTopSearches({ index, clickAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
|
|
1645
|
+
getTopSearches({ index, clickAnalytics, revenueAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
|
|
1503
1646
|
if (!index) {
|
|
1504
1647
|
throw new Error('Parameter `index` is required when calling `getTopSearches`.');
|
|
1505
1648
|
}
|
|
@@ -1512,6 +1655,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1512
1655
|
if (clickAnalytics !== undefined) {
|
|
1513
1656
|
queryParameters.clickAnalytics = clickAnalytics.toString();
|
|
1514
1657
|
}
|
|
1658
|
+
if (revenueAnalytics !== undefined) {
|
|
1659
|
+
queryParameters.revenueAnalytics = revenueAnalytics.toString();
|
|
1660
|
+
}
|
|
1515
1661
|
if (startDate !== undefined) {
|
|
1516
1662
|
queryParameters.startDate = startDate.toString();
|
|
1517
1663
|
}
|
|
@@ -1542,14 +1688,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1542
1688
|
return transporter.request(request, requestOptions);
|
|
1543
1689
|
},
|
|
1544
1690
|
/**
|
|
1545
|
-
*
|
|
1691
|
+
* 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.
|
|
1692
|
+
*
|
|
1693
|
+
* Required API Key ACLs:
|
|
1694
|
+
* - analytics.
|
|
1546
1695
|
*
|
|
1547
|
-
* @summary Get user count.
|
|
1548
1696
|
* @param getUsersCount - The getUsersCount object.
|
|
1549
|
-
* @param getUsersCount.index - Index name
|
|
1550
|
-
* @param getUsersCount.startDate - Start date
|
|
1551
|
-
* @param getUsersCount.endDate - End date
|
|
1552
|
-
* @param getUsersCount.tags -
|
|
1697
|
+
* @param getUsersCount.index - Index name.
|
|
1698
|
+
* @param getUsersCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1699
|
+
* @param getUsersCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1700
|
+
* @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/).
|
|
1553
1701
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1554
1702
|
*/
|
|
1555
1703
|
getUsersCount({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -1583,6 +1731,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1583
1731
|
}
|
|
1584
1732
|
|
|
1585
1733
|
// 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.
|
|
1734
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
1586
1735
|
function analyticsClient(appId, apiKey, region, options) {
|
|
1587
1736
|
if (!appId || typeof appId !== 'string') {
|
|
1588
1737
|
throw new Error('`appId` is missing.');
|