Algolia
Algolia Analytics Events
1. Clicked Objects After Search
Input:
The clickedObjectsAfterSearch method in the AlgoliaAnalyticsService class is used to track when users click on search results after performing a search. The input parameters are:
- eventName (String): The name of the event, typically used to identify the type of user interaction (e.g., "Product Click").
- indexName (String): The name of the Algolia index where the search was performed. This helps identify which dataset was used during the search.
- queryId (String): The unique identifier for the search query. This ID is generated during the search operation and is necessary to associate the click event with the specific search.
- objectIds (List
): A list of object IDs representing the items that were clicked. These IDs correspond to the items in the search results. - positions (List
?): (Optional) A list of positions where the clicked objects appeared in the search results.
Output:
This method returns a Future
Process:
- Event Creation: The method prepares the event data, including the event name, index name, query ID, and object IDs.
- API Call: The method sends the prepared data to Algolia Insights API using the
insights.clickedObjectsAfterSearchfunction. - Tracking: This event helps track the effectiveness of search results, providing data on which items users are clicking on, thereby contributing to metrics like Click-Through Rate (CTR).
2. Converted Objects After Search
Input:
The convertedObjectsAfterSearch method tracks when users convert (e.g., make a purchase) after performing a search. The input parameters are:
- eventName (String): The name of the conversion event (e.g., "Product Purchased").
- indexName (String): The name of the Algolia index used during the search.
- queryId (String): The unique identifier for the search query, essential for linking the conversion back to the original search.
- objectIds (List
): A list of object IDs representing the items that were converted (e.g., purchased).
Output:
This method returns a Future
Process:
- Event Preparation: The method prepares the data for the conversion event, including the event name, index name, query ID, and object IDs.
- API Call: The method sends the conversion data to Algolia Insights API using
insights.convertedObjectsAfterSearch. - Metric Tracking: This method helps in tracking conversion rates by linking user actions back to the search queries that led to them.
3. Converted Objects
Input:
The convertedObjects method tracks conversions independently of a specific search query. The input parameters are:
- eventName (String): The name of the conversion event (e.g., "Product Purchased").
- indexName (String): The name of the Algolia index associated with the conversion.
- objectIds (List
): A list of object IDs representing the items that were converted (e.g., purchased).
Output:
This method returns a Future
Process:
- Event Creation: The method prepares the conversion event data, including the event name, index name, and object IDs.
- API Call: The conversion event is sent to Algolia Insights API using
insights.convertedObjects. - Tracking and Analysis: This method is useful for tracking conversions that may not be directly tied to a search query but still involve items indexed in Algolia.