algolia 3.0.0.alpha.14 → 3.0.0.alpha.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/Gemfile.lock +2 -2
  4. data/lib/algolia/api/abtesting_client.rb +4 -4
  5. data/lib/algolia/api/analytics_client.rb +268 -98
  6. data/lib/algolia/api/ingestion_client.rb +4 -4
  7. data/lib/algolia/api/insights_client.rb +4 -4
  8. data/lib/algolia/api/monitoring_client.rb +4 -4
  9. data/lib/algolia/api/personalization_client.rb +4 -4
  10. data/lib/algolia/api/query_suggestions_client.rb +4 -4
  11. data/lib/algolia/api/recommend_client.rb +4 -4
  12. data/lib/algolia/api/search_client.rb +4 -4
  13. data/lib/algolia/models/abtesting/{currencies_value.rb → currency.rb} +3 -3
  14. data/lib/algolia/models/abtesting/variant.rb +2 -5
  15. data/lib/algolia/models/analytics/click_positions_inner.rb +242 -0
  16. data/lib/algolia/models/analytics/currencies_value.rb +208 -0
  17. data/lib/algolia/models/analytics/daily_add_to_cart_rates.rb +265 -0
  18. data/lib/algolia/models/analytics/daily_average_clicks.rb +249 -0
  19. data/lib/algolia/models/analytics/{click_through_rate_event.rb → daily_click_through_rates.rb} +24 -14
  20. data/lib/algolia/models/analytics/daily_conversion_rates.rb +265 -0
  21. data/lib/algolia/models/analytics/{no_click_rate_event.rb → daily_no_click_rates.rb} +21 -7
  22. data/lib/algolia/models/analytics/{no_results_rate_event.rb → daily_no_results_rates.rb} +7 -7
  23. data/lib/algolia/models/analytics/{conversion_rate_event.rb → daily_purchase_rates.rb} +18 -22
  24. data/lib/algolia/models/analytics/{average_click_event.rb → daily_revenue.rb} +15 -25
  25. data/lib/algolia/models/analytics/{search_event.rb → daily_searches.rb} +4 -4
  26. data/lib/algolia/models/analytics/{search_no_result_event.rb → daily_searches_no_clicks.rb} +19 -5
  27. data/lib/algolia/models/analytics/{search_no_click_event.rb → daily_searches_no_results.rb} +19 -5
  28. data/lib/algolia/models/analytics/{user_with_date.rb → daily_users.rb} +5 -5
  29. data/lib/algolia/models/analytics/get_add_to_cart_rate_response.rb +267 -0
  30. data/lib/algolia/models/analytics/get_average_click_position_response.rb +31 -5
  31. data/lib/algolia/models/analytics/get_click_positions_response.rb +6 -6
  32. data/lib/algolia/models/analytics/get_click_through_rate_response.rb +22 -12
  33. data/lib/algolia/models/analytics/get_conversion_rate_response.rb +267 -0
  34. data/lib/algolia/models/analytics/get_no_click_rate_response.rb +19 -5
  35. data/lib/algolia/models/analytics/get_no_results_rate_response.rb +5 -5
  36. data/lib/algolia/models/analytics/{get_conversation_rate_response.rb → get_purchase_rate_response.rb} +19 -23
  37. data/lib/algolia/models/analytics/{click_position.rb → get_revenue.rb} +23 -21
  38. data/lib/algolia/models/analytics/get_searches_count_response.rb +2 -2
  39. data/lib/algolia/models/analytics/get_searches_no_clicks_response.rb +2 -2
  40. data/lib/algolia/models/analytics/get_searches_no_results_response.rb +2 -2
  41. data/lib/algolia/models/analytics/get_status_response.rb +4 -2
  42. data/lib/algolia/models/analytics/get_top_countries_response.rb +1 -1
  43. data/lib/algolia/models/analytics/get_top_filter_attributes_response.rb +1 -1
  44. data/lib/algolia/models/analytics/get_top_filter_for_attribute.rb +23 -2
  45. data/lib/algolia/models/analytics/get_top_filters_no_results_response.rb +4 -2
  46. data/lib/algolia/models/analytics/get_top_filters_no_results_value.rb +23 -2
  47. data/lib/algolia/models/analytics/get_top_hits_response.rb +2 -1
  48. data/lib/algolia/models/analytics/get_top_searches_response.rb +2 -1
  49. data/lib/algolia/models/analytics/get_users_count_response.rb +3 -3
  50. data/lib/algolia/models/analytics/operator.rb +38 -0
  51. data/lib/algolia/models/analytics/top_country.rb +1 -1
  52. data/lib/algolia/models/analytics/top_hit.rb +1 -1
  53. data/lib/algolia/models/analytics/top_hit_with_analytics.rb +60 -21
  54. data/lib/algolia/models/analytics/top_hit_with_revenue_analytics.rb +437 -0
  55. data/lib/algolia/models/analytics/top_hits_response.rb +1 -1
  56. data/lib/algolia/models/analytics/top_hits_response_with_analytics.rb +1 -1
  57. data/lib/algolia/models/analytics/top_hits_response_with_revenue_analytics.rb +201 -0
  58. data/lib/algolia/models/analytics/top_search.rb +2 -2
  59. data/lib/algolia/models/analytics/top_search_with_analytics.rb +99 -17
  60. data/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb +504 -0
  61. data/lib/algolia/models/analytics/top_searches_response.rb +1 -1
  62. data/lib/algolia/models/analytics/top_searches_response_with_analytics.rb +1 -1
  63. data/lib/algolia/models/analytics/top_searches_response_with_revenue_analytics.rb +201 -0
  64. data/lib/algolia/version.rb +1 -1
  65. metadata +26 -14
