API Reference / API Parameters / clickAnalytics
Feb. 26, 2019

clickAnalytics

Type: boolean
Engine default: false
Parameter syntax
'clickAnalytics' => true|false

Can be used in these methods:

About this parameter

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. See Analytics Implementation Overview.

  • What you can do with Analytics depends on your plan.

Examples

1
2
3
$res = $index->search('query', [
  'clickAnalytics' => false
]);
1
2
3
$res = $index->search('query', [
  'clickAnalytics' => true
]);

Did you find this page helpful?