algoliasearch.insights

Members list

Type members

Classlikes

sealed trait AddToCartEvent

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object AddToCart.type

AddToCartEvent enumeration

AddToCartEvent enumeration

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
class AddToCartEventSerializer extends CustomSerializer[AddToCartEvent]

Attributes

Supertypes
class CustomSerializer[AddToCartEvent]
trait Serializer[AddToCartEvent]
class Object
trait Matchable
class Any
case class AddedToCartObjectIDs(eventName: String, eventType: ConversionEvent, eventSubtype: AddToCartEvent, index: String, objectIDs: Seq[String], objectData: Option[Seq[ObjectData]], currency: Option[String], userToken: String, timestamp: Option[Long], authenticatedUserToken: Option[String]) extends EventsItemsTrait

Use this event to track when users add items to their shopping cart unrelated to a previous Algolia request. For example, if you don't use Algolia to build your category pages, use this event. To track add-to-cart events related to Algolia requests, use the "Added to cart object IDs after search" event.

Use this event to track when users add items to their shopping cart unrelated to a previous Algolia request. For example, if you don't use Algolia to build your category pages, use this event. To track add-to-cart events related to Algolia requests, use the "Added to cart object IDs after search" event.

Value parameters

authenticatedUserToken

User token for authenticated users.

currency

If you include pricing information in the objectData parameter, you must also specify the currency as ISO-4217 currency code, such as USD or EUR.

eventName

Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment's object-action framework.

index

Name of the Algolia index.

objectData

Extra information about the records involved in the event—for example, to add price and quantities of purchased products. If provided, must be the same length as objectIDs.

objectIDs

List of object identifiers for items of an Algolia index.

timestamp

Time of the event in milliseconds in Unix epoch time. By default, the Insights API uses the time it receives an event as its timestamp.

userToken

Anonymous or pseudonymous user identifier. > Note: Never include personally identifiable information in user tokens.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait EventsItems
class Object
trait Matchable
class Any
Show all
case class AddedToCartObjectIDsAfterSearch(eventName: String, eventType: ConversionEvent, eventSubtype: AddToCartEvent, index: String, queryID: String, objectIDs: Seq[String], objectData: Option[Seq[ObjectDataAfterSearch]], currency: Option[String], userToken: String, timestamp: Option[Long], authenticatedUserToken: Option[String]) extends EventsItemsTrait

Use this event to track when users add items to their shopping cart after a previous Algolia request. If you're building your category pages with Algolia, you'll also use this event.

Use this event to track when users add items to their shopping cart after a previous Algolia request. If you're building your category pages with Algolia, you'll also use this event.

Value parameters

authenticatedUserToken

User token for authenticated users.

currency

If you include pricing information in the objectData parameter, you must also specify the currency as ISO-4217 currency code, such as USD or EUR.

eventName

Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment's object-action framework.

index

Name of the Algolia index.

objectData

Extra information about the records involved in the event—for example, to add price and quantities of purchased products. If provided, must be the same length as objectIDs.

objectIDs

List of object identifiers for items of an Algolia index.

queryID

Unique identifier for a search query. The query ID is required for events related to search or browse requests. If you add clickAnalytics: true as a search request parameter, the query ID is included in the API response.

timestamp

Time of the event in milliseconds in Unix epoch time. By default, the Insights API uses the time it receives an event as its timestamp.

userToken

Anonymous or pseudonymous user identifier. > Note: Never include personally identifiable information in user tokens.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait EventsItems
class Object
trait Matchable
class Any
Show all
sealed trait ClickEvent

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Click.type
object ClickEvent

ClickEvent enumeration

ClickEvent enumeration

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
ClickEvent.type
class ClickEventSerializer extends CustomSerializer[ClickEvent]

Attributes

Supertypes
class CustomSerializer[ClickEvent]
trait Serializer[ClickEvent]
class Object
trait Matchable
class Any
case class ClickedFilters(eventName: String, eventType: ClickEvent, index: String, filters: Seq[String], userToken: String, timestamp: Option[Long], authenticatedUserToken: Option[String]) extends EventsItemsTrait

Use this event to track when users click facet filters in your user interface.

Use this event to track when users click facet filters in your user interface.

Value parameters

authenticatedUserToken

User token for authenticated users.

eventName

Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment's object-action framework.

filters

Facet filters. Each facet filter string must be URL-encoded, such as, discount:10%25.

index

Name of the Algolia index.

timestamp

Time of the event in milliseconds in Unix epoch time. By default, the Insights API uses the time it receives an event as its timestamp.

userToken

