API Reference / API Parameters / analyticsTags
Feb. 26, 2019

analyticsTags

Type: list of strings
Engine default: []
Parameter syntax
'analyticsTags' => [
  'tag value',
  ...
]

Can be used in these methods:

About this parameter

List of tags to apply to the query for analytics purposes.

Tags can be used in the analytics to filter searches. For example, you can send two different tags - mobile and website - to see how mobile users search in comparison to website users.

Tags can be up to 100 characters long. Tags above this limit are ignored. A maximum of 10 tags can be applied to a query. If more tags are provided, the call still succeeds but extra tags are ignored.

Examples

1
2
3
4
5
6
$results = $index->search('query', [
  'analyticsTags' => [
    'front_end',
    'website2'
  ]
]);

Did you find this page helpful?