Closed WillyReyno closed 2 years ago
Hi @WillyReyno ,
Thank you for reporting this. Could you please show us the code you use to call the endpoint? This could help us debug the issue.
Thank you in advance!
Here is my code, I'm using Laravel's Http client :
use Illuminate\Support\Facades\Http;
Http::withHeaders([
'X-Algolia-API-Key' => 'my-api-key',
'X-Algolia-Application-Id' => 'my-app-id',
])->get('https://analytics.us.algolia.com/2/searches', [
'index' => 'my-index',
'clickAnalytics' => true,
'limit' => 5,
'startDate' => '2021-09-27',
'endDate' => '2021-10-03',
]);
If you change 'clickAnalytics' => true
to 'clickAnalytics' => 'true'
this should work. The HTTP client in Laravel converts true
to 1
in the URL, but the Algolia API expects true
.
I'm also closing this issue since this isn't using the Algolia API client, but the HTTP client in Laravel. The change I explained above should solve your issue though 🙂
Description
When using the
/2/searches
endpoint, I want to retrieve click analytics data such as CTR, conversion rate etc. I passedclickAnalytics => true
parameter as specified in the documentation, but I'm still only gettingsearch
,nbHits
&count
data.Here are the parameters I pass :
Here is the result from the API :
The option array is correctly read since the limit is applied, but
clickAnalytics
seems to be ignored.