/** * The aggregation of the queries to retrieve the latest query * uses the IP or the user token to work efficiently. * If the queries are made from your backend server, * the IP will be the same for all of the queries. * We're supporting the following HTTP header to forward the IP of your end-user * to the engine, you just need to set it for each query. * * @see https://www.algolia.com/doc/faq/analytics/will-the-analytics-still-work-if-i-perform-the-search-through-my-backend * * @param string $ip */ public function setForwardedFor($ip) { $this->context->setForwardedFor($ip); }