Clicked object IDs
We released a new version of the PHP API client in public beta. Read the beta documentation for more information.
We released a new version of the Java API client in public beta. Read the beta documentation for more information.
You’re currently reading the Ruby API client v2 documentation. Check the migration guide to learn how to upgrade from v1 to v2. You can still access the v1 documentation.
About this method
Send a click event to capture clicked items.
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,
Sending this event is useful for:
clickedObjectIDsAfterSearch: track click events related to Algolia requests.
sendEvents: if you don’t want to send real-time events.
Read the Algolia CLI documentation for more information.
1 2 3 4 5 6 7 8 9 10 $insights = Algolia\AlgoliaSearch\InsightsClient::create( 'YourApplicationID', 'YourSearchOnlyAPIKey' ); $insights->user("user-123456")->clickedObjectIDs( 'your_event_name', 'your_index_name', ['objectID-1', 'objectID-2'] );
A pseudonymous or anonymous user identifier.
Never include personal identifiable information in user tokens.
Related: user token
The name of the specific event.
Format: 1-64 ASCII characters, except control characters.
To maximize the impact of your events, you should use consistent event names and consistent formatting—for example, “Product Added To Cart” (always in title case).
For example, you can adopt Segment’s object-action framework.
The name of the Algolia index.
Format: same as the index name used by the search engine.
Some API clients use
An array of object identifiers for items of an Algolia index.
You can include up to 20
This method doesn't return a response.