clickAnalytics
'clickAnalytics' => true|false
Can be used in these methods:
search,
browseObjects,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
search,
browse_objects,
search_for_facet_values,
generate_secured_api_key,
add_api_key,
update_api_key
search,
browseObjects,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
search,
browse_objects,
search_for_facet_values,
generate_secured_api_key,
add_api_key,
update_api_key
search,
browse,
searchForFacetValues,
generateSecuredApiKey,
addAPIKey,
updateAPIKey
search,
browseObjects,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
searchAsync,
browseAsync,
searchForFacetValues
Search,
Browse,
SearchForFacetValues,
GenerateSecuredApiKey,
AddApiKey,
UpdateApiKey
Search,
browse,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
Search,
BrowseObjects,
SearchForFacetValues,
GenerateSecuredAPIKey,
AddAPIKey,
UpdateAPIKey
search,
browse index,
search into facet values,
generateSecuredApiKey,
add key,
update key
About this parameter
Enable the Click Analytics feature.
The effect of setting clickAnalytics
to true
is to add a queryID
to the search response.
This queryID
can 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 the guide on implementing analytics.
Examples
Disable click analytics for the current search
1
2
3
$res = $index->search('query', [
'clickAnalytics' => false
]);
Enable click analytics for the current search
1
2
3
$res = $index->search('query', [
'clickAnalytics' => true
]);