@@ -46,7 +46,7 @@ module Algolia
46
46
  raise ArgumentError, "Parameter `path` is required when calling `custom_delete`."
47
47
  end
48
48
 
49
- path = '/1{path}'.sub('{' + 'path' + '}', path.to_s)
49
+ path = '/{path}'.sub('{' + 'path' + '}', path.to_s)
50
50
  query_params = {}
51
51
  query_params = query_params.merge(parameters) unless parameters.nil?
52
52
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -89,7 +89,7 @@ module Algolia
89
89
  raise ArgumentError, "Parameter `path` is required when calling `custom_get`."
90
90
  end
91
91
 
92
- path = '/1{path}'.sub('{' + 'path' + '}', path.to_s)
92
+ path = '/{path}'.sub('{' + 'path' + '}', path.to_s)
93
93
  query_params = {}
94
94
  query_params = query_params.merge(parameters) unless parameters.nil?
95
95
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -133,7 +133,7 @@ module Algolia
133
133
  raise ArgumentError, "Parameter `path` is required when calling `custom_post`."
134
134
  end
135
135
 
136
- path = '/1{path}'.sub('{' + 'path' + '}', path.to_s)
136
+ path = '/{path}'.sub('{' + 'path' + '}', path.to_s)
137
137
  query_params = {}
138
138
  query_params = query_params.merge(parameters) unless parameters.nil?
139
139
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -178,7 +178,7 @@ module Algolia
178
178
  raise ArgumentError, "Parameter `path` is required when calling `custom_put`."
179
179
  end
180
180
 
181
- path = '/1{path}'.sub('{' + 'path' + '}', path.to_s)
181
+ path = '/{path}'.sub('{' + 'path' + '}', path.to_s)
182
182
  query_params = {}
183
183
  query_params = query_params.merge(parameters) unless parameters.nil?
184
184
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -210,14 +210,68 @@ module Algolia
210
210
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
211
211
  end
212
212
 
213
- # Return the average click position for the complete time range and for individual days. > **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn't receive any click events for tracked searches. A _tracked_ search is a search request where the `clickAnalytics` parameter is `true`.
213
+ # 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.
214
214
  #
215
215
  # Required API Key ACLs:
216
216
  # - analytics
217
217
  # @param index [String] Index name. (required)
