Add user agent
This method is only available for JavaScript.
Required API Key:
any key with the
search
ACL
Only available for JavaScript
You’re currently reading the Ruby API client v2 documentation. Check the migration guide to learn how to upgrade from v1 to v2. You can still access the v1 documentation.
About this method
Add a custom user agent to the request.
You can’t override the default user agent, but you can add a custom string to it.
Examples
Read the Algolia CLI documentation for more information.
The following example adds the string custom
to the default user agent:
insights-js (X.X.X); custom
.
For more information about initializing the Insights client aa
,
see Initialize the Insights client.
1
aa('addAlgoliaAgent', 'custom');
Parameters
userAgent
|
type: string
Custom user agent. This gets added to the default user agent. |
Response
This method doesn't return a response.