Anonymous or pseudonymous user identifier. > Note: Never include personally identifiable information in user tokens.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait EventsItems
class Object
trait Matchable
class Any
Show all
case class ClickedObjectIDs(eventName: String, eventType: ClickEvent, index: String, objectIDs: Seq[String], userToken: String, timestamp: Option[Long]) extends EventsItemsTrait

Use this event to track when users click items unrelated to a previous Algolia request. For example, if you don't use Algolia to build your category pages, use this event. To track click events related to Algolia requests, use the "Clicked object IDs after search" event.

Use this event to track when users click items unrelated to a previous Algolia request. For example, if you don't use Algolia to build your category pages, use this event. To track click events related to Algolia requests, use the "Clicked object IDs after search" event.

Value parameters

eventName

Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment's object-action framework.

index

Name of the Algolia index.

objectIDs

List of object identifiers for items of an Algolia index.

timestamp

Time of the event in milliseconds in Unix epoch time. By default, the Insights API uses the time it receives an event as its timestamp.

userToken

Anonymous or pseudonymous user identifier. > Note: Never include personally identifiable information in user tokens.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait EventsItems
class Object
trait Matchable
class Any
Show all
case class ClickedObjectIDsAfterSearch(eventName: String, eventType: ClickEvent, index: String, objectIDs: Seq[String], positions: Seq[Int], queryID: String, userToken: String, timestamp: Option[Long], authenticatedUserToken: Option[String]) extends EventsItemsTrait

Click event after an Algolia request. Use this event to track when users click items in the search results. If you're building your category pages with Algolia, you'll also use this event.

Click event after an Algolia request. Use this event to track when users click items in the search results. If you're building your category pages with Algolia, you'll also use this event.

Value parameters

authenticatedUserToken

User token for authenticated users.

eventName

Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment's object-action framework.

index

Name of the Algolia index.

objectIDs

List of object identifiers for items of an Algolia index.

positions

Position of the clicked objects in the search results. The first search result has a position of 1 (not 0). You must provide 1 position for each objectID.

queryID

Unique identifier for a search query. The query ID is required for events related to search or browse requests. If you add clickAnalytics: true as a search request parameter, the query ID is included in the API response.

timestamp

Time of the event in milliseconds in Unix epoch time. By default, the Insights API uses the time it receives an event as its timestamp.

userToken

Anonymous or pseudonymous user identifier. > Note: Never include personally identifiable information in user tokens.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait EventsItems
class Object
trait Matchable
class Any
Show all
sealed trait ConversionEvent

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Conversion.type

ConversionEvent enumeration

ConversionEvent enumeration

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
class ConversionEventSerializer extends CustomSerializer[ConversionEvent]

Attributes

Supertypes
class CustomSerializer[ConversionEvent]
trait Serializer[ConversionEvent]
class Object
trait Matchable
class Any
case class ConvertedFilters(eventName: String, eventType: ConversionEvent, index: String, filters: Seq[String], userToken: String, timestamp: Option[Long], authenticatedUserToken: Option[String]) extends EventsItemsTrait

ConvertedFilters

ConvertedFilters

Value parameters

authenticatedUserToken

User token for authenticated users.

eventName

Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment's object-action framework.

filters

Facet filters. Each facet filter string must be URL-encoded, such as, discount:10%25.

index

Name of the Algolia index.

timestamp

Time of the event in milliseconds in Unix epoch time. By default, the Insights API uses the time it receives an event as its timestamp.

userToken

Anonymous or pseudonymous user identifier. > Note: Never include personally identifiable information in user tokens.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait EventsItems
class Object
trait Matchable
class Any
Show all
case class ConvertedObjectIDs(eventName: String, eventType: ConversionEvent, index: String, objectIDs: Seq[String], userToken: String, timestamp: Option[Long], authenticatedUserToken: Option[String]) extends EventsItemsTrait

Use this event to track when users convert on items unrelated to a previous Algolia request. For example, if you don't use Algolia to build your category pages, use this event. To track conversion events related to Algolia requests, use the "Converted object IDs after search" event.

Use this event to track when users convert on items unrelated to a previous Algolia request. For example, if you don't use Algolia to build your category pages, use this event. To track conversion events related to Algolia requests, use the "Converted object IDs after search" event.

Value parameters

authenticatedUserToken

User token for authenticated users.

eventName

Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment's object-action framework.

index

Name of the Algolia index.

objectIDs

List of object identifiers for items of an Algolia index.

timestamp

Time of the event in milliseconds in Unix epoch time. By default, the Insights API uses the time it receives an event as its timestamp.

userToken

Anonymous or pseudonymous user identifier. > Note: Never include personally identifiable information in user tokens.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait EventsItems
class Object
trait Matchable
class Any
Show all
case class ConvertedObjectIDsAfterSearch(eventName: String, eventType: ConversionEvent, index: String, objectIDs: Seq[String], queryID: String, userToken: String, timestamp: Option[Long], authenticatedUserToken: Option[String]) extends EventsItemsTrait