218
218
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
219
219
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
220
- # @param tags [String] 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.
220
+ # @param tags [String] 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/).
221
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
222
+ # @return [Http::Response] the response
223
+ def get_add_to_cart_rate_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
224
+ # verify the required parameter 'index' is set
225
+ if @api_client.config.client_side_validation && index.nil?
226
+ raise ArgumentError, "Parameter `index` is required when calling `get_add_to_cart_rate`."
227
+ end
228
+
229
+ path = '/2/conversions/addToCartRate'
230
+ query_params = {}
231
+ query_params[:index] = index
232
+ query_params[:startDate] = start_date unless start_date.nil?
233
+ query_params[:endDate] = end_date unless end_date.nil?
234
+ query_params[:tags] = tags unless tags.nil?
235
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
236
+ header_params = {}
237
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
238
+
239
+ post_body = request_options[:debug_body]
240
+
241
+ new_options = request_options.merge(
242
+ :operation => :'AnalyticsClient.get_add_to_cart_rate',
243
+ :header_params => header_params,
244
+ :query_params => query_params,
245
+ :body => post_body,
246
+ :use_read_transporter => false
247
+ )
248
+
249
+ @api_client.call_api(:GET, path, new_options)
250
+ end
251
+
252
+ # 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.
253
+ #
254
+ # Required API Key ACLs:
255
+ # - analytics
256
+ # @param index [String] Index name. (required)
257
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
258
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
259
+ # @param tags [String] 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/).
260
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
261
+ # @return [GetAddToCartRateResponse]
262
+ def get_add_to_cart_rate(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
263
+ response = get_add_to_cart_rate_with_http_info(index, start_date, end_date, tags, request_options)
264
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetAddToCartRateResponse')
265
+ end
266
+
267
+ # 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.
268
+ #
269
+ # Required API Key ACLs:
270
+ # - analytics
271
+ # @param index [String] Index name. (required)
272
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
273
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
274
+ # @param tags [String] 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/).
221
275
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
222
276
  # @return [Http::Response] the response
223
277
  def get_average_click_position_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
@@ -249,14 +303,14 @@ module Algolia
249
303
  @api_client.call_api(:GET, path, new_options)
250
304
  end
251
305
 
252
- # Return the average click position for the complete time range and for individual days. > **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn't receive any click events for tracked searches. A _tracked_ search is a search request where the `clickAnalytics` parameter is `true`.
306
+ # 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.
253
307
  #
254
308
  # Required API Key ACLs:
255
309
  # - analytics
256
310
  # @param index [String] Index name. (required)
257
311
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
258
312
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
259
- # @param tags [String] 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.
313
+ # @param tags [String] 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/).
260
314
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
261
315
  # @return [GetAverageClickPositionResponse]
262
316
  def get_average_click_position(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
@@ -264,14 +318,14 @@ module Algolia
264
318
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetAverageClickPositionResponse')
265
319
  end
266
320
 
267
- # Show the number of clicks events and their associated position in the search results. > **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn't receive any click events for tracked searches. A _tracked_ search is a search request where the `clickAnalytics` parameter is `true`.
321
+ # 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.
268
322
  #
269
323
  # Required API Key ACLs:
270
324
  # - analytics
271
325
  # @param index [String] Index name. (required)
272
326
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
273
327
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
274
- # @param tags [String] 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.
328
+ # @param tags [String] 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/).
275
329
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
276
330
  # @return [Http::Response] the response
277
331
  def get_click_positions_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
@@ -303,14 +357,14 @@ module Algolia
303
357
  @api_client.call_api(:GET, path, new_options)
304
358
  end
305
359
 
306
- # Show the number of clicks events and their associated position in the search results. > **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn't receive any click events for tracked searches. A _tracked_ search is a search request where the `clickAnalytics` parameter is `true`.
360
+ # 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.
307
361
  #
308
362
  # Required API Key ACLs:
309
363
  # - analytics
310
364
  # @param index [String] Index name. (required)
311
365
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
312
366
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
313
- # @param tags [String] 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.
367
+ # @param tags [String] 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/).
314
368
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
315
369
  # @return [GetClickPositionsResponse]
316
370
  def get_click_positions(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
@@ -318,14 +372,14 @@ module Algolia
318
372
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetClickPositionsResponse')
319
373
  end
320
374
 
321
- # Returns a [click-through rate (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate).
375
+ # 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.
322
376
  #
323
377
  # Required API Key ACLs:
324
378
  # - analytics
325
379
  # @param index [String] Index name. (required)
326
380
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
327
381
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
328
- # @param tags [String] 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.
382
+ # @param tags [String] 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/).
329
383
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
330
384
  # @return [Http::Response] the response
331
385
  def get_click_through_rate_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
@@ -357,14 +411,14 @@ module Algolia
357
411
  @api_client.call_api(:GET, path, new_options)
358
412
  end
359
413
 
360
- # Returns a [click-through rate (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate).
414
+ # 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.
361
415
  #
362
416
  # Required API Key ACLs:
363
417
  # - analytics
364
418
  # @param index [String] Index name. (required)
365
419
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
366
420
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
367
- # @param tags [String] 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.
421
+ # @param tags [String] 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/).
368
422
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
369
423
  # @return [GetClickThroughRateResponse]
370
424
  def get_click_through_rate(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
@@ -372,20 +426,20 @@ module Algolia
372
426
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetClickThroughRateResponse')
373
427
  end
374
428
 
375
- # Return a [conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate).
429
+ # 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.
376
430
  #
377
431
  # Required API Key ACLs:
378
432
  # - analytics
379
433
  # @param index [String] Index name. (required)
380
434
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
381
435
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
382
- # @param tags [String] 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.
436
+ # @param tags [String] 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/).
383
437
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
384
438
  # @return [Http::Response] the response
385
- def get_conversation_rate_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
439
+ def get_conversion_rate_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
386
440
  # verify the required parameter 'index' is set
387
441
  if @api_client.config.client_side_validation && index.nil?
388
- raise ArgumentError, "Parameter `index` is required when calling `get_conversation_rate`."
442
+ raise ArgumentError, "Parameter `index` is required when calling `get_conversion_rate`."
389
443
  end
390
444
 
391
445
  path = '/2/conversions/conversionRate'
@@ -401,7 +455,7 @@ module Algolia
401
455
  post_body = request_options[:debug_body]
402
456
 
403
457
  new_options = request_options.merge(
404
- :operation => :'AnalyticsClient.get_conversation_rate',
458
+ :operation => :'AnalyticsClient.get_conversion_rate',
405
459
  :header_params => header_params,
406
460
  :query_params => query_params,
407
461
  :body => post_body,
@@ -411,29 +465,29 @@ module Algolia
411
465
  @api_client.call_api(:GET, path, new_options)
412
466
  end
413
467
 
414
- # Return a [conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate).
468
+ # 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.
415
469
  #
416
470
  # Required API Key ACLs:
417
471
  # - analytics
418
472
  # @param index [String] Index name. (required)
419
473
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
420
474
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
421
- # @param tags [String] 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.
475
+ # @param tags [String] 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/).
422
476
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
423
- # @return [GetConversationRateResponse]
424
- def get_conversation_rate(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
425
- response = get_conversation_rate_with_http_info(index, start_date, end_date, tags, request_options)
426
- @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetConversationRateResponse')
477
+ # @return [GetConversionRateResponse]
478
+ def get_conversion_rate(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
479
+ response = get_conversion_rate_with_http_info(index, start_date, end_date, tags, request_options)
480
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetConversionRateResponse')
427
481
  end
428
482
 
429
- # Returns the rate at which searches don't lead to any clicks. The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of searches and searches without clicks.
483
+ # 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.
430
484
  #
431
485
  # Required API Key ACLs:
432
486
  # - analytics
433
487
  # @param index [String] Index name. (required)
434
488
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
435
489
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
436
- # @param tags [String] 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.
490
+ # @param tags [String] 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/).
437
491
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
438
492
  # @return [Http::Response] the response
439
493
  def get_no_click_rate_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
@@ -465,14 +519,14 @@ module Algolia
465
519
  @api_client.call_api(:GET, path, new_options)
466
520
  end
467
521
 
468
- # Returns the rate at which searches don't lead to any clicks. The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of searches and searches without clicks.
522
+ # 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.
469
523
  #
470
524
  # Required API Key ACLs:
471
525
  # - analytics
472
526
  # @param index [String] Index name. (required)
473
527
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
474
528
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
475
- # @param tags [String] 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.
529
+ # @param tags [String] 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/).
476
530
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
477
531
  # @return [GetNoClickRateResponse]
478
532
  def get_no_click_rate(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
@@ -480,14 +534,14 @@ module Algolia
480
534
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetNoClickRateResponse')
481
535
  end
482
536
 
483
- # Returns the rate at which searches didn't return any results.
537
+ # 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.
484
538
  #
485
539
  # Required API Key ACLs:
486
540
  # - analytics
487
541
  # @param index [String] Index name. (required)
488
542
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
489
543
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
490
- # @param tags [String] 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.
544
+ # @param tags [String] Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
491
545
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
492
546
  # @return [Http::Response] the response
493
547
  def get_no_results_rate_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
@@ -519,14 +573,14 @@ module Algolia
519
573
  @api_client.call_api(:GET, path, new_options)
520
574
  end
521
575
 
522
- # Returns the rate at which searches didn't return any results.
576
+ # 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.
523
577
  #
524
578
  # Required API Key ACLs:
525
579
  # - analytics
526
580
  # @param index [String] Index name. (required)
527
581
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
528
582
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
529
- # @param tags [String] 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.
583
+ # @param tags [String] 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/).
530
584
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
531
585
  # @return [GetNoResultsRateResponse]
532
586
  def get_no_results_rate(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
@@ -534,14 +588,122 @@ module Algolia
534
588
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetNoResultsRateResponse')
535
589
  end
536
590
 
537
- # Returns the number of searches within a time range.
591
+ # 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.
592
+ #
593
+ # Required API Key ACLs:
594
+ # - analytics
595
+ # @param index [String] Index name. (required)
596
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
597
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
598
+ # @param tags [String] 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/).
599
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
600
+ # @return [Http::Response] the response
601
+ def get_purchase_rate_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
602
+ # verify the required parameter 'index' is set
603
+ if @api_client.config.client_side_validation && index.nil?
604
+ raise ArgumentError, "Parameter `index` is required when calling `get_purchase_rate`."
605
+ end
606
+
607
+ path = '/2/conversions/purchaseRate'
608
+ query_params = {}
609
+ query_params[:index] = index
610
+ query_params[:startDate] = start_date unless start_date.nil?
611
+ query_params[:endDate] = end_date unless end_date.nil?
612
+ query_params[:tags] = tags unless tags.nil?
613
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
614
+ header_params = {}
615
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
616
+
617
+ post_body = request_options[:debug_body]
618
+
619
+ new_options = request_options.merge(
620
+ :operation => :'AnalyticsClient.get_purchase_rate',
621
+ :header_params => header_params,
622
+ :query_params => query_params,
623
+ :body => post_body,
624
+ :use_read_transporter => false
625
+ )
626
+
627
+ @api_client.call_api(:GET, path, new_options)
628
+ end
629
+
630
+ # 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.
631
+ #
632
+ # Required API Key ACLs:
633
+ # - analytics
634
+ # @param index [String] Index name. (required)
635
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
636
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
637
+ # @param tags [String] 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/).
638
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
639
+ # @return [GetPurchaseRateResponse]
640
+ def get_purchase_rate(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
641
+ response = get_purchase_rate_with_http_info(index, start_date, end_date, tags, request_options)
642
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetPurchaseRateResponse')
643
+ end
644
+
645
+ # 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.
646
+ #
647
+ # Required API Key ACLs:
648
+ # - analytics
649
+ # @param index [String] Index name. (required)
650
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
651
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
652
+ # @param tags [String] 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/).
653
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
654
+ # @return [Http::Response] the response
655
+ def get_revenue_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
656
+ # verify the required parameter 'index' is set
657
+ if @api_client.config.client_side_validation && index.nil?
658
+ raise ArgumentError, "Parameter `index` is required when calling `get_revenue`."
659
+ end
660
+
661
+ path = '/2/conversions/revenue'
662
+ query_params = {}
663
+ query_params[:index] = index
664
+ query_params[:startDate] = start_date unless start_date.nil?
665
+ query_params[:endDate] = end_date unless end_date.nil?
666
+ query_params[:tags] = tags unless tags.nil?
667
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
668
+ header_params = {}
669
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
670
+
671
+ post_body = request_options[:debug_body]
672
+
673
+ new_options = request_options.merge(
674
+ :operation => :'AnalyticsClient.get_revenue',
675
+ :header_params => header_params,
676
+ :query_params => query_params,
677
+ :body => post_body,
678
+ :use_read_transporter => false
679
+ )
680
+
681
+ @api_client.call_api(:GET, path, new_options)
682
+ end
683
+
684
+ # 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.
685
+ #
686
+ # Required API Key ACLs:
687
+ # - analytics
688
+ # @param index [String] Index name. (required)
689
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
690
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
691
+ # @param tags [String] 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/).
692
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
693
+ # @return [GetRevenue]
694
+ def get_revenue(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
695
+ response = get_revenue_with_http_info(index, start_date, end_date, tags, request_options)
696
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetRevenue')
697
+ end
698
+
699
+ # 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.
538
700
  #
539
701
  # Required API Key ACLs:
540
702
  # - analytics
541
703
  # @param index [String] Index name. (required)
542
704
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
543
705
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
544
- # @param tags [String] 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.
706
+ # @param tags [String] 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/).
545
707
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
546
708
  # @return [Http::Response] the response
547
709
  def get_searches_count_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
@@ -573,14 +735,14 @@ module Algolia
573
735
  @api_client.call_api(:GET, path, new_options)
574
736
  end
575
737
 
576
- # Returns the number of searches within a time range.
738
+ # 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.
577
739
  #
578
740
  # Required API Key ACLs:
579
741
  # - analytics
580
742
  # @param index [String] Index name. (required)
581
743
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
582
744
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
583
- # @param tags [String] 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.
745
+ # @param tags [String] 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/).
584
746
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
585
747
  # @return [GetSearchesCountResponse]
586
748
  def get_searches_count(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
@@ -588,7 +750,7 @@ module Algolia
588
750
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetSearchesCountResponse')
589
751
  end
590
752
 
591
- # Return the most popular of the last 1,000 searches that didn't lead to any clicks.
753
+ # Retrieves the most popular searches that didn't lead to any clicks, from the 1,000 most frequent searches.
592
754
  #
593
755
  # Required API Key ACLs:
594
756
  # - analytics
@@ -597,7 +759,7 @@ module Algolia
597
759
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
598
760
  # @param limit [Integer] Number of items to return. (default to 10)
599
761
  # @param offset [Integer] Position of the first item to return. (default to 0)
600
- # @param tags [String] 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.
762
+ # @param tags [String] 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/).
601
763
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
602
764
  # @return [Http::Response] the response
603
765
  def get_searches_no_clicks_with_http_info(index, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
@@ -634,7 +796,7 @@ module Algolia
634
796
  @api_client.call_api(:GET, path, new_options)
635
797
  end
636
798
 
637
- # Return the most popular of the last 1,000 searches that didn't lead to any clicks.
799
+ # Retrieves the most popular searches that didn't lead to any clicks, from the 1,000 most frequent searches.
638
800
  #
639
801
  # Required API Key ACLs:
640
802
  # - analytics
@@ -643,7 +805,7 @@ module Algolia
643
805
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
644
806
  # @param limit [Integer] Number of items to return. (default to 10)
645
807
  # @param offset [Integer] Position of the first item to return. (default to 0)
646
- # @param tags [String] 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.
808
+ # @param tags [String] 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/).
647
809
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
648
810
  # @return [GetSearchesNoClicksResponse]
649
811
  def get_searches_no_clicks(index, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
@@ -651,7 +813,7 @@ module Algolia
651
813
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetSearchesNoClicksResponse')
652
814
  end
653
815
 
654
- # Returns the most popular of the latest 1,000 searches that didn't return any results.
816
+ # Retrieves the most popular searches that didn't return any results.
655
817
  #
656
818
  # Required API Key ACLs:
657
819
  # - analytics
@@ -660,7 +822,7 @@ module Algolia
660
822
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
661
823
  # @param limit [Integer] Number of items to return. (default to 10)
662
824
  # @param offset [Integer] Position of the first item to return. (default to 0)
663
- # @param tags [String] 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.
825
+ # @param tags [String] 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/).
664
826
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
665
827
  # @return [Http::Response] the response
666
828
  def get_searches_no_results_with_http_info(index, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
@@ -697,7 +859,7 @@ module Algolia
697
859
  @api_client.call_api(:GET, path, new_options)
698
860
  end
699
861
 
700
- # Returns the most popular of the latest 1,000 searches that didn't return any results.
862
+ # Retrieves the most popular searches that didn't return any results.
701
863
  #
702
864
  # Required API Key ACLs:
703
865
  # - analytics
@@ -706,7 +868,7 @@ module Algolia
706
868
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
707
869
  # @param limit [Integer] Number of items to return. (default to 10)
708
870
  # @param offset [Integer] Position of the first item to return. (default to 0)
709
- # @param tags [String] 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.
871
+ # @param tags [String] Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
710
872
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
711
873
  # @return [GetSearchesNoResultsResponse]
712
874
  def get_searches_no_results(index, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
@@ -714,7 +876,7 @@ module Algolia
714
876
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetSearchesNoResultsResponse')
715
877
  end
716
878
 
717
- # Return the latest update time of the Analytics API for an index. If the index has been recently created or no search has been performed yet, `updatedAt` will be `null`. > **Note**: The Analytics API is updated every 5 minutes.
879
+ # Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.
718
880
  #
719
881
  # Required API Key ACLs:
720
882
  # - analytics
@@ -747,7 +909,7 @@ module Algolia
747
909
  @api_client.call_api(:GET, path, new_options)
748
910
  end
749
911
 
750
- # Return the latest update time of the Analytics API for an index. If the index has been recently created or no search has been performed yet, `updatedAt` will be `null`. > **Note**: The Analytics API is updated every 5 minutes.
912
+ # Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.
751
913
  #
752
914
  # Required API Key ACLs:
753
915
  # - analytics
@@ -759,7 +921,7 @@ module Algolia
759
921
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetStatusResponse')
760
922
  end
761
923
 
762
- # Returns top countries. Limited to the 1,000 most frequent ones.
924
+ # Retrieves the countries with the most searches to your index.
763
925
  #
764
926
  # Required API Key ACLs:
765
927
  # - analytics
@@ -768,7 +930,7 @@ module Algolia
768
930
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
769
931
  # @param limit [Integer] Number of items to return. (default to 10)
770
932
  # @param offset [Integer] Position of the first item to return. (default to 0)
771
- # @param tags [String] 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.
933
+ # @param tags [String] 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/).
772
934
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
773
935
  # @return [Http::Response] the response
774
936
  def get_top_countries_with_http_info(index, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
@@ -805,7 +967,7 @@ module Algolia
805
967
  @api_client.call_api(:GET, path, new_options)
806
968
  end
807
969
 
808
- # Returns top countries. Limited to the 1,000 most frequent ones.
970
+ # Retrieves the countries with the most searches to your index.
809
971
  #
810
972
  # Required API Key ACLs:
811
973
  # - analytics
@@ -814,7 +976,7 @@ module Algolia
814
976
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
815
977
  # @param limit [Integer] Number of items to return. (default to 10)
816
978
  # @param offset [Integer] Position of the first item to return. (default to 0)
817
- # @param tags [String] 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.
979
+ # @param tags [String] Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
818
980
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
819
981
  # @return [GetTopCountriesResponse]
820
982
  def get_top_countries(index, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
@@ -822,17 +984,17 @@ module Algolia
822
984
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopCountriesResponse')
823
985
  end
824
986
 
825
- # Return the most popular [filterable attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in the 1,000 most recently used filters.
987
+ # Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
826
988
  #
827
989
  # Required API Key ACLs:
828
990
  # - analytics
829
991
  # @param index [String] Index name. (required)
830
- # @param search [String] User query.
992
+ # @param search [String] Search query.
831
993
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
832
994
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
833
995
  # @param limit [Integer] Number of items to return. (default to 10)
834
996
  # @param offset [Integer] Position of the first item to return. (default to 0)
835
- # @param tags [String] 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.
997
+ # @param tags [String] 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/).
836
998
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
837
999
  # @return [Http::Response] the response
838
1000
  def get_top_filter_attributes_with_http_info(index, search = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
@@ -870,17 +1032,17 @@ module Algolia
870
1032
  @api_client.call_api(:GET, path, new_options)
871
1033
  end
872
1034
 
873
- # Return the most popular [filterable attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in the 1,000 most recently used filters.
1035
+ # Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
874
1036
  #
875
1037
  # Required API Key ACLs:
876
1038
  # - analytics
877
1039
  # @param index [String] Index name. (required)
878
- # @param search [String] User query.
1040
+ # @param search [String] Search query.
879
1041
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
880
1042
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
881
1043
  # @param limit [Integer] Number of items to return. (default to 10)
882
1044
  # @param offset [Integer] Position of the first item to return. (default to 0)
883
- # @param tags [String] 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.
1045
+ # @param tags [String] 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/).
884
1046
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
885
1047
  # @return [GetTopFilterAttributesResponse]
886
1048
  def get_top_filter_attributes(index, search = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
@@ -888,18 +1050,18 @@ module Algolia
888
1050
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopFilterAttributesResponse')
889
1051
  end
890
1052
 
891
- # Returns the most popular filter values for an attribute in the 1,000 most recently used filters.
1053
+ # Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.
892
1054
  #
893
1055
  # Required API Key ACLs:
894
1056
  # - analytics
895
1057
  # @param attribute [String] Attribute name. (required)
896
1058
  # @param index [String] Index name. (required)
897
- # @param search [String] User query.
1059
+ # @param search [String] Search query.
898
1060
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
899
1061
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
900
1062
  # @param limit [Integer] Number of items to return. (default to 10)
901
1063
  # @param offset [Integer] Position of the first item to return. (default to 0)
902
- # @param tags [String] 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.
1064
+ # @param tags [String] 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/).
903
1065
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
904
1066
  # @return [Http::Response] the response
905
1067
  def get_top_filter_for_attribute_with_http_info(attribute, index, search = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
@@ -941,18 +1103,18 @@ module Algolia
941
1103
  @api_client.call_api(:GET, path, new_options)
942
1104
  end
943
1105
 
944
- # Returns the most popular filter values for an attribute in the 1,000 most recently used filters.
1106
+ # Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.
945
1107
  #
946
1108
  # Required API Key ACLs:
947
1109
  # - analytics
948
1110
  # @param attribute [String] Attribute name. (required)
949
1111
  # @param index [String] Index name. (required)
950
- # @param search [String] User query.
1112
+ # @param search [String] Search query.
951
1113
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
952
1114
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
953
1115
  # @param limit [Integer] Number of items to return. (default to 10)
954
1116
  # @param offset [Integer] Position of the first item to return. (default to 0)
955
- # @param tags [String] 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.
1117
+ # @param tags [String] 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/).
956
1118
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
957
1119
  # @return [GetTopFilterForAttributeResponse]
958
1120
  def get_top_filter_for_attribute(attribute, index, search = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
@@ -960,17 +1122,17 @@ module Algolia
960
1122
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopFilterForAttributeResponse')
961
1123
  end
962
1124
 
963
- # Returns top filters for filter-enabled searches that don't return results. Limited to the 1,000 most recently used filters.
1125
+ # 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.
964
1126
  #
965
1127
  # Required API Key ACLs:
966
1128
  # - analytics
967
1129
  # @param index [String] Index name. (required)
968
- # @param search [String] User query.
1130
+ # @param search [String] Search query.
969
1131
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
970
1132
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
971
1133
  # @param limit [Integer] Number of items to return. (default to 10)
972
1134
  # @param offset [Integer] Position of the first item to return. (default to 0)
973
- # @param tags [String] 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.
1135
+ # @param tags [String] 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/).
974
1136
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
975
1137
  # @return [Http::Response] the response
976
1138
  def get_top_filters_no_results_with_http_info(index, search = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
@@ -1008,17 +1170,17 @@ module Algolia
1008
1170
  @api_client.call_api(:GET, path, new_options)
1009
1171
  end
1010
1172
 
1011
- # Returns top filters for filter-enabled searches that don't return results. Limited to the 1,000 most recently used filters.
1173
+ # 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.
1012
1174
  #
1013
1175
  # Required API Key ACLs:
1014
1176
  # - analytics
1015
1177
  # @param index [String] Index name. (required)
1016
- # @param search [String] User query.
1178
+ # @param search [String] Search query.
1017
1179
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
1018
1180
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
1019
1181
  # @param limit [Integer] Number of items to return. (default to 10)
1020
1182
  # @param offset [Integer] Position of the first item to return. (default to 0)
1021
- # @param tags [String] 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.
1183
+ # @param tags [String] 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/).
1022
1184
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1023
1185
  # @return [GetTopFiltersNoResultsResponse]
1024
1186
  def get_top_filters_no_results(index, search = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
@@ -1026,21 +1188,23 @@ module Algolia
1026
1188
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopFiltersNoResultsResponse')
1027
1189
  end
1028
1190
 
1029
- # Return the most popular clicked results in the last 1,000 searches.
1191
+ # Retrieves the object IDs of the most frequent search results.
1030
1192
  #
1031
1193
  # Required API Key ACLs:
1032
1194
  # - analytics
1033
1195
  # @param index [String] Index name. (required)
1034
- # @param search [String] User query.
1035
- # @param click_analytics [Boolean] Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (default to false)
1196
+ # @param search [String] Search query.
1197
+ # @param click_analytics [Boolean] Whether to include metrics related to click and conversion events in the response. (default to false)
1198
+ # @param revenue_analytics [Boolean] Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response. (default to false)
1036
1199
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
1037
1200
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
1038
1201
  # @param limit [Integer] Number of items to return. (default to 10)
1039
1202
  # @param offset [Integer] Position of the first item to return. (default to 0)
1040
- # @param tags [String] 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.
1203
+ # @param tags [String] 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/).
1041
1204
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1042
1205
  # @return [Http::Response] the response
1043
- def get_top_hits_with_http_info(index, search = nil, click_analytics = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
1206
+ def get_top_hits_with_http_info(index, search = nil, click_analytics = nil, revenue_analytics = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil,
1207
+ request_options = {})
1044
1208
  # verify the required parameter 'index' is set
1045
1209
  if @api_client.config.client_side_validation && index.nil?
1046
1210
  raise ArgumentError, "Parameter `index` is required when calling `get_top_hits`."
@@ -1054,6 +1218,7 @@ module Algolia
1054
1218
  query_params[:index] = index
1055
1219
  query_params[:search] = search unless search.nil?
1056
1220
  query_params[:clickAnalytics] = click_analytics unless click_analytics.nil?
1221
+ query_params[:revenueAnalytics] = revenue_analytics unless revenue_analytics.nil?
1057
1222
  query_params[:startDate] = start_date unless start_date.nil?
1058
1223
  query_params[:endDate] = end_date unless end_date.nil?
1059
1224
  query_params[:limit] = limit unless limit.nil?
@@ -1076,42 +1241,45 @@ module Algolia
1076
1241
  @api_client.call_api(:GET, path, new_options)
1077
1242
  end
1078
1243
 
1079
- # Return the most popular clicked results in the last 1,000 searches.
1244
+ # Retrieves the object IDs of the most frequent search results.
1080
1245
  #
1081
1246
  # Required API Key ACLs:
1082
1247
  # - analytics
1083
1248
  # @param index [String] Index name. (required)
1084
- # @param search [String] User query.
1085
- # @param click_analytics [Boolean] Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (default to false)
1249
+ # @param search [String] Search query.
1250
+ # @param click_analytics [Boolean] Whether to include metrics related to click and conversion events in the response. (default to false)
1251
+ # @param revenue_analytics [Boolean] Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response. (default to false)
1086
1252
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
1087
1253
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
1088
1254
  # @param limit [Integer] Number of items to return. (default to 10)
1089
1255
  # @param offset [Integer] Position of the first item to return. (default to 0)
1090
- # @param tags [String] 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.
1256
+ # @param tags [String] 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/).
1091
1257
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1092
1258
  # @return [GetTopHitsResponse]
1093
- def get_top_hits(index, search = nil, click_analytics = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil, request_options = {})
1094
- response = get_top_hits_with_http_info(index, search, click_analytics, start_date, end_date, limit, offset, tags, request_options)
1259
+ def get_top_hits(index, search = nil, click_analytics = nil, revenue_analytics = nil, start_date = nil, end_date = nil, limit = nil, offset = nil, tags = nil,
1260
+ request_options = {})
1261
+ response = get_top_hits_with_http_info(index, search, click_analytics, revenue_analytics, start_date, end_date, limit, offset, tags, request_options)
1095
1262
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopHitsResponse')
1096
1263
  end
1097
1264
 
1098
- # Returns the most popular of the latest 1,000 searches. For each search, also returns the number of hits.
1265
+ # Returns the most popular search terms.
1099
1266
  #
1100
1267
  # Required API Key ACLs:
1101
1268
  # - analytics
1102
1269
  # @param index [String] Index name. (required)
1103
- # @param click_analytics [Boolean] Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (default to false)
1270
+ # @param click_analytics [Boolean] Whether to include metrics related to click and conversion events in the response. (default to false)
1271
+ # @param revenue_analytics [Boolean] Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response. (default to false)
1104
1272
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
1105
1273
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
1106
- # @param order_by [OrderBy] Reorder the results. (default to 'searchCount')
1274
+ # @param order_by [OrderBy] Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available. (default to 'searchCount')
1107
1275
  # @param direction [Direction] Sorting direction of the results: ascending or descending. (default to 'asc')
1108
1276
  # @param limit [Integer] Number of items to return. (default to 10)
1109
1277
  # @param offset [Integer] Position of the first item to return. (default to 0)
1110
- # @param tags [String] 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.
1278
+ # @param tags [String] 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/).
1111
1279
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1112
1280
  # @return [Http::Response] the response
1113
- def get_top_searches_with_http_info(index, click_analytics = nil, start_date = nil, end_date = nil, order_by = nil, direction = nil, limit = nil, offset = nil, tags = nil,
1114
- request_options = {})
1281
+ def get_top_searches_with_http_info(index, click_analytics = nil, revenue_analytics = nil, start_date = nil, end_date = nil, order_by = nil, direction = nil, limit = nil, offset = nil,
1282
+ tags = nil, request_options = {})
1115
1283
  # verify the required parameter 'index' is set
1116
1284
  if @api_client.config.client_side_validation && index.nil?
1117
1285
  raise ArgumentError, "Parameter `index` is required when calling `get_top_searches`."
@@ -1124,6 +1292,7 @@ module Algolia
1124
1292
  query_params = {}
1125
1293
  query_params[:index] = index
1126
1294
  query_params[:clickAnalytics] = click_analytics unless click_analytics.nil?
1295
+ query_params[:revenueAnalytics] = revenue_analytics unless revenue_analytics.nil?
1127
1296
  query_params[:startDate] = start_date unless start_date.nil?
1128
1297
  query_params[:endDate] = end_date unless end_date.nil?
1129
1298
  query_params[:orderBy] = order_by unless order_by.nil?
@@ -1148,35 +1317,36 @@ module Algolia
1148
1317
  @api_client.call_api(:GET, path, new_options)
1149
1318
  end
1150
1319
 
1151
- # Returns the most popular of the latest 1,000 searches. For each search, also returns the number of hits.
1320
+ # Returns the most popular search terms.
1152
1321
  #
1153
1322
  # Required API Key ACLs:
1154
1323
  # - analytics
1155
1324
  # @param index [String] Index name. (required)
1156
- # @param click_analytics [Boolean] Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (default to false)
1325
+ # @param click_analytics [Boolean] Whether to include metrics related to click and conversion events in the response. (default to false)
1326
+ # @param revenue_analytics [Boolean] Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response. (default to false)
1157
1327
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
1158
1328
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
1159
- # @param order_by [OrderBy] Reorder the results. (default to 'searchCount')
1329
+ # @param order_by [OrderBy] Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available. (default to 'searchCount')
1160
1330
  # @param direction [Direction] Sorting direction of the results: ascending or descending. (default to 'asc')
1161
1331
  # @param limit [Integer] Number of items to return. (default to 10)
1162
1332
  # @param offset [Integer] Position of the first item to return. (default to 0)
1163
- # @param tags [String] 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.
1333
+ # @param tags [String] 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/).
1164
1334
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1165
1335
  # @return [GetTopSearchesResponse]
1166
- def get_top_searches(index, click_analytics = nil, start_date = nil, end_date = nil, order_by = nil, direction = nil, limit = nil, offset = nil, tags = nil,
1336
+ def get_top_searches(index, click_analytics = nil, revenue_analytics = nil, start_date = nil, end_date = nil, order_by = nil, direction = nil, limit = nil, offset = nil, tags = nil,
1167
1337
  request_options = {})
1168
- response = get_top_searches_with_http_info(index, click_analytics, start_date, end_date, order_by, direction, limit, offset, tags, request_options)
1338
+ response = get_top_searches_with_http_info(index, click_analytics, revenue_analytics, start_date, end_date, order_by, direction, limit, offset, tags, request_options)
1169
1339
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Analytics::GetTopSearchesResponse')
1170
1340
  end
1171
1341
 
1172
- # Return the count of unique users.
1342
+ # 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.
1173
1343
  #
1174
1344
  # Required API Key ACLs:
1175
1345
  # - analytics
1176
1346
  # @param index [String] Index name. (required)
1177
1347
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
1178
1348
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
1179
- # @param tags [String] 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.
1349
+ # @param tags [String] 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/).
1180
1350
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1181
1351
  # @return [Http::Response] the response
1182
1352
  def get_users_count_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {})
@@ -1208,14 +1378,14 @@ module Algolia
1208
1378
  @api_client.call_api(:GET, path, new_options)
1209
1379
  end
1210
1380
 
1211
- # Return the count of unique users.
1381
+ # 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.
1212
1382
  #
1213
1383
  # Required API Key ACLs:
1214
1384
  # - analytics
1215
1385
  # @param index [String] Index name. (required)
1216
1386
  # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
1217
1387
  # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
1218
- # @param tags [String] 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.
1388
+ # @param tags [String] 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/).
1219
1389
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1220
1390
  # @return [GetUsersCountResponse]
1221
1391
  def get_users_count(index, start_date = nil, end_date = nil, tags = nil, request_options = {})