AnalyticsClient

algoliasearch.api.AnalyticsClient
See theAnalyticsClient companion object
class AnalyticsClient(appId: String, apiKey: String, region: Option[String], clientOptions: ClientOptions) extends ApiClient

Attributes

Companion
object
Graph
Supertypes
class ApiClient
trait AutoCloseable
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def customDelete[T : Manifest](path: String, parameters: Option[Map[String, Any]], requestOptions: Option[RequestOptions])(implicit evidence$1: Manifest[T], ec: ExecutionContext): Future[T]

This method allow you to send requests to the Algolia REST API.

This method allow you to send requests to the Algolia REST API.

Value parameters

parameters

Query parameters to apply to the current query.

path

Path of the endpoint, anything after "/1" must be specified.

Attributes

def customGet[T : Manifest](path: String, parameters: Option[Map[String, Any]], requestOptions: Option[RequestOptions])(implicit evidence$2: Manifest[T], ec: ExecutionContext): Future[T]

This method allow you to send requests to the Algolia REST API.

This method allow you to send requests to the Algolia REST API.

Value parameters

parameters

Query parameters to apply to the current query.

path

Path of the endpoint, anything after "/1" must be specified.

Attributes

def customPost[T : Manifest](path: String, parameters: Option[Map[String, Any]], body: Option[Any], requestOptions: Option[RequestOptions])(implicit evidence$3: Manifest[T], ec: ExecutionContext): Future[T]

This method allow you to send requests to the Algolia REST API.

This method allow you to send requests to the Algolia REST API.

Value parameters

body

Parameters to send with the custom request.

parameters

Query parameters to apply to the current query.

path

Path of the endpoint, anything after "/1" must be specified.

Attributes

def customPut[T : Manifest](path: String, parameters: Option[Map[String, Any]], body: Option[Any], requestOptions: Option[RequestOptions])(implicit evidence$4: Manifest[T], ec: ExecutionContext): Future[T]

This method allow you to send requests to the Algolia REST API.

This method allow you to send requests to the Algolia REST API.

Value parameters

body

Parameters to send with the custom request.

parameters

Query parameters to apply to the current query.

path

Path of the endpoint, anything after "/1" must be specified.

Attributes

def getAddToCartRate(index: String, startDate: Option[String], endDate: Option[String], tags: Option[String], requestOptions: Option[RequestOptions])(implicit ec: ExecutionContext): Future[GetAddToCartRateResponse]

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.

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.

Required API Key ACLs:

  • analytics

Value parameters

endDate

End date of the period to analyze, in YYYY-MM-DD format.

index

Index name.

startDate

Start date of the period to analyze, in YYYY-MM-DD format.

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.

Attributes

def getAverageClickPosition(index: String, startDate: Option[String], endDate: Option[String], tags: Option[String], requestOptions: Option[RequestOptions])(implicit ec: ExecutionContext): Future[GetAverageClickPositionResponse]

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.

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.

Required API Key ACLs:

  • analytics

Value parameters

endDate

End date of the period to analyze, in YYYY-MM-DD format.

index

Index name.

startDate

Start date of the period to analyze, in YYYY-MM-DD format.

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.

Attributes

def getClickPositions(index: String, startDate: Option[String], endDate: Option[String], tags: Option[String], requestOptions: Option[RequestOptions])(implicit ec: ExecutionContext): Future[GetClickPositionsResponse]

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.

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.

Required API Key ACLs:

  • analytics

Value parameters

endDate

End date of the period to analyze, in YYYY-MM-DD format.

index

Index name.

startDate

Start date of the period to analyze, in YYYY-MM-DD format.

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.

Attributes

def getClickThroughRate(index: String, startDate: Option[String], endDate: Option[String], tags: Option[String], requestOptions: Option[RequestOptions])(implicit ec: ExecutionContext): Future[GetClickThroughRateResponse]

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.

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.

Required API Key ACLs:

  • analytics

Value parameters

endDate

End date of the period to analyze, in YYYY-MM-DD format.

index

Index name.

startDate

Start date of the period to analyze, in YYYY-MM-DD format.

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.

Attributes

def getConversionRate(index: String, startDate: Option[String], endDate: Option[String], tags: Option[String], requestOptions: Option[RequestOptions])(implicit ec: ExecutionContext): Future[GetConversionRateResponse]

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.

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.

Required API Key ACLs:

  • analytics

Value parameters

endDate

End date of the period to analyze, in YYYY-MM-DD format.

index

Index name.

startDate

Start date of the period to analyze, in YYYY-MM-DD format.

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.

Attributes