Use this event to track when users convert after a previous Algolia request. For example, a user clicks on an item in the search results to view the product detail page. Then, the user adds the item to their shopping cart. If you're building your category pages with Algolia, you'll also use this event.

Use this event to track when users convert after a previous Algolia request. For example, a user clicks on an item in the search results to view the product detail page. Then, the user adds the item to their shopping cart. If you're building your category pages with Algolia, you'll also use this event.

Value parameters

authenticatedUserToken

User token for authenticated users.

eventName

Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment's object-action framework.

index

Name of the Algolia index.

objectIDs

List of object identifiers for items of an Algolia index.

queryID

Unique identifier for a search query. The query ID is required for events related to search or browse requests. If you add clickAnalytics: true as a search request parameter, the query ID is included in the API response.

timestamp

Time of the event in milliseconds in Unix epoch time. By default, the Insights API uses the time it receives an event as its timestamp.

userToken

Anonymous or pseudonymous user identifier. > Note: Never include personally identifiable information in user tokens.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait EventsItems
class Object
trait Matchable
class Any
Show all
sealed trait Discount

Absolute value of the discount in effect for this object, measured in currency.

Absolute value of the discount in effect for this object, measured in currency.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class DoubleValue
class StringValue
object Discount

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Discount.type
object DiscountSerializer extends Serializer[Discount]

Attributes

Supertypes
trait Serializer[Discount]
class Object
trait Matchable
class Any
Self type
case class ErrorBase(message: Option[String], additionalProperties: Option[List[JField]])

Error.

Error.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
class ErrorBaseSerializer extends Serializer[ErrorBase]

Attributes

Supertypes
trait Serializer[ErrorBase]
class Object
trait Matchable
class Any
sealed trait EventsItems

EventsItems

EventsItems

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object EventsItems

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
object EventsItemsSerializer extends Serializer[EventsItems]

Attributes

Supertypes
trait Serializer[EventsItems]
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait EventsItems
class Object
trait Matchable
class Any
Known subtypes
case class EventsResponse(message: Option[String], status: Option[Int])

The response of the Insights API.

The response of the Insights API.

Value parameters

message

Details about the response, such as error messages.

status

The HTTP status code of the response.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class InsightsEvents(events: Seq[EventsItems])

InsightsEvents

InsightsEvents

Value parameters

events

List of click and conversion events. An event is an object representing a user interaction. Events have attributes that describe the interaction, such as an event name, a type, or a user token. Some attributes require other attributes to be declared, and some attributes can't be declared at the same time. All events must be valid, otherwise the API returns an error.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object JsonSupport

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
case class ObjectData(price: Option[Price], quantity: Option[Int], discount: Option[Discount])

ObjectData

ObjectData

Value parameters

quantity

The quantity of the purchased or added-to-cart item. The total value of a purchase is the sum of quantity multiplied with the price for each purchased item.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class ObjectDataAfterSearch(queryID: Option[String], price: Option[Price], quantity: Option[Int], discount: Option[Discount])

ObjectDataAfterSearch

ObjectDataAfterSearch

Value parameters

quantity

The quantity of the purchased or added-to-cart item. The total value of a purchase is the sum of quantity multiplied with the price for each purchased item.

queryID

ID of the query that this specific record is attributable to. Used to track purchase events with multiple items originating from different searches.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait Price

The price of the item. This should be the final price, inclusive of any discounts in effect.

The price of the item. This should be the final price, inclusive of any discounts in effect.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class DoubleValue
class StringValue
object Price

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Price.type
object PriceSerializer extends Serializer[Price]

Attributes

Supertypes
trait Serializer[Price]
class Object
trait Matchable
class Any
Self type
sealed trait PurchaseEvent

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Purchase.type
object PurchaseEvent

PurchaseEvent enumeration

PurchaseEvent enumeration

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
class PurchaseEventSerializer extends CustomSerializer[PurchaseEvent]

Attributes

Supertypes
class CustomSerializer[PurchaseEvent]
trait Serializer[PurchaseEvent]
class Object
trait Matchable
class Any
case class PurchasedObjectIDs(eventName: String, eventType: ConversionEvent, eventSubtype: PurchaseEvent, index: String, objectIDs: Seq[String], objectData: Option[Seq[ObjectData]], currency: Option[String], userToken: String, timestamp: Option[Long], authenticatedUserToken: Option[String]) extends EventsItemsTrait

