@algolia/client-analytics 5.0.0-alpha.99 → 5.0.0-beta.2
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
|
@@ -207,7 +207,7 @@ function _toPrimitive(t, r) {
|
|
|
207
207
|
}
|
|
208
208
|
function _toPropertyKey(t) {
|
|
209
209
|
var i = _toPrimitive(t, "string");
|
|
210
|
-
return "symbol" == typeof i ? i :
|
|
210
|
+
return "symbol" == typeof i ? i : i + "";
|
|
211
211
|
}
|
|
212
212
|
function _defineProperty(obj, key, value) {
|
|
213
213
|
key = _toPropertyKey(key);
|
|
@@ -270,7 +270,7 @@ class DetailedApiError extends ApiError {
|
|
|
270
270
|
}
|
|
271
271
|
function serializeUrl(host, path, queryParameters) {
|
|
272
272
|
const queryParametersAsString = serializeQueryParameters(queryParameters);
|
|
273
|
-
let url = `${host.protocol}://${host.url}/${path.charAt(0) === '/' ? path.
|
|
273
|
+
let url = `${host.protocol}://${host.url}${host.port ? `:${host.port}` : ''}/${path.charAt(0) === '/' ? path.substring(1) : path}`;
|
|
274
274
|
if (queryParametersAsString.length) {
|
|
275
275
|
url += `?${queryParametersAsString}`;
|
|
276
276
|
}
|
|
@@ -278,7 +278,7 @@ function serializeUrl(host, path, queryParameters) {
|
|
|
278
278
|
}
|
|
279
279
|
function serializeQueryParameters(parameters) {
|
|
280
280
|
const isObjectOrArray = value => Object.prototype.toString.call(value) === '[object Object]' || Object.prototype.toString.call(value) === '[object Array]';
|
|
281
|
-
return Object.keys(parameters).map(key => `${key}=${encodeURIComponent(isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key])}`).join('&');
|
|
281
|
+
return Object.keys(parameters).map(key => `${key}=${encodeURIComponent(isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key]).replaceAll('+', '%20')}`).join('&');
|
|
282
282
|
}
|
|
283
283
|
function serializeData(request, requestOptions) {
|
|
284
284
|
if (request.method === 'GET' || request.data === undefined && requestOptions.data === undefined) {
|
|
@@ -449,16 +449,13 @@ function createTransporter({
|
|
|
449
449
|
if (host === undefined) {
|
|
450
450
|
throw new RetryError(stackTraceWithoutCredentials(stackTrace));
|
|
451
451
|
}
|
|
452
|
-
let responseTimeout = requestOptions.
|
|
453
|
-
if (responseTimeout === undefined) {
|
|
454
|
-
responseTimeout = isRead ? timeouts.read : timeouts.write;
|
|
455
|
-
}
|
|
452
|
+
let responseTimeout = isRead ? requestOptions.timeouts?.read || timeouts.read : requestOptions.timeouts?.write || timeouts.write;
|
|
456
453
|
const payload = {
|
|
457
454
|
data,
|
|
458
455
|
headers,
|
|
459
456
|
method: request.method,
|
|
460
457
|
url: serializeUrl(host, request.path, queryParameters),
|
|
461
|
-
connectTimeout: getTimeout(timeoutsCount, timeouts.connect),
|
|
458
|
+
connectTimeout: getTimeout(timeoutsCount, requestOptions.timeouts?.connect || timeouts.connect),
|
|
462
459
|
responseTimeout: getTimeout(timeoutsCount, responseTimeout)
|
|
463
460
|
};
|
|
464
461
|
/**
|
|
@@ -686,7 +683,7 @@ function createXhrRequester() {
|
|
|
686
683
|
}
|
|
687
684
|
|
|
688
685
|
// 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-
|
|
686
|
+
const apiClientVersion = '5.0.0-beta.2';
|
|
690
687
|
const REGIONS = ['de', 'us'];
|
|
691
688
|
function getDefaultHosts(region) {
|
|
692
689
|
const url = !region
|
|
@@ -748,7 +745,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
748
745
|
/**
|
|
749
746
|
* This method allow you to send requests to the Algolia REST API.
|
|
750
747
|
*
|
|
751
|
-
* @summary Send requests to the Algolia REST API.
|
|
752
748
|
* @param customDelete - The customDelete object.
|
|
753
749
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
754
750
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -758,7 +754,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
758
754
|
if (!path) {
|
|
759
755
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
760
756
|
}
|
|
761
|
-
const requestPath = '/
|
|
757
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
762
758
|
const headers = {};
|
|
763
759
|
const queryParameters = parameters ? parameters : {};
|
|
764
760
|
const request = {
|
|
@@ -772,7 +768,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
772
768
|
/**
|
|
773
769
|
* This method allow you to send requests to the Algolia REST API.
|
|
774
770
|
*
|
|
775
|
-
* @summary Send requests to the Algolia REST API.
|
|
776
771
|
* @param customGet - The customGet object.
|
|
777
772
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
778
773
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -782,7 +777,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
782
777
|
if (!path) {
|
|
783
778
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
784
779
|
}
|
|
785
|
-
const requestPath = '/
|
|
780
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
786
781
|
const headers = {};
|
|
787
782
|
const queryParameters = parameters ? parameters : {};
|
|
788
783
|
const request = {
|
|
@@ -796,7 +791,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
796
791
|
/**
|
|
797
792
|
* This method allow you to send requests to the Algolia REST API.
|
|
798
793
|
*
|
|
799
|
-
* @summary Send requests to the Algolia REST API.
|
|
800
794
|
* @param customPost - The customPost object.
|
|
801
795
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
802
796
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -807,7 +801,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
807
801
|
if (!path) {
|
|
808
802
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
809
803
|
}
|
|
810
|
-
const requestPath = '/
|
|
804
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
811
805
|
const headers = {};
|
|
812
806
|
const queryParameters = parameters ? parameters : {};
|
|
813
807
|
const request = {
|
|
@@ -822,7 +816,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
822
816
|
/**
|
|
823
817
|
* This method allow you to send requests to the Algolia REST API.
|
|
824
818
|
*
|
|
825
|
-
* @summary Send requests to the Algolia REST API.
|
|
826
819
|
* @param customPut - The customPut object.
|
|
827
820
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
828
821
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -833,7 +826,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
833
826
|
if (!path) {
|
|
834
827
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
835
828
|
}
|
|
836
|
-
const requestPath = '/
|
|
829
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
837
830
|
const headers = {};
|
|
838
831
|
const queryParameters = parameters ? parameters : {};
|
|
839
832
|
const request = {
|
|
@@ -846,14 +839,56 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
846
839
|
return transporter.request(request, requestOptions);
|
|
847
840
|
},
|
|
848
841
|
/**
|
|
849
|
-
*
|
|
842
|
+
* 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.
|
|
843
|
+
*
|
|
844
|
+
* Required API Key ACLs:
|
|
845
|
+
* - analytics.
|
|
846
|
+
*
|
|
847
|
+
* @param getAddToCartRate - The getAddToCartRate object.
|
|
848
|
+
* @param getAddToCartRate.index - Index name.
|
|
849
|
+
* @param getAddToCartRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
850
|
+
* @param getAddToCartRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
851
|
+
* @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/).
|
|
852
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
853
|
+
*/
|
|
854
|
+
getAddToCartRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
855
|
+
if (!index) {
|
|
856
|
+
throw new Error('Parameter `index` is required when calling `getAddToCartRate`.');
|
|
857
|
+
}
|
|
858
|
+
const requestPath = '/2/conversions/addToCartRate';
|
|
859
|
+
const headers = {};
|
|
860
|
+
const queryParameters = {};
|
|
861
|
+
if (index !== undefined) {
|
|
862
|
+
queryParameters.index = index.toString();
|
|
863
|
+
}
|
|
864
|
+
if (startDate !== undefined) {
|
|
865
|
+
queryParameters.startDate = startDate.toString();
|
|
866
|
+
}
|
|
867
|
+
if (endDate !== undefined) {
|
|
868
|
+
queryParameters.endDate = endDate.toString();
|
|
869
|
+
}
|
|
870
|
+
if (tags !== undefined) {
|
|
871
|
+
queryParameters.tags = tags.toString();
|
|
872
|
+
}
|
|
873
|
+
const request = {
|
|
874
|
+
method: 'GET',
|
|
875
|
+
path: requestPath,
|
|
876
|
+
queryParameters,
|
|
877
|
+
headers,
|
|
878
|
+
};
|
|
879
|
+
return transporter.request(request, requestOptions);
|
|
880
|
+
},
|
|
881
|
+
/**
|
|
882
|
+
* 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.
|
|
883
|
+
*
|
|
884
|
+
* Required API Key ACLs:
|
|
885
|
+
* - analytics.
|
|
850
886
|
*
|
|
851
|
-
* @summary Get average click position.
|
|
852
887
|
* @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 -
|
|
888
|
+
* @param getAverageClickPosition.index - Index name.
|
|
889
|
+
* @param getAverageClickPosition.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
890
|
+
* @param getAverageClickPosition.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
891
|
+
* @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
892
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
858
893
|
*/
|
|
859
894
|
getAverageClickPosition({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -884,14 +919,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
884
919
|
return transporter.request(request, requestOptions);
|
|
885
920
|
},
|
|
886
921
|
/**
|
|
887
|
-
*
|
|
922
|
+
* 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.
|
|
923
|
+
*
|
|
924
|
+
* Required API Key ACLs:
|
|
925
|
+
* - analytics.
|
|
888
926
|
*
|
|
889
|
-
* @summary Get click positions.
|
|
890
927
|
* @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 -
|
|
928
|
+
* @param getClickPositions.index - Index name.
|
|
929
|
+
* @param getClickPositions.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
930
|
+
* @param getClickPositions.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
931
|
+
* @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
932
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
896
933
|
*/
|
|
897
934
|
getClickPositions({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -922,14 +959,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
922
959
|
return transporter.request(request, requestOptions);
|
|
923
960
|
},
|
|
924
961
|
/**
|
|
925
|
-
*
|
|
962
|
+
* 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.
|
|
963
|
+
*
|
|
964
|
+
* Required API Key ACLs:
|
|
965
|
+
* - analytics.
|
|
926
966
|
*
|
|
927
|
-
* @summary Get click-through rate (CTR).
|
|
928
967
|
* @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 -
|
|
968
|
+
* @param getClickThroughRate.index - Index name.
|
|
969
|
+
* @param getClickThroughRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
970
|
+
* @param getClickThroughRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
971
|
+
* @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
972
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
934
973
|
*/
|
|
935
974
|
getClickThroughRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -960,19 +999,21 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
960
999
|
return transporter.request(request, requestOptions);
|
|
961
1000
|
},
|
|
962
1001
|
/**
|
|
963
|
-
*
|
|
1002
|
+
* 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.
|
|
1003
|
+
*
|
|
1004
|
+
* Required API Key ACLs:
|
|
1005
|
+
* - analytics.
|
|
964
1006
|
*
|
|
965
|
-
* @
|
|
966
|
-
* @param
|
|
967
|
-
* @param
|
|
968
|
-
* @param
|
|
969
|
-
* @param
|
|
970
|
-
* @param getConversationRate.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
|
1007
|
+
* @param getConversionRate - The getConversionRate object.
|
|
1008
|
+
* @param getConversionRate.index - Index name.
|
|
1009
|
+
* @param getConversionRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1010
|
+
* @param getConversionRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1011
|
+
* @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
1012
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
972
1013
|
*/
|
|
973
|
-
|
|
1014
|
+
getConversionRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
974
1015
|
if (!index) {
|
|
975
|
-
throw new Error('Parameter `index` is required when calling `
|
|
1016
|
+
throw new Error('Parameter `index` is required when calling `getConversionRate`.');
|
|
976
1017
|
}
|
|
977
1018
|
const requestPath = '/2/conversions/conversionRate';
|
|
978
1019
|
const headers = {};
|
|
@@ -998,14 +1039,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
998
1039
|
return transporter.request(request, requestOptions);
|
|
999
1040
|
},
|
|
1000
1041
|
/**
|
|
1001
|
-
*
|
|
1042
|
+
* 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.
|
|
1043
|
+
*
|
|
1044
|
+
* Required API Key ACLs:
|
|
1045
|
+
* - analytics.
|
|
1002
1046
|
*
|
|
1003
|
-
* @summary Get no click rate.
|
|
1004
1047
|
* @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 -
|
|
1048
|
+
* @param getNoClickRate.index - Index name.
|
|
1049
|
+
* @param getNoClickRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1050
|
+
* @param getNoClickRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1051
|
+
* @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
1052
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1010
1053
|
*/
|
|
1011
1054
|
getNoClickRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -1036,14 +1079,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1036
1079
|
return transporter.request(request, requestOptions);
|
|
1037
1080
|
},
|
|
1038
1081
|
/**
|
|
1039
|
-
*
|
|
1082
|
+
* 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.
|
|
1083
|
+
*
|
|
1084
|
+
* Required API Key ACLs:
|
|
1085
|
+
* - analytics.
|
|
1040
1086
|
*
|
|
1041
|
-
* @summary Get no results rate.
|
|
1042
1087
|
* @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 -
|
|
1088
|
+
* @param getNoResultsRate.index - Index name.
|
|
1089
|
+
* @param getNoResultsRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1090
|
+
* @param getNoResultsRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1091
|
+
* @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
1092
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1048
1093
|
*/
|
|
1049
1094
|
getNoResultsRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -1074,14 +1119,96 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1074
1119
|
return transporter.request(request, requestOptions);
|
|
1075
1120
|
},
|
|
1076
1121
|
/**
|
|
1077
|
-
*
|
|
1122
|
+
* 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.
|
|
1123
|
+
*
|
|
1124
|
+
* Required API Key ACLs:
|
|
1125
|
+
* - analytics.
|
|
1126
|
+
*
|
|
1127
|
+
* @param getPurchaseRate - The getPurchaseRate object.
|
|
1128
|
+
* @param getPurchaseRate.index - Index name.
|
|
1129
|
+
* @param getPurchaseRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1130
|
+
* @param getPurchaseRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1131
|
+
* @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/).
|
|
1132
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1133
|
+
*/
|
|
1134
|
+
getPurchaseRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
1135
|
+
if (!index) {
|
|
1136
|
+
throw new Error('Parameter `index` is required when calling `getPurchaseRate`.');
|
|
1137
|
+
}
|
|
1138
|
+
const requestPath = '/2/conversions/purchaseRate';
|
|
1139
|
+
const headers = {};
|
|
1140
|
+
const queryParameters = {};
|
|
1141
|
+
if (index !== undefined) {
|
|
1142
|
+
queryParameters.index = index.toString();
|
|
1143
|
+
}
|
|
1144
|
+
if (startDate !== undefined) {
|
|
1145
|
+
queryParameters.startDate = startDate.toString();
|
|
1146
|
+
}
|
|
1147
|
+
if (endDate !== undefined) {
|
|
1148
|
+
queryParameters.endDate = endDate.toString();
|
|
1149
|
+
}
|
|
1150
|
+
if (tags !== undefined) {
|
|
1151
|
+
queryParameters.tags = tags.toString();
|
|
1152
|
+
}
|
|
1153
|
+
const request = {
|
|
1154
|
+
method: 'GET',
|
|
1155
|
+
path: requestPath,
|
|
1156
|
+
queryParameters,
|
|
1157
|
+
headers,
|
|
1158
|
+
};
|
|
1159
|
+
return transporter.request(request, requestOptions);
|
|
1160
|
+
},
|
|
1161
|
+
/**
|
|
1162
|
+
* 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.
|
|
1163
|
+
*
|
|
1164
|
+
* Required API Key ACLs:
|
|
1165
|
+
* - analytics.
|
|
1166
|
+
*
|
|
1167
|
+
* @param getRevenue - The getRevenue object.
|
|
1168
|
+
* @param getRevenue.index - Index name.
|
|
1169
|
+
* @param getRevenue.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1170
|
+
* @param getRevenue.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1171
|
+
* @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/).
|
|
1172
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1173
|
+
*/
|
|
1174
|
+
getRevenue({ index, startDate, endDate, tags }, requestOptions) {
|
|
1175
|
+
if (!index) {
|
|
1176
|
+
throw new Error('Parameter `index` is required when calling `getRevenue`.');
|
|
1177
|
+
}
|
|
1178
|
+
const requestPath = '/2/conversions/revenue';
|
|
1179
|
+
const headers = {};
|
|
1180
|
+
const queryParameters = {};
|
|
1181
|
+
if (index !== undefined) {
|
|
1182
|
+
queryParameters.index = index.toString();
|
|
1183
|
+
}
|
|
1184
|
+
if (startDate !== undefined) {
|
|
1185
|
+
queryParameters.startDate = startDate.toString();
|
|
1186
|
+
}
|
|
1187
|
+
if (endDate !== undefined) {
|
|
1188
|
+
queryParameters.endDate = endDate.toString();
|
|
1189
|
+
}
|
|
1190
|
+
if (tags !== undefined) {
|
|
1191
|
+
queryParameters.tags = tags.toString();
|
|
1192
|
+
}
|
|
1193
|
+
const request = {
|
|
1194
|
+
method: 'GET',
|
|
1195
|
+
path: requestPath,
|
|
1196
|
+
queryParameters,
|
|
1197
|
+
headers,
|
|
1198
|
+
};
|
|
1199
|
+
return transporter.request(request, requestOptions);
|
|
1200
|
+
},
|
|
1201
|
+
/**
|
|
1202
|
+
* 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.
|
|
1203
|
+
*
|
|
1204
|
+
* Required API Key ACLs:
|
|
1205
|
+
* - analytics.
|
|
1078
1206
|
*
|
|
1079
|
-
* @summary Get number of searches.
|
|
1080
1207
|
* @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 -
|
|
1208
|
+
* @param getSearchesCount.index - Index name.
|
|
1209
|
+
* @param getSearchesCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1210
|
+
* @param getSearchesCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1211
|
+
* @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
1212
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1086
1213
|
*/
|
|
1087
1214
|
getSearchesCount({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -1112,16 +1239,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1112
1239
|
return transporter.request(request, requestOptions);
|
|
1113
1240
|
},
|
|
1114
1241
|
/**
|
|
1115
|
-
*
|
|
1242
|
+
* Retrieves the most popular searches that didn\'t lead to any clicks, from the 1,000 most frequent searches.
|
|
1243
|
+
*
|
|
1244
|
+
* Required API Key ACLs:
|
|
1245
|
+
* - analytics.
|
|
1116
1246
|
*
|
|
1117
|
-
* @summary Get top searches with no clicks.
|
|
1118
1247
|
* @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 -
|
|
1248
|
+
* @param getSearchesNoClicks.index - Index name.
|
|
1249
|
+
* @param getSearchesNoClicks.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1250
|
+
* @param getSearchesNoClicks.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1251
|
+
* @param getSearchesNoClicks.limit - Number of items to return.
|
|
1252
|
+
* @param getSearchesNoClicks.offset - Position of the first item to return.
|
|
1253
|
+
* @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
1254
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1126
1255
|
*/
|
|
1127
1256
|
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -1158,16 +1287,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1158
1287
|
return transporter.request(request, requestOptions);
|
|
1159
1288
|
},
|
|
1160
1289
|
/**
|
|
1161
|
-
*
|
|
1290
|
+
* Retrieves the most popular searches that didn\'t return any results.
|
|
1291
|
+
*
|
|
1292
|
+
* Required API Key ACLs:
|
|
1293
|
+
* - analytics.
|
|
1162
1294
|
*
|
|
1163
|
-
* @summary Get top searches with no results.
|
|
1164
1295
|
* @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 -
|
|
1296
|
+
* @param getSearchesNoResults.index - Index name.
|
|
1297
|
+
* @param getSearchesNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1298
|
+
* @param getSearchesNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1299
|
+
* @param getSearchesNoResults.limit - Number of items to return.
|
|
1300
|
+
* @param getSearchesNoResults.offset - Position of the first item to return.
|
|
1301
|
+
* @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
1302
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1172
1303
|
*/
|
|
1173
1304
|
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -1204,11 +1335,13 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1204
1335
|
return transporter.request(request, requestOptions);
|
|
1205
1336
|
},
|
|
1206
1337
|
/**
|
|
1207
|
-
*
|
|
1338
|
+
* Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.
|
|
1339
|
+
*
|
|
1340
|
+
* Required API Key ACLs:
|
|
1341
|
+
* - analytics.
|
|
1208
1342
|
*
|
|
1209
|
-
* @summary Get Analytics API status.
|
|
1210
1343
|
* @param getStatus - The getStatus object.
|
|
1211
|
-
* @param getStatus.index - Index name
|
|
1344
|
+
* @param getStatus.index - Index name.
|
|
1212
1345
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1213
1346
|
*/
|
|
1214
1347
|
getStatus({ index }, requestOptions) {
|
|
@@ -1230,16 +1363,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1230
1363
|
return transporter.request(request, requestOptions);
|
|
1231
1364
|
},
|
|
1232
1365
|
/**
|
|
1233
|
-
*
|
|
1366
|
+
* Retrieves the countries with the most searches to your index.
|
|
1367
|
+
*
|
|
1368
|
+
* Required API Key ACLs:
|
|
1369
|
+
* - analytics.
|
|
1234
1370
|
*
|
|
1235
|
-
* @summary Get top countries.
|
|
1236
1371
|
* @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 -
|
|
1372
|
+
* @param getTopCountries.index - Index name.
|
|
1373
|
+
* @param getTopCountries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1374
|
+
* @param getTopCountries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1375
|
+
* @param getTopCountries.limit - Number of items to return.
|
|
1376
|
+
* @param getTopCountries.offset - Position of the first item to return.
|
|
1377
|
+
* @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
1378
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1244
1379
|
*/
|
|
1245
1380
|
getTopCountries({ index, startDate, endDate, limit, offset, tags }, requestOptions) {
|
|
@@ -1276,17 +1411,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1276
1411
|
return transporter.request(request, requestOptions);
|
|
1277
1412
|
},
|
|
1278
1413
|
/**
|
|
1279
|
-
*
|
|
1414
|
+
* Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
1415
|
+
*
|
|
1416
|
+
* Required API Key ACLs:
|
|
1417
|
+
* - analytics.
|
|
1280
1418
|
*
|
|
1281
|
-
* @summary Get top filterable attributes.
|
|
1282
1419
|
* @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 -
|
|
1420
|
+
* @param getTopFilterAttributes.index - Index name.
|
|
1421
|
+
* @param getTopFilterAttributes.search - Search query.
|
|
1422
|
+
* @param getTopFilterAttributes.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1423
|
+
* @param getTopFilterAttributes.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1424
|
+
* @param getTopFilterAttributes.limit - Number of items to return.
|
|
1425
|
+
* @param getTopFilterAttributes.offset - Position of the first item to return.
|
|
1426
|
+
* @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
1427
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1291
1428
|
*/
|
|
1292
1429
|
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -1326,18 +1463,20 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1326
1463
|
return transporter.request(request, requestOptions);
|
|
1327
1464
|
},
|
|
1328
1465
|
/**
|
|
1329
|
-
*
|
|
1466
|
+
* Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
1467
|
+
*
|
|
1468
|
+
* Required API Key ACLs:
|
|
1469
|
+
* - analytics.
|
|
1330
1470
|
*
|
|
1331
|
-
* @summary Get top filter values for an attribute.
|
|
1332
1471
|
* @param getTopFilterForAttribute - The getTopFilterForAttribute object.
|
|
1333
1472
|
* @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 -
|
|
1473
|
+
* @param getTopFilterForAttribute.index - Index name.
|
|
1474
|
+
* @param getTopFilterForAttribute.search - Search query.
|
|
1475
|
+
* @param getTopFilterForAttribute.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1476
|
+
* @param getTopFilterForAttribute.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1477
|
+
* @param getTopFilterForAttribute.limit - Number of items to return.
|
|
1478
|
+
* @param getTopFilterForAttribute.offset - Position of the first item to return.
|
|
1479
|
+
* @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
1480
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1342
1481
|
*/
|
|
1343
1482
|
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -1380,17 +1519,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1380
1519
|
return transporter.request(request, requestOptions);
|
|
1381
1520
|
},
|
|
1382
1521
|
/**
|
|
1383
|
-
*
|
|
1522
|
+
* 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.
|
|
1523
|
+
*
|
|
1524
|
+
* Required API Key ACLs:
|
|
1525
|
+
* - analytics.
|
|
1384
1526
|
*
|
|
1385
|
-
* @summary Get top filters for a no result search.
|
|
1386
1527
|
* @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 -
|
|
1528
|
+
* @param getTopFiltersNoResults.index - Index name.
|
|
1529
|
+
* @param getTopFiltersNoResults.search - Search query.
|
|
1530
|
+
* @param getTopFiltersNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1531
|
+
* @param getTopFiltersNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1532
|
+
* @param getTopFiltersNoResults.limit - Number of items to return.
|
|
1533
|
+
* @param getTopFiltersNoResults.offset - Position of the first item to return.
|
|
1534
|
+
* @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
1535
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1395
1536
|
*/
|
|
1396
1537
|
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -1430,21 +1571,24 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1430
1571
|
return transporter.request(request, requestOptions);
|
|
1431
1572
|
},
|
|
1432
1573
|
/**
|
|
1433
|
-
*
|
|
1574
|
+
* Retrieves the object IDs of the most frequent search results.
|
|
1575
|
+
*
|
|
1576
|
+
* Required API Key ACLs:
|
|
1577
|
+
* - analytics.
|
|
1434
1578
|
*
|
|
1435
|
-
* @summary Get top hits.
|
|
1436
1579
|
* @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.
|
|
1580
|
+
* @param getTopHits.index - Index name.
|
|
1581
|
+
* @param getTopHits.search - Search query.
|
|
1582
|
+
* @param getTopHits.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
1583
|
+
* @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.
|
|
1584
|
+
* @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1585
|
+
* @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1586
|
+
* @param getTopHits.limit - Number of items to return.
|
|
1587
|
+
* @param getTopHits.offset - Position of the first item to return.
|
|
1588
|
+
* @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
1589
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1446
1590
|
*/
|
|
1447
|
-
getTopHits({ index, search, clickAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
1591
|
+
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
1448
1592
|
if (!index) {
|
|
1449
1593
|
throw new Error('Parameter `index` is required when calling `getTopHits`.');
|
|
1450
1594
|
}
|
|
@@ -1460,6 +1604,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1460
1604
|
if (clickAnalytics !== undefined) {
|
|
1461
1605
|
queryParameters.clickAnalytics = clickAnalytics.toString();
|
|
1462
1606
|
}
|
|
1607
|
+
if (revenueAnalytics !== undefined) {
|
|
1608
|
+
queryParameters.revenueAnalytics = revenueAnalytics.toString();
|
|
1609
|
+
}
|
|
1463
1610
|
if (startDate !== undefined) {
|
|
1464
1611
|
queryParameters.startDate = startDate.toString();
|
|
1465
1612
|
}
|
|
@@ -1484,22 +1631,25 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1484
1631
|
return transporter.request(request, requestOptions);
|
|
1485
1632
|
},
|
|
1486
1633
|
/**
|
|
1487
|
-
* Returns the most popular
|
|
1634
|
+
* Returns the most popular search terms.
|
|
1635
|
+
*
|
|
1636
|
+
* Required API Key ACLs:
|
|
1637
|
+
* - analytics.
|
|
1488
1638
|
*
|
|
1489
|
-
* @summary Get top searches.
|
|
1490
1639
|
* @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.
|
|
1640
|
+
* @param getTopSearches.index - Index name.
|
|
1641
|
+
* @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
1642
|
+
* @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.
|
|
1643
|
+
* @param getTopSearches.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1644
|
+
* @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1645
|
+
* @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
|
|
1496
1646
|
* @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 -
|
|
1647
|
+
* @param getTopSearches.limit - Number of items to return.
|
|
1648
|
+
* @param getTopSearches.offset - Position of the first item to return.
|
|
1649
|
+
* @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
1650
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1501
1651
|
*/
|
|
1502
|
-
getTopSearches({ index, clickAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
|
|
1652
|
+
getTopSearches({ index, clickAnalytics, revenueAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
|
|
1503
1653
|
if (!index) {
|
|
1504
1654
|
throw new Error('Parameter `index` is required when calling `getTopSearches`.');
|
|
1505
1655
|
}
|
|
@@ -1512,6 +1662,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1512
1662
|
if (clickAnalytics !== undefined) {
|
|
1513
1663
|
queryParameters.clickAnalytics = clickAnalytics.toString();
|
|
1514
1664
|
}
|
|
1665
|
+
if (revenueAnalytics !== undefined) {
|
|
1666
|
+
queryParameters.revenueAnalytics = revenueAnalytics.toString();
|
|
1667
|
+
}
|
|
1515
1668
|
if (startDate !== undefined) {
|
|
1516
1669
|
queryParameters.startDate = startDate.toString();
|
|
1517
1670
|
}
|
|
@@ -1542,14 +1695,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1542
1695
|
return transporter.request(request, requestOptions);
|
|
1543
1696
|
},
|
|
1544
1697
|
/**
|
|
1545
|
-
*
|
|
1698
|
+
* 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.
|
|
1699
|
+
*
|
|
1700
|
+
* Required API Key ACLs:
|
|
1701
|
+
* - analytics.
|
|
1546
1702
|
*
|
|
1547
|
-
* @summary Get user count.
|
|
1548
1703
|
* @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 -
|
|
1704
|
+
* @param getUsersCount.index - Index name.
|
|
1705
|
+
* @param getUsersCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1706
|
+
* @param getUsersCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1707
|
+
* @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
1708
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1554
1709
|
*/
|
|
1555
1710
|
getUsersCount({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -1583,6 +1738,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1583
1738
|
}
|
|
1584
1739
|
|
|
1585
1740
|
// 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.
|
|
1741
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
1586
1742
|
function analyticsClient(appId, apiKey, region, options) {
|
|
1587
1743
|
if (!appId || typeof appId !== 'string') {
|
|
1588
1744
|
throw new Error('`appId` is missing.');
|