Add user agent
This method is only available for JavaScript.
search
ACL
Only available for JavaScript
We released a new version of the PHP API client in public beta. Read the beta documentation for more information.
We released a new version of the Java API client in public beta. Read the beta documentation for more information.
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
Parameter | Description |
---|---|
userAgent
|
type: string
Custom user agent. This gets added to the default user agent. |
Response
This method doesn't return a response.