setClickAnalytics method

AlgoliaQuery setClickAnalytics({
  1. bool enabled = false,
})

clickAnalytics

Enable the Click Analytics feature.

The effect of setting clickAnalytics to true is to add a queryID to the search response. As explained here, this queryID can subsequently be used in click and conversion analytics.

Usage notes:

  • This parameter does not, on its own, add any new analytics data; it only ensures that a queryID is returned. With that queryID, it will be up to you then to choose the best events to send as clicks and conversions. Learn more in our guide on implementing analytics.

Source: Learn more

Implementation

AlgoliaQuery setClickAnalytics({bool enabled = false}) {
  assert(!_parameters.containsKey('clickAnalytics'));
  return _copyWithParameters(<String, dynamic>{'clickAnalytics': enabled});
}