@algolia/client-analytics 5.0.0-alpha.108 → 5.0.0-alpha.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builds/browser.d.ts +6 -3
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +6 -3
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/client-analytics.cjs +181 -53
- package/dist/client-analytics.esm.browser.js +182 -54
- package/dist/client-analytics.esm.node.js +181 -53
- package/dist/client-analytics.umd.js +2 -2
- package/dist/model/clickPositionsInner.d.ts +14 -0
- package/dist/model/clickPositionsInner.d.ts.map +1 -0
- package/dist/model/clientMethodProps.d.ts +96 -25
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/currenciesValue.d.ts +14 -0
- package/dist/model/currenciesValue.d.ts.map +1 -0
- package/dist/model/dailyAddToCartRates.d.ts +19 -0
- package/dist/model/dailyAddToCartRates.d.ts.map +1 -0
- package/dist/model/dailyAverageClicks.d.ts +15 -0
- package/dist/model/dailyAverageClicks.d.ts.map +1 -0
- package/dist/model/dailyClickThroughRates.d.ts +19 -0
- package/dist/model/dailyClickThroughRates.d.ts.map +1 -0
- package/dist/model/dailyConversionRates.d.ts +19 -0
- package/dist/model/dailyConversionRates.d.ts.map +1 -0
- package/dist/model/dailyNoClickRates.d.ts +19 -0
- package/dist/model/dailyNoClickRates.d.ts.map +1 -0
- package/dist/model/dailyNoResultsRates.d.ts +19 -0
- package/dist/model/dailyNoResultsRates.d.ts.map +1 -0
- package/dist/model/dailyPurchaseRates.d.ts +19 -0
- package/dist/model/dailyPurchaseRates.d.ts.map +1 -0
- package/dist/model/dailyRevenue.d.ts +12 -0
- package/dist/model/dailyRevenue.d.ts.map +1 -0
- package/dist/model/dailySearches.d.ts +11 -0
- package/dist/model/dailySearches.d.ts.map +1 -0
- package/dist/model/dailySearchesNoClicks.d.ts +15 -0
- package/dist/model/dailySearchesNoClicks.d.ts.map +1 -0
- package/dist/model/dailySearchesNoResults.d.ts +15 -0
- package/dist/model/dailySearchesNoResults.d.ts.map +1 -0
- package/dist/model/dailyUsers.d.ts +11 -0
- package/dist/model/dailyUsers.d.ts.map +1 -0
- package/dist/model/getAddToCartRateResponse.d.ts +20 -0
- package/dist/model/getAddToCartRateResponse.d.ts.map +1 -0
- package/dist/model/getAverageClickPositionResponse.d.ts +6 -6
- package/dist/model/getAverageClickPositionResponse.d.ts.map +1 -1
- package/dist/model/getClickPositionsResponse.d.ts +3 -3
- package/dist/model/getClickPositionsResponse.d.ts.map +1 -1
- package/dist/model/getClickThroughRateResponse.d.ts +8 -8
- package/dist/model/getClickThroughRateResponse.d.ts.map +1 -1
- package/dist/model/getConversionRateResponse.d.ts +20 -0
- package/dist/model/getConversionRateResponse.d.ts.map +1 -0
- package/dist/model/getNoClickRateResponse.d.ts +6 -6
- package/dist/model/getNoClickRateResponse.d.ts.map +1 -1
- package/dist/model/getNoResultsRateResponse.d.ts +6 -6
- package/dist/model/getNoResultsRateResponse.d.ts.map +1 -1
- package/dist/model/getPurchaseRateResponse.d.ts +20 -0
- package/dist/model/getPurchaseRateResponse.d.ts.map +1 -0
- package/dist/model/getRevenue.d.ts +13 -0
- package/dist/model/getRevenue.d.ts.map +1 -0
- package/dist/model/getSearchesCountResponse.d.ts +3 -3
- package/dist/model/getSearchesCountResponse.d.ts.map +1 -1
- package/dist/model/getSearchesNoClicksResponse.d.ts +3 -3
- package/dist/model/getSearchesNoClicksResponse.d.ts.map +1 -1
- package/dist/model/getSearchesNoResultsResponse.d.ts +3 -3
- package/dist/model/getSearchesNoResultsResponse.d.ts.map +1 -1
- package/dist/model/getStatusResponse.d.ts +2 -2
- package/dist/model/getStatusResponse.d.ts.map +1 -1
- package/dist/model/getTopCountriesResponse.d.ts +1 -1
- package/dist/model/getTopFilterAttributesResponse.d.ts +1 -1
- package/dist/model/getTopFilterForAttribute.d.ts +2 -4
- package/dist/model/getTopFilterForAttribute.d.ts.map +1 -1
- package/dist/model/getTopFiltersNoResultsResponse.d.ts +2 -2
- package/dist/model/getTopFiltersNoResultsResponse.d.ts.map +1 -1
- package/dist/model/getTopFiltersNoResultsValue.d.ts +2 -4
- package/dist/model/getTopFiltersNoResultsValue.d.ts.map +1 -1
- package/dist/model/getTopHitsResponse.d.ts +2 -1
- package/dist/model/getTopHitsResponse.d.ts.map +1 -1
- package/dist/model/getTopSearchesResponse.d.ts +2 -1
- package/dist/model/getTopSearchesResponse.d.ts.map +1 -1
- package/dist/model/getUsersCountResponse.d.ts +4 -4
- package/dist/model/getUsersCountResponse.d.ts.map +1 -1
- package/dist/model/index.d.ts +23 -11
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/operator.d.ts +5 -0
- package/dist/model/operator.d.ts.map +1 -0
- package/dist/model/orderBy.d.ts +1 -1
- package/dist/model/topCountry.d.ts +1 -1
- package/dist/model/topHit.d.ts +1 -1
- package/dist/model/topHitWithAnalytics.d.ts +9 -9
- package/dist/model/topHitWithAnalytics.d.ts.map +1 -1
- package/dist/model/topHitWithRevenueAnalytics.d.ts +52 -0
- package/dist/model/topHitWithRevenueAnalytics.d.ts.map +1 -0
- package/dist/model/topHitsResponse.d.ts +1 -1
- package/dist/model/topHitsResponseWithAnalytics.d.ts +1 -1
- package/dist/model/topHitsResponseWithRevenueAnalytics.d.ts +8 -0
- package/dist/model/topHitsResponseWithRevenueAnalytics.d.ts.map +1 -0
- package/dist/model/topSearch.d.ts +2 -2
- package/dist/model/topSearchWithAnalytics.d.ts +17 -12
- package/dist/model/topSearchWithAnalytics.d.ts.map +1 -1
- package/dist/model/topSearchWithRevenueAnalytics.d.ts +65 -0
- package/dist/model/topSearchWithRevenueAnalytics.d.ts.map +1 -0
- package/dist/model/topSearchesResponse.d.ts +1 -1
- package/dist/model/topSearchesResponseWithAnalytics.d.ts +1 -1
- package/dist/model/topSearchesResponseWithRevenueAnalytics.d.ts +8 -0
- package/dist/model/topSearchesResponseWithRevenueAnalytics.d.ts.map +1 -0
- package/dist/src/analyticsClient.d.ts +97 -50
- package/dist/src/analyticsClient.d.ts.map +1 -1
- package/model/clickPositionsInner.ts +16 -0
- package/model/clientMethodProps.ts +99 -25
- package/model/currenciesValue.ts +16 -0
- package/model/dailyAddToCartRates.ts +23 -0
- package/model/dailyAverageClicks.ts +18 -0
- package/model/dailyClickThroughRates.ts +23 -0
- package/model/dailyConversionRates.ts +23 -0
- package/model/dailyNoClickRates.ts +23 -0
- package/model/dailyNoResultsRates.ts +23 -0
- package/model/dailyPurchaseRates.ts +23 -0
- package/model/dailyRevenue.ts +15 -0
- package/model/{searchEvent.ts → dailySearches.ts} +2 -2
- package/model/{searchNoResultEvent.ts → dailySearchesNoClicks.ts} +3 -3
- package/model/{searchNoClickEvent.ts → dailySearchesNoResults.ts} +3 -3
- package/model/{userWithDate.ts → dailyUsers.ts} +3 -3
- package/model/getAddToCartRateResponse.ts +25 -0
- package/model/getAverageClickPositionResponse.ts +6 -6
- package/model/getClickPositionsResponse.ts +3 -3
- package/model/getClickThroughRateResponse.ts +8 -8
- package/model/getConversionRateResponse.ts +25 -0
- package/model/getNoClickRateResponse.ts +6 -6
- package/model/getNoResultsRateResponse.ts +6 -6
- package/model/getPurchaseRateResponse.ts +25 -0
- package/model/getRevenue.ts +16 -0
- package/model/getSearchesCountResponse.ts +3 -3
- package/model/getSearchesNoClicksResponse.ts +3 -3
- package/model/getSearchesNoResultsResponse.ts +3 -3
- package/model/getStatusResponse.ts +2 -2
- package/model/getTopCountriesResponse.ts +1 -1
- package/model/getTopFilterAttributesResponse.ts +1 -1
- package/model/getTopFilterForAttribute.ts +3 -4
- package/model/getTopFiltersNoResultsResponse.ts +2 -2
- package/model/getTopFiltersNoResultsValue.ts +3 -4
- package/model/getTopHitsResponse.ts +5 -1
- package/model/getTopSearchesResponse.ts +3 -1
- package/model/getUsersCountResponse.ts +4 -4
- package/model/index.ts +23 -11
- package/model/operator.ts +6 -0
- package/model/orderBy.ts +1 -1
- package/model/topCountry.ts +1 -1
- package/model/topHit.ts +1 -1
- package/model/topHitWithAnalytics.ts +9 -9
- package/model/topHitWithRevenueAnalytics.ts +65 -0
- package/model/topHitsResponse.ts +1 -1
- package/model/topHitsResponseWithAnalytics.ts +1 -1
- package/model/topHitsResponseWithRevenueAnalytics.ts +10 -0
- package/model/topSearch.ts +2 -2
- package/model/topSearchWithAnalytics.ts +19 -12
- package/model/topSearchWithRevenueAnalytics.ts +81 -0
- package/model/topSearchesResponse.ts +1 -1
- package/model/topSearchesResponseWithAnalytics.ts +1 -1
- package/model/topSearchesResponseWithRevenueAnalytics.ts +10 -0
- package/package.json +6 -6
- 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);
|
|
@@ -686,7 +686,7 @@ function createXhrRequester() {
|
|
|
686
686
|
}
|
|
687
687
|
|
|
688
688
|
// 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-alpha.
|
|
689
|
+
const apiClientVersion = '5.0.0-alpha.109';
|
|
690
690
|
const REGIONS = ['de', 'us'];
|
|
691
691
|
function getDefaultHosts(region) {
|
|
692
692
|
const url = !region
|
|
@@ -757,7 +757,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
757
757
|
if (!path) {
|
|
758
758
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
759
759
|
}
|
|
760
|
-
const requestPath = '/
|
|
760
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
761
761
|
const headers = {};
|
|
762
762
|
const queryParameters = parameters ? parameters : {};
|
|
763
763
|
const request = {
|
|
@@ -780,7 +780,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
780
780
|
if (!path) {
|
|
781
781
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
782
782
|
}
|
|
783
|
-
const requestPath = '/
|
|
783
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
784
784
|
const headers = {};
|
|
785
785
|
const queryParameters = parameters ? parameters : {};
|
|
786
786
|
const request = {
|
|
@@ -804,7 +804,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
804
804
|
if (!path) {
|
|
805
805
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
806
806
|
}
|
|
807
|
-
const requestPath = '/
|
|
807
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
808
808
|
const headers = {};
|
|
809
809
|
const queryParameters = parameters ? parameters : {};
|
|
810
810
|
const request = {
|
|
@@ -829,7 +829,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
829
829
|
if (!path) {
|
|
830
830
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
831
831
|
}
|
|
832
|
-
const requestPath = '/
|
|
832
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
833
833
|
const headers = {};
|
|
834
834
|
const queryParameters = parameters ? parameters : {};
|
|
835
835
|
const request = {
|
|
@@ -842,7 +842,47 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
842
842
|
return transporter.request(request, requestOptions);
|
|
843
843
|
},
|
|
844
844
|
/**
|
|
845
|
-
*
|
|
845
|
+
* 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.
|
|
846
|
+
*
|
|
847
|
+
* Required API Key ACLs:
|
|
848
|
+
* - analytics.
|
|
849
|
+
*
|
|
850
|
+
* @param getAddToCartRate - The getAddToCartRate object.
|
|
851
|
+
* @param getAddToCartRate.index - Index name.
|
|
852
|
+
* @param getAddToCartRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
853
|
+
* @param getAddToCartRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
854
|
+
* @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/).
|
|
855
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
856
|
+
*/
|
|
857
|
+
getAddToCartRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
858
|
+
if (!index) {
|
|
859
|
+
throw new Error('Parameter `index` is required when calling `getAddToCartRate`.');
|
|
860
|
+
}
|
|
861
|
+
const requestPath = '/2/conversions/addToCartRate';
|
|
862
|
+
const headers = {};
|
|
863
|
+
const queryParameters = {};
|
|
864
|
+
if (index !== undefined) {
|
|
865
|
+
queryParameters.index = index.toString();
|
|
866
|
+
}
|
|
867
|
+
if (startDate !== undefined) {
|
|
868
|
+
queryParameters.startDate = startDate.toString();
|
|
869
|
+
}
|
|
870
|
+
if (endDate !== undefined) {
|
|
871
|
+
queryParameters.endDate = endDate.toString();
|
|
872
|
+
}
|
|
873
|
+
if (tags !== undefined) {
|
|
874
|
+
queryParameters.tags = tags.toString();
|
|
875
|
+
}
|
|
876
|
+
const request = {
|
|
877
|
+
method: 'GET',
|
|
878
|
+
path: requestPath,
|
|
879
|
+
queryParameters,
|
|
880
|
+
headers,
|
|
881
|
+
};
|
|
882
|
+
return transporter.request(request, requestOptions);
|
|
883
|
+
},
|
|
884
|
+
/**
|
|
885
|
+
* 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.
|
|
846
886
|
*
|
|
847
887
|
* Required API Key ACLs:
|
|
848
888
|
* - analytics.
|
|
@@ -851,7 +891,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
851
891
|
* @param getAverageClickPosition.index - Index name.
|
|
852
892
|
* @param getAverageClickPosition.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
853
893
|
* @param getAverageClickPosition.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
854
|
-
* @param getAverageClickPosition.tags -
|
|
894
|
+
* @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/).
|
|
855
895
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
856
896
|
*/
|
|
857
897
|
getAverageClickPosition({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -882,7 +922,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
882
922
|
return transporter.request(request, requestOptions);
|
|
883
923
|
},
|
|
884
924
|
/**
|
|
885
|
-
*
|
|
925
|
+
* 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.
|
|
886
926
|
*
|
|
887
927
|
* Required API Key ACLs:
|
|
888
928
|
* - analytics.
|
|
@@ -891,7 +931,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
891
931
|
* @param getClickPositions.index - Index name.
|
|
892
932
|
* @param getClickPositions.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
893
933
|
* @param getClickPositions.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
894
|
-
* @param getClickPositions.tags -
|
|
934
|
+
* @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
935
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
896
936
|
*/
|
|
897
937
|
getClickPositions({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -922,7 +962,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
922
962
|
return transporter.request(request, requestOptions);
|
|
923
963
|
},
|
|
924
964
|
/**
|
|
925
|
-
*
|
|
965
|
+
* 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.
|
|
926
966
|
*
|
|
927
967
|
* Required API Key ACLs:
|
|
928
968
|
* - analytics.
|
|
@@ -931,7 +971,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
931
971
|
* @param getClickThroughRate.index - Index name.
|
|
932
972
|
* @param getClickThroughRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
933
973
|
* @param getClickThroughRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
934
|
-
* @param getClickThroughRate.tags -
|
|
974
|
+
* @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/).
|
|
935
975
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
936
976
|
*/
|
|
937
977
|
getClickThroughRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -962,21 +1002,21 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
962
1002
|
return transporter.request(request, requestOptions);
|
|
963
1003
|
},
|
|
964
1004
|
/**
|
|
965
|
-
*
|
|
1005
|
+
* 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.
|
|
966
1006
|
*
|
|
967
1007
|
* Required API Key ACLs:
|
|
968
1008
|
* - analytics.
|
|
969
1009
|
*
|
|
970
|
-
* @param
|
|
971
|
-
* @param
|
|
972
|
-
* @param
|
|
973
|
-
* @param
|
|
974
|
-
* @param
|
|
1010
|
+
* @param getConversionRate - The getConversionRate object.
|
|
1011
|
+
* @param getConversionRate.index - Index name.
|
|
1012
|
+
* @param getConversionRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
1013
|
+
* @param getConversionRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
1014
|
+
* @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/).
|
|
975
1015
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
976
1016
|
*/
|
|
977
|
-
|
|
1017
|
+
getConversionRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
978
1018
|
if (!index) {
|
|
979
|
-
throw new Error('Parameter `index` is required when calling `
|
|
1019
|
+
throw new Error('Parameter `index` is required when calling `getConversionRate`.');
|
|
980
1020
|
}
|
|
981
1021
|
const requestPath = '/2/conversions/conversionRate';
|
|
982
1022
|
const headers = {};
|
|
@@ -1002,7 +1042,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1002
1042
|
return transporter.request(request, requestOptions);
|
|
1003
1043
|
},
|
|
1004
1044
|
/**
|
|
1005
|
-
*
|
|
1045
|
+
* 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.
|
|
1006
1046
|
*
|
|
1007
1047
|
* Required API Key ACLs:
|
|
1008
1048
|
* - analytics.
|
|
@@ -1011,7 +1051,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1011
1051
|
* @param getNoClickRate.index - Index name.
|
|
1012
1052
|
* @param getNoClickRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
1013
1053
|
* @param getNoClickRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
1014
|
-
* @param getNoClickRate.tags -
|
|
1054
|
+
* @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/).
|
|
1015
1055
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1016
1056
|
*/
|
|
1017
1057
|
getNoClickRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -1042,7 +1082,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1042
1082
|
return transporter.request(request, requestOptions);
|
|
1043
1083
|
},
|
|
1044
1084
|
/**
|
|
1045
|
-
*
|
|
1085
|
+
* 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.
|
|
1046
1086
|
*
|
|
1047
1087
|
* Required API Key ACLs:
|
|
1048
1088
|
* - analytics.
|
|
@@ -1051,7 +1091,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1051
1091
|
* @param getNoResultsRate.index - Index name.
|
|
1052
1092
|
* @param getNoResultsRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
1053
1093
|
* @param getNoResultsRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
1054
|
-
* @param getNoResultsRate.tags -
|
|
1094
|
+
* @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/).
|
|
1055
1095
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1056
1096
|
*/
|
|
1057
1097
|
getNoResultsRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -1082,7 +1122,87 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1082
1122
|
return transporter.request(request, requestOptions);
|
|
1083
1123
|
},
|
|
1084
1124
|
/**
|
|
1085
|
-
*
|
|
1125
|
+
* 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.
|
|
1126
|
+
*
|
|
1127
|
+
* Required API Key ACLs:
|
|
1128
|
+
* - analytics.
|
|
1129
|
+
*
|
|
1130
|
+
* @param getPurchaseRate - The getPurchaseRate object.
|
|
1131
|
+
* @param getPurchaseRate.index - Index name.
|
|
1132
|
+
* @param getPurchaseRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
1133
|
+
* @param getPurchaseRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
1134
|
+
* @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/).
|
|
1135
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1136
|
+
*/
|
|
1137
|
+
getPurchaseRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
1138
|
+
if (!index) {
|
|
1139
|
+
throw new Error('Parameter `index` is required when calling `getPurchaseRate`.');
|
|
1140
|
+
}
|
|
1141
|
+
const requestPath = '/2/conversions/purchaseRate';
|
|
1142
|
+
const headers = {};
|
|
1143
|
+
const queryParameters = {};
|
|
1144
|
+
if (index !== undefined) {
|
|
1145
|
+
queryParameters.index = index.toString();
|
|
1146
|
+
}
|
|
1147
|
+
if (startDate !== undefined) {
|
|
1148
|
+
queryParameters.startDate = startDate.toString();
|
|
1149
|
+
}
|
|
1150
|
+
if (endDate !== undefined) {
|
|
1151
|
+
queryParameters.endDate = endDate.toString();
|
|
1152
|
+
}
|
|
1153
|
+
if (tags !== undefined) {
|
|
1154
|
+
queryParameters.tags = tags.toString();
|
|
1155
|
+
}
|
|
1156
|
+
const request = {
|
|
1157
|
+
method: 'GET',
|
|
1158
|
+
path: requestPath,
|
|
1159
|
+
queryParameters,
|
|
1160
|
+
headers,
|
|
1161
|
+
};
|
|
1162
|
+
return transporter.request(request, requestOptions);
|
|
1163
|
+
},
|
|
1164
|
+
/**
|
|
1165
|
+
* 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.
|
|
1166
|
+
*
|
|
1167
|
+
* Required API Key ACLs:
|
|
1168
|
+
* - analytics.
|
|
1169
|
+
*
|
|
1170
|
+
* @param getRevenue - The getRevenue object.
|
|
1171
|
+
* @param getRevenue.index - Index name.
|
|
1172
|
+
* @param getRevenue.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
1173
|
+
* @param getRevenue.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
1174
|
+
* @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/).
|
|
1175
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1176
|
+
*/
|
|
1177
|
+
getRevenue({ index, startDate, endDate, tags }, requestOptions) {
|
|
1178
|
+
if (!index) {
|
|
1179
|
+
throw new Error('Parameter `index` is required when calling `getRevenue`.');
|
|
1180
|
+
}
|
|
1181
|
+
const requestPath = '/2/conversions/revenue';
|
|
1182
|
+
const headers = {};
|
|
1183
|
+
const queryParameters = {};
|
|
1184
|
+
if (index !== undefined) {
|
|
1185
|
+
queryParameters.index = index.toString();
|
|
1186
|
+
}
|
|
1187
|
+
if (startDate !== undefined) {
|
|
1188
|
+
queryParameters.startDate = startDate.toString();
|
|
1189
|
+
}
|
|
1190
|
+
if (endDate !== undefined) {
|
|
1191
|
+
queryParameters.endDate = endDate.toString();
|
|
1192
|
+
}
|
|
1193
|
+
if (tags !== undefined) {
|
|
1194
|
+
queryParameters.tags = tags.toString();
|
|
1195
|
+
}
|
|
1196
|
+
const request = {
|
|
1197
|
+
method: 'GET',
|
|
1198
|
+
path: requestPath,
|
|
1199
|
+
queryParameters,
|
|
1200
|
+
headers,
|
|
1201
|
+
};
|
|
1202
|
+
return transporter.request(request, requestOptions);
|
|
1203
|
+
},
|
|
1204
|
+
/**
|
|
1205
|
+
* 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.
|
|
1086
1206
|
*
|
|
1087
1207
|
* Required API Key ACLs:
|
|
1088
1208
|
* - analytics.
|
|
@@ -1091,7 +1211,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1091
1211
|
* @param getSearchesCount.index - Index name.
|
|
1092
1212
|
* @param getSearchesCount.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
1093
1213
|
* @param getSearchesCount.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
1094
|
-
* @param getSearchesCount.tags -
|
|
1214
|
+
* @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/).
|
|
1095
1215
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1096
1216
|
*/
|
|
1097
1217
|
getSearchesCount({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -1122,7 +1242,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1122
1242
|
return transporter.request(request, requestOptions);
|
|
1123
1243
|
},
|
|
1124
1244
|
/**
|
|
1125
|
-
*
|
|
1245
|
+
* Retrieves the most popular searches that didn\'t lead to any clicks, from the 1,000 most frequent searches.
|
|
1126
1246
|
*
|
|
1127
1247
|
* Required API Key ACLs:
|
|
1128
1248
|
* - analytics.
|
|
@@ -1133,7 +1253,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1133
1253
|
* @param getSearchesNoClicks.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
1134
1254
|
* @param getSearchesNoClicks.limit - Number of items to return.
|
|
1135
1255
|
* @param getSearchesNoClicks.offset - Position of the first item to return.
|
|
1136
|
-
* @param getSearchesNoClicks.tags -
|
|
1256
|
+
* @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/).
|
|
1137
1257
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1138
1258
|
*/
|
|
1139
1259
|
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -1170,7 +1290,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1170
1290
|
return transporter.request(request, requestOptions);
|
|
1171
1291
|
},
|
|
1172
1292
|
/**
|
|
1173
|
-
*
|
|
1293
|
+
* Retrieves the most popular searches that didn\'t return any results.
|
|
1174
1294
|
*
|
|
1175
1295
|
* Required API Key ACLs:
|
|
1176
1296
|
* - analytics.
|
|
@@ -1181,7 +1301,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1181
1301
|
* @param getSearchesNoResults.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
1182
1302
|
* @param getSearchesNoResults.limit - Number of items to return.
|
|
1183
1303
|
* @param getSearchesNoResults.offset - Position of the first item to return.
|
|
1184
|
-
* @param getSearchesNoResults.tags -
|
|
1304
|
+
* @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/).
|
|
1185
1305
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1186
1306
|
*/
|
|
1187
1307
|
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -1218,7 +1338,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1218
1338
|
return transporter.request(request, requestOptions);
|
|
1219
1339
|
},
|
|
1220
1340
|
/**
|
|
1221
|
-
*
|
|
1341
|
+
* Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.
|
|
1222
1342
|
*
|
|
1223
1343
|
* Required API Key ACLs:
|
|
1224
1344
|
* - analytics.
|
|
@@ -1246,7 +1366,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1246
1366
|
return transporter.request(request, requestOptions);
|
|
1247
1367
|
},
|
|
1248
1368
|
/**
|
|
1249
|
-
*
|
|
1369
|
+
* Retrieves the countries with the most searches to your index.
|
|
1250
1370
|
*
|
|
1251
1371
|
* Required API Key ACLs:
|
|
1252
1372
|
* - analytics.
|
|
@@ -1257,7 +1377,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1257
1377
|
* @param getTopCountries.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
1258
1378
|
* @param getTopCountries.limit - Number of items to return.
|
|
1259
1379
|
* @param getTopCountries.offset - Position of the first item to return.
|
|
1260
|
-
* @param getTopCountries.tags -
|
|
1380
|
+
* @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/).
|
|
1261
1381
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1262
1382
|
*/
|
|
1263
1383
|
getTopCountries({ index, startDate, endDate, limit, offset, tags }, requestOptions) {
|
|
@@ -1294,19 +1414,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1294
1414
|
return transporter.request(request, requestOptions);
|
|
1295
1415
|
},
|
|
1296
1416
|
/**
|
|
1297
|
-
*
|
|
1417
|
+
* Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
1298
1418
|
*
|
|
1299
1419
|
* Required API Key ACLs:
|
|
1300
1420
|
* - analytics.
|
|
1301
1421
|
*
|
|
1302
1422
|
* @param getTopFilterAttributes - The getTopFilterAttributes object.
|
|
1303
1423
|
* @param getTopFilterAttributes.index - Index name.
|
|
1304
|
-
* @param getTopFilterAttributes.search -
|
|
1424
|
+
* @param getTopFilterAttributes.search - Search query.
|
|
1305
1425
|
* @param getTopFilterAttributes.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
1306
1426
|
* @param getTopFilterAttributes.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
1307
1427
|
* @param getTopFilterAttributes.limit - Number of items to return.
|
|
1308
1428
|
* @param getTopFilterAttributes.offset - Position of the first item to return.
|
|
1309
|
-
* @param getTopFilterAttributes.tags -
|
|
1429
|
+
* @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/).
|
|
1310
1430
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1311
1431
|
*/
|
|
1312
1432
|
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -1346,7 +1466,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1346
1466
|
return transporter.request(request, requestOptions);
|
|
1347
1467
|
},
|
|
1348
1468
|
/**
|
|
1349
|
-
*
|
|
1469
|
+
* Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
1350
1470
|
*
|
|
1351
1471
|
* Required API Key ACLs:
|
|
1352
1472
|
* - analytics.
|
|
@@ -1354,12 +1474,12 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1354
1474
|
* @param getTopFilterForAttribute - The getTopFilterForAttribute object.
|
|
1355
1475
|
* @param getTopFilterForAttribute.attribute - Attribute name.
|
|
1356
1476
|
* @param getTopFilterForAttribute.index - Index name.
|
|
1357
|
-
* @param getTopFilterForAttribute.search -
|
|
1477
|
+
* @param getTopFilterForAttribute.search - Search query.
|
|
1358
1478
|
* @param getTopFilterForAttribute.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
1359
1479
|
* @param getTopFilterForAttribute.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
1360
1480
|
* @param getTopFilterForAttribute.limit - Number of items to return.
|
|
1361
1481
|
* @param getTopFilterForAttribute.offset - Position of the first item to return.
|
|
1362
|
-
* @param getTopFilterForAttribute.tags -
|
|
1482
|
+
* @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/).
|
|
1363
1483
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1364
1484
|
*/
|
|
1365
1485
|
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -1402,19 +1522,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1402
1522
|
return transporter.request(request, requestOptions);
|
|
1403
1523
|
},
|
|
1404
1524
|
/**
|
|
1405
|
-
*
|
|
1525
|
+
* 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.
|
|
1406
1526
|
*
|
|
1407
1527
|
* Required API Key ACLs:
|
|
1408
1528
|
* - analytics.
|
|
1409
1529
|
*
|
|
1410
1530
|
* @param getTopFiltersNoResults - The getTopFiltersNoResults object.
|
|
1411
1531
|
* @param getTopFiltersNoResults.index - Index name.
|
|
1412
|
-
* @param getTopFiltersNoResults.search -
|
|
1532
|
+
* @param getTopFiltersNoResults.search - Search query.
|
|
1413
1533
|
* @param getTopFiltersNoResults.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
1414
1534
|
* @param getTopFiltersNoResults.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
1415
1535
|
* @param getTopFiltersNoResults.limit - Number of items to return.
|
|
1416
1536
|
* @param getTopFiltersNoResults.offset - Position of the first item to return.
|
|
1417
|
-
* @param getTopFiltersNoResults.tags -
|
|
1537
|
+
* @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/).
|
|
1418
1538
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1419
1539
|
*/
|
|
1420
1540
|
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -1454,23 +1574,24 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1454
1574
|
return transporter.request(request, requestOptions);
|
|
1455
1575
|
},
|
|
1456
1576
|
/**
|
|
1457
|
-
*
|
|
1577
|
+
* Retrieves the object IDs of the most frequent search results.
|
|
1458
1578
|
*
|
|
1459
1579
|
* Required API Key ACLs:
|
|
1460
1580
|
* - analytics.
|
|
1461
1581
|
*
|
|
1462
1582
|
* @param getTopHits - The getTopHits object.
|
|
1463
1583
|
* @param getTopHits.index - Index name.
|
|
1464
|
-
* @param getTopHits.search -
|
|
1465
|
-
* @param getTopHits.clickAnalytics - Whether to include
|
|
1584
|
+
* @param getTopHits.search - Search query.
|
|
1585
|
+
* @param getTopHits.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
1586
|
+
* @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.
|
|
1466
1587
|
* @param getTopHits.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
1467
1588
|
* @param getTopHits.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
1468
1589
|
* @param getTopHits.limit - Number of items to return.
|
|
1469
1590
|
* @param getTopHits.offset - Position of the first item to return.
|
|
1470
|
-
* @param getTopHits.tags -
|
|
1591
|
+
* @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/).
|
|
1471
1592
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1472
1593
|
*/
|
|
1473
|
-
getTopHits({ index, search, clickAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
1594
|
+
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
1474
1595
|
if (!index) {
|
|
1475
1596
|
throw new Error('Parameter `index` is required when calling `getTopHits`.');
|
|
1476
1597
|
}
|
|
@@ -1486,6 +1607,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1486
1607
|
if (clickAnalytics !== undefined) {
|
|
1487
1608
|
queryParameters.clickAnalytics = clickAnalytics.toString();
|
|
1488
1609
|
}
|
|
1610
|
+
if (revenueAnalytics !== undefined) {
|
|
1611
|
+
queryParameters.revenueAnalytics = revenueAnalytics.toString();
|
|
1612
|
+
}
|
|
1489
1613
|
if (startDate !== undefined) {
|
|
1490
1614
|
queryParameters.startDate = startDate.toString();
|
|
1491
1615
|
}
|
|
@@ -1510,24 +1634,25 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1510
1634
|
return transporter.request(request, requestOptions);
|
|
1511
1635
|
},
|
|
1512
1636
|
/**
|
|
1513
|
-
* Returns the most popular
|
|
1637
|
+
* Returns the most popular search terms.
|
|
1514
1638
|
*
|
|
1515
1639
|
* Required API Key ACLs:
|
|
1516
1640
|
* - analytics.
|
|
1517
1641
|
*
|
|
1518
1642
|
* @param getTopSearches - The getTopSearches object.
|
|
1519
1643
|
* @param getTopSearches.index - Index name.
|
|
1520
|
-
* @param getTopSearches.clickAnalytics - Whether to include
|
|
1644
|
+
* @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
1645
|
+
* @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.
|
|
1521
1646
|
* @param getTopSearches.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
1522
1647
|
* @param getTopSearches.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
1523
|
-
* @param getTopSearches.orderBy -
|
|
1648
|
+
* @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
|
|
1524
1649
|
* @param getTopSearches.direction - Sorting direction of the results: ascending or descending.
|
|
1525
1650
|
* @param getTopSearches.limit - Number of items to return.
|
|
1526
1651
|
* @param getTopSearches.offset - Position of the first item to return.
|
|
1527
|
-
* @param getTopSearches.tags -
|
|
1652
|
+
* @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/).
|
|
1528
1653
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1529
1654
|
*/
|
|
1530
|
-
getTopSearches({ index, clickAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
|
|
1655
|
+
getTopSearches({ index, clickAnalytics, revenueAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
|
|
1531
1656
|
if (!index) {
|
|
1532
1657
|
throw new Error('Parameter `index` is required when calling `getTopSearches`.');
|
|
1533
1658
|
}
|
|
@@ -1540,6 +1665,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1540
1665
|
if (clickAnalytics !== undefined) {
|
|
1541
1666
|
queryParameters.clickAnalytics = clickAnalytics.toString();
|
|
1542
1667
|
}
|
|
1668
|
+
if (revenueAnalytics !== undefined) {
|
|
1669
|
+
queryParameters.revenueAnalytics = revenueAnalytics.toString();
|
|
1670
|
+
}
|
|
1543
1671
|
if (startDate !== undefined) {
|
|
1544
1672
|
queryParameters.startDate = startDate.toString();
|
|
1545
1673
|
}
|
|
@@ -1570,7 +1698,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1570
1698
|
return transporter.request(request, requestOptions);
|
|
1571
1699
|
},
|
|
1572
1700
|
/**
|
|
1573
|
-
*
|
|
1701
|
+
* 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.
|
|
1574
1702
|
*
|
|
1575
1703
|
* Required API Key ACLs:
|
|
1576
1704
|
* - analytics.
|
|
@@ -1579,7 +1707,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1579
1707
|
* @param getUsersCount.index - Index name.
|
|
1580
1708
|
* @param getUsersCount.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
|
|
1581
1709
|
* @param getUsersCount.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
|
|
1582
|
-
* @param getUsersCount.tags -
|
|
1710
|
+
* @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/).
|
|
1583
1711
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1584
1712
|
*/
|
|
1585
1713
|
getUsersCount({ index, startDate, endDate, tags }, requestOptions) {
|