Skip to main content

Insights API (0.0.1)

API powering the Insights feature of Algolia.

Authentication

appId

Security Scheme Type API Key
Header parameter name: X-Algolia-Application-Id

apiKey

Security Scheme Type API Key
Header parameter name: X-Algolia-API-Key

insights

Pushes an array of events.

This command pushes an array of events.

Authorizations:
Request Body schema: application/json
required
Array of objects (InsightEvent) [ items ]

Array of events sent.

Array
eventType
required
string
Enum: "click" "conversion" "view"

An eventType can be a click, a conversion, or a view.

eventName
required
string

A user-defined string used to categorize events.

index
required
string

Name of the targeted index.

userToken
required
string

A user identifier. Depending if the user is logged-in or not, several strategies can be used from a sessionId to a technical identifier.

timestamp
integer

Time of the event expressed in milliseconds since the Unix epoch.

queryID
string

Algolia queryID. This is required when an event is tied to a search.

objectIDs
Array of strings

An array of index objectID. Limited to 20 objects. An event can’t have both objectIDs and filters at the same time.

filters
Array of strings

An array of filters. Limited to 10 filters. An event can’t have both objectIDs and filters at the same time.

positions
Array of integers[ items ]

Position of the click in the list of Algolia search results. This field is required if a queryID is provided. One position must be provided for each objectID.

Responses

Request samples

Content type
application/json
{
  • "events": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "string"
}