Use this event to track when users make a purchase unrelated to a previous Algolia request. For example, if you don't use Algolia to build your category pages, use this event. To track purchase events related to Algolia requests, use the "Purchased object IDs after search" event.

Use this event to track when users make a purchase unrelated to a previous Algolia request. For example, if you don't use Algolia to build your category pages, use this event. To track purchase events related to Algolia requests, use the "Purchased object IDs after search" event.

Value parameters

authenticatedUserToken

User token for authenticated users.

currency

If you include pricing information in the objectData parameter, you must also specify the currency as ISO-4217 currency code, such as USD or EUR.

eventName

Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment's object-action framework.

index

Name of the Algolia index.

objectData

Extra information about the records involved in the event—for example, to add price and quantities of purchased products. If provided, must be the same length as objectIDs.

objectIDs

List of object identifiers for items of an Algolia index.

timestamp

Time of the event in milliseconds in Unix epoch time. By default, the Insights API uses the time it receives an event as its timestamp.

userToken

Anonymous or pseudonymous user identifier. > Note: Never include personally identifiable information in user tokens.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait EventsItems
class Object
trait Matchable
class Any
Show all
case class PurchasedObjectIDsAfterSearch(eventName: String, eventType: ConversionEvent, eventSubtype: PurchaseEvent, index: String, queryID: String, objectIDs: Seq[String], objectData: Option[Seq[ObjectDataAfterSearch]], currency: Option[String], userToken: String, timestamp: Option[Long], authenticatedUserToken: Option[String]) extends EventsItemsTrait

Use this event to track when users make a purchase after a previous Algolia request. If you're building your category pages with Algolia, you'll also use this event.

Use this event to track when users make a purchase after a previous Algolia request. If you're building your category pages with Algolia, you'll also use this event.

Value parameters

authenticatedUserToken

User token for authenticated users.

currency

If you include pricing information in the objectData parameter, you must also specify the currency as ISO-4217 currency code, such as USD or EUR.

eventName

Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment's object-action framework.

index

Name of the Algolia index.

objectData

Extra information about the records involved in the event—for example, to add price and quantities of purchased products. If provided, must be the same length as objectIDs.

objectIDs

List of object identifiers for items of an Algolia index.

queryID

Unique identifier for a search query. The query ID is required for events related to search or browse requests. If you add clickAnalytics: true as a search request parameter, the query ID is included in the API response.

timestamp

Time of the event in milliseconds in Unix epoch time. By default, the Insights API uses the time it receives an event as its timestamp.

userToken

Anonymous or pseudonymous user identifier. > Note: Never include personally identifiable information in user tokens.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait EventsItems
class Object
trait Matchable
class Any
Show all
sealed trait ViewEvent

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object View.type
object ViewEvent

ViewEvent enumeration

ViewEvent enumeration

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
ViewEvent.type
class ViewEventSerializer extends CustomSerializer[ViewEvent]

Attributes

Supertypes
class CustomSerializer[ViewEvent]
trait Serializer[ViewEvent]
class Object
trait Matchable
class Any
case class ViewedFilters(eventName: String, eventType: ViewEvent, index: String, filters: Seq[String], userToken: String, timestamp: Option[Long], authenticatedUserToken: Option[String]) extends EventsItemsTrait

Use this method to capture active filters. For example, when browsing a category page, users see content filtered on that specific category.

Use this method to capture active filters. For example, when browsing a category page, users see content filtered on that specific category.

Value parameters

authenticatedUserToken

User token for authenticated users.

eventName

Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment's object-action framework.

filters

Facet filters. Each facet filter string must be URL-encoded, such as, discount:10%25.

index

Name of the Algolia index.

timestamp

Time of the event in milliseconds in Unix epoch time. By default, the Insights API uses the time it receives an event as its timestamp.

userToken

Anonymous or pseudonymous user identifier. > Note: Never include personally identifiable information in user tokens.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait EventsItems
class Object
trait Matchable
class Any
Show all
case class ViewedObjectIDs(eventName: String, eventType: ViewEvent, index: String, objectIDs: Seq[String], userToken: String, timestamp: Option[Long], authenticatedUserToken: Option[String]) extends EventsItemsTrait

Use this event to track when users viewed items in the search results.

Use this event to track when users viewed items in the search results.

Value parameters

authenticatedUserToken

User token for authenticated users.

eventName

Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment's object-action framework.

index

Name of the Algolia index.

objectIDs

List of object identifiers for items of an Algolia index.

timestamp

Time of the event in milliseconds in Unix epoch time. By default, the Insights API uses the time it receives an event as its timestamp.

userToken

Anonymous or pseudonymous user identifier. > Note: Never include personally identifiable information in user tokens.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait EventsItems
class Object
trait Matchable
class Any
Show all