Skip to main content
Required ACL: search 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 clickedObjectIDs. For details where this event is used, see Event types. Related methods:

Examples

For more information about initializing the JavaScript Insights client aa, see Initialize the Insights client.
JavaScript
aa("clickedObjectIDs", {
  userToken: "anonymous-123456", // required for Node.js
  authenticatedUserToken: "user-123456",
  index: "YourIndexName",
  eventName: "Product Clicked",
  objectIDs: ["objectID-1", "objectID-2"],
});

Parameters

eventName
string
required
Name of the specific event.Format: 1-64 ASCII characters, except control characters.To maximize the impact of your events, use consistent event names and consistent formatting, for example, β€œProduct Added To Cart” (always in title case).For example, you can adopt Twilio Segment’s object-action framework.
indexName
string
required
Name of the Algolia index.Format: same as the index name used by the search engine.Some API clients use index instead of indexName.
objectIDs
string[]
required
List of object IDs for items of an Algolia index.You can include up to 20 object IDs.
userToken
string
required
Anonymous user identifier.See also: User token
authenticatedUserToken
string
Pseudonymous identifier for authenticated users.
Don’t include personally identifiable information in user tokens.
See also: User token
⌘I