def getNoClickRate(index: String, startDate: Option[String], endDate: Option[String], tags: Option[String], requestOptions: Option[RequestOptions])(implicit ec: ExecutionContext): Future[GetNoClickRateResponse]

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.

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.

Required API Key ACLs:

  • analytics

Value parameters

endDate

End date of the period to analyze, in YYYY-MM-DD format.

index

Index name.

startDate

Start date of the period to analyze, in YYYY-MM-DD format.

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.

Attributes

def getNoResultsRate(index: String, startDate: Option[String], endDate: Option[String], tags: Option[String], requestOptions: Option[RequestOptions])(implicit ec: ExecutionContext): Future[GetNoResultsRateResponse]

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.

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.

Required API Key ACLs:

  • analytics

Value parameters

endDate

End date of the period to analyze, in YYYY-MM-DD format.

index

Index name.

startDate

Start date of the period to analyze, in YYYY-MM-DD format.

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.

Attributes

def getPurchaseRate(index: String, startDate: Option[String], endDate: Option[String], tags: Option[String], requestOptions: Option[RequestOptions])(implicit ec: ExecutionContext): Future[GetPurchaseRateResponse]

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.

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.

Required API Key ACLs:

  • analytics

Value parameters

endDate

End date of the period to analyze, in YYYY-MM-DD format.

index

Index name.

startDate

Start date of the period to analyze, in YYYY-MM-DD format.

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.

Attributes

def getRevenue(index: String, startDate: Option[String], endDate: Option[String], tags: Option[String], requestOptions: Option[RequestOptions])(implicit ec: ExecutionContext): Future[GetRevenue]

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.

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.

Required API Key ACLs:

  • analytics

Value parameters

endDate

End date of the period to analyze, in YYYY-MM-DD format.

index

Index name.

startDate

Start date of the period to analyze, in YYYY-MM-DD format.

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.

Attributes

def getSearchesCount(index: String, startDate: Option[String], endDate: Option[String], tags: Option[String], requestOptions: Option[RequestOptions])(implicit ec: ExecutionContext): Future[GetSearchesCountResponse]

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.

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.

Required API Key ACLs:

  • analytics

Value parameters

endDate

End date of the period to analyze, in YYYY-MM-DD format.

index

Index name.

startDate

Start date of the period to analyze, in YYYY-MM-DD format.

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.

Attributes

def getSearchesNoClicks(index: String, startDate: Option[String], endDate: Option[String], limit: Option[Int], offset: Option[Int], tags: Option[String], requestOptions: Option[RequestOptions])(implicit ec: ExecutionContext): Future[GetSearchesNoClicksResponse]

Retrieves the most popular searches that didn't lead to any clicks, from the 1,000 most frequent searches.

Retrieves the most popular searches that didn't lead to any clicks, from the 1,000 most frequent searches.

Required API Key ACLs:

  • analytics

Value parameters

endDate

End date of the period to analyze, in YYYY-MM-DD format.

index

Index name.

limit

Number of items to return.

offset

Position of the first item to return.

startDate

Start date of the period to analyze, in YYYY-MM-DD format.

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.

Attributes

def getSearchesNoResults(index: String, startDate: Option[String], endDate: Option[String], limit: Option[Int], offset: Option[Int], tags: Option[String], requestOptions: Option[RequestOptions])(implicit ec: ExecutionContext): Future[GetSearchesNoResultsResponse]

Retrieves the most popular searches that didn't return any results.

Retrieves the most popular searches that didn't return any results.

Required API Key ACLs:

  • analytics

Value parameters

endDate

End date of the period to analyze, in YYYY-MM-DD format.

index

Index name.

limit

Number of items to return.

offset

Position of the first item to return.

startDate

Start date of the period to analyze, in YYYY-MM-DD format.

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.

Attributes

def getStatus(index: String, requestOptions: Option[RequestOptions])(implicit ec: ExecutionContext): Future[GetStatusResponse]

Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.

Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.

Required API Key ACLs:

  • analytics

Value parameters

index

Index name.

Attributes

def getTopCountries(index: String, startDate: Option[String], endDate: Option[String], limit: Option[Int], offset: Option[Int], tags: Option[String], requestOptions: Option[RequestOptions])(implicit ec: ExecutionContext): Future[GetTopCountriesResponse]

Retrieves the countries with the most searches to your index.

Retrieves the countries with the most searches to your index.

Required API Key ACLs:

  • analytics

Value parameters

endDate

End date of the period to analyze, in YYYY-MM-DD format.

index

Index name.

limit

Number of items to return.

offset

Position of the first item to return.

startDate

Start date of the period to analyze, in YYYY-MM-DD format.

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.

Attributes

def getTopFilterAttributes(index: String, search: Option[String], startDate: Option[String], endDate: Option[String], limit: Option[Int], offset: Option[Int], tags: Option[String], requestOptions: Option[RequestOptions])(implicit ec: ExecutionContext): Future[GetTopFilterAttributesResponse]

Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the attributesForFaceting setting.

Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the attributesForFaceting setting.

Required API Key ACLs:

  • analytics

Value parameters

endDate

End date of the period to analyze, in YYYY-MM-DD format.

index

Index name.

limit

Number of items to return.

offset

Position of the first item to return.

search

Search query.

startDate

Start date of the period to analyze, in YYYY-MM-DD format.

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.

Attributes

def getTopFilterForAttribute(attribute: String, index: String, search: Option[String], startDate: Option[String], endDate: Option[String], limit: Option[Int], offset: Option[Int], tags: Option[String], requestOptions: Option[RequestOptions])(implicit ec: ExecutionContext): Future[GetTopFilterForAttributeResponse]

Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the attributesForFaceting setting.

Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the attributesForFaceting setting.

Required API Key ACLs:

  • analytics

Value parameters

attribute

Attribute name.

endDate

End date of the period to analyze, in YYYY-MM-DD format.

index

Index name.

limit

Number of items to return.

offset

Position of the first item to return.

search

Search query.

startDate

Start date of the period to analyze, in YYYY-MM-DD format.

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.

Attributes

def getTopFiltersNoResults(index: String, search: Option[String], startDate: Option[String], endDate: Option[String], limit: Option[Int], offset: Option[Int], tags: Option[String], requestOptions: Option[RequestOptions])(implicit ec: ExecutionContext): Future[GetTopFiltersNoResultsResponse]

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 operation.

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 operation.

Required API Key ACLs:

  • analytics

Value parameters

endDate

End date of the period to analyze, in YYYY-MM-DD format.

index

Index name.

limit

Number of items to return.

offset

Position of the first item to return.

search

Search query.

startDate

Start date of the period to analyze, in YYYY-MM-DD format.

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.

Attributes

def getTopHits(index: String, search: Option[String], clickAnalytics: Option[Boolean], revenueAnalytics: Option[Boolean], startDate: Option[String], endDate: Option[String], limit: Option[Int], offset: Option[Int], tags: Option[String], requestOptions: Option[RequestOptions])(implicit ec: ExecutionContext): Future[GetTopHitsResponse]

Retrieves the object IDs of the most frequent search results.

Retrieves the object IDs of the most frequent search results.

Required API Key ACLs:

  • analytics

Value parameters

clickAnalytics

Whether to include metrics related to click and conversion events in the response.

endDate

End date of the period to analyze, in YYYY-MM-DD format.

index

Index name.

limit

Number of items to return.

offset

Position of the first item to return.

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.

search

Search query.

startDate

Start date of the period to analyze, in YYYY-MM-DD format.

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.

Attributes

def getTopSearches(index: String, clickAnalytics: Option[Boolean], revenueAnalytics: Option[Boolean], startDate: Option[String], endDate: Option[String], orderBy: Option[OrderBy], direction: Option[Direction], limit: Option[Int], offset: Option[Int], tags: Option[String], requestOptions: Option[RequestOptions])(implicit ec: ExecutionContext): Future[GetTopSearchesResponse]

Returns the most popular search terms.

Returns the most popular search terms.

Required API Key ACLs:

  • analytics

Value parameters

clickAnalytics

Whether to include metrics related to click and conversion events in the response.

direction

Sorting direction of the results: ascending or descending.

endDate

End date of the period to analyze, in YYYY-MM-DD format.

index

Index name.

limit

Number of items to return.

offset

Position of the first item to return.

orderBy

Attribute by which to order the response items. If the clickAnalytics parameter is false, only searchCount is available.

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.

startDate

Start date of the period to analyze, in YYYY-MM-DD format.

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.

Attributes

def getUsersCount(index: String, startDate: Option[String], endDate: Option[String], tags: Option[String], requestOptions: Option[RequestOptions])(implicit ec: ExecutionContext): Future[GetUsersCountResponse]

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.

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.

Required API Key ACLs:

  • analytics

Value parameters

endDate

End date of the period to analyze, in YYYY-MM-DD format.

index

Index name.

startDate

Start date of the period to analyze, in YYYY-MM-DD format.

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.

Attributes

Inherited methods

override def close(): Unit

Attributes

Definition Classes
ApiClient -> AutoCloseable
Inherited from:
ApiClient