clickedObjectsAfterSearch method

  1. @override
void clickedObjectsAfterSearch({
  1. required String indexName,
  2. required Iterable<String> objectIDs,
  3. required String eventName,
  4. required String queryID,
  5. required Iterable<int> positions,
  6. DateTime? timestamp,
})
override

Track a hits click after search event. Optional custom timestamp can be provided.

Implementation

@override
void clickedObjectsAfterSearch({
  required String indexName,
  required Iterable<String> objectIDs,
  required String eventName,
  required String queryID,
  required Iterable<int> positions,
  DateTime? timestamp,
}) {
  final events = objectIDs
      .slices(_maxObjectIDsPerEvent)
      .map(
        (objectIDs) => Event.clickHitsAfterSearch(
          eventName,
          indexName,
          userToken,
          queryID,
          objectIDs,
          positions,
          timestamp: timestamp,
        ),
      )
      .toList();
  _send(events);
}