# Interface IClickEvent

Describes a Coveo Cloud usage analytics click event.

## Index

### Properties

- actionCause
- actionType
- anonymous
- clientId
- collectionName
- customData
- device
- documentCategory
- documentPosition
- documentTitle
- documentUri
- documentUriHash
- documentUrl
- language
- mobile
- originContext
- originLevel1
- originLevel2
- originLevel3
- queryPipeline
- rankingModifier
- responseTime
- searchQueryUid
- sourceName
- splitTestRunName
- splitTestRunVersion
- userAgent
- userDisplayName
- userGroups
- username
- viewMethod

## Properties

### actionCause

actionCause: string

Inherited from IAnalyticsEvent.actionCause

- Defined in rest/AnalyticsEvent.ts:20

A unique name describing the action that triggered the event.

See the `name` property of the `IAnalyticsActionCause` interface.

Example: `pagerNext`

### actionType

actionType: string

Inherited from IAnalyticsEvent.actionType

- Defined in rest/AnalyticsEvent.ts:28

A name describing the category of actions to which the action that triggered the event belongs.

See the `type` property of the `IAnalyticsActionCause` interface.

Example: `getMoreResults`

### Optional anonymous

anonymous: boolean

Inherited from IAnalyticsEvent.anonymous

- Defined in rest/AnalyticsEvent.ts:50

Whether the event should be logged anonymously to the Coveo Cloud usage analytics service.

Note: This field is normally set to the `anonymous` option value of the `Analytics` component.

### clientId

clientId: string

Inherited from IAnalyticsEvent.clientId

- Defined in rest/AnalyticsEvent.ts:139

A GUID representing the current user. This GUID is generated locally and stored in a non-expiring browser cookie.

### collectionName

collectionName: string

- Defined in rest/ClickEvent.ts:78

The name of the collection to which the clicked query result item belongs.

Note: The framework normally sets this field by retrieving the information from the related Search API query response.

Example: `default`

### Optional customData

customData: object

Inherited from IAnalyticsEvent.customData

- Defined in rest/AnalyticsEvent.ts:135

Additional metadata to send along with the event.

Note: This field may include custom user context information (see Sending Custom Context Information).

Example: `{ "currentResultsPerPage": 25, "userRole": "developer" }`

#### Type declaration

- ##### [key: string]: any

### device

device: string

Inherited from IAnalyticsEvent.device

- Defined in rest/AnalyticsEvent.ts:58

The name of the device or browser that triggered the event.

Note: The framework normally sets this field by parsing the current `navigator.userAgent` value.

Example: `Chrome`

### documentCategory

documentCategory: string

- Defined in rest/ClickEvent.ts:70

The type of query result item that was clicked.

Note: The framework normally sets this field by retrieving the information from the related Search API query response.

Example: `FAQ`

### documentPosition

documentPosition: number

- Defined in rest/ClickEvent.ts:92

The 1-based position of the clicked item in the query results set.

Note: The framework normally sets this field by retrieving the information from the related Search API query response.

### documentTitle

documentTitle: string

- Defined in rest/ClickEvent.ts:62

The title of the clicked query result item.

Note: The framework normally sets this field by retrieving the information from the related Search API query response.

Example: `Coveo ML Frequently Asked Questions`

### documentUri

documentUri: string

- Defined in rest/ClickEvent.ts:38

The URI of the clicked query result item.

Note: The framework normally sets this field by retrieving the information from the related Search API query response.

Example: `http://www.example.com/org:organization/articletype:FAQ/article:aB1c2000000A1BcDEF/language:en_US`

### documentUriHash

documentUriHash: string

- Defined in rest/ClickEvent.ts:46

The hashed URI of the clicked query result item.

Note: The framework normally sets this field by retrieving the information from the related Search API query response.

Example: `AbCñdeFghiJKLM1n`

### documentUrl

documentUrl: string

- Defined in rest/ClickEvent.ts:54

The URL of the clicked query result item.

Note: The framework normally sets this field by retrieving the information from the related Search API query response.

Example: `https://example.com/aB1c2000000A1Bc`

### language

language: string

Inherited from IAnalyticsEvent.language

- Defined in rest/AnalyticsEvent.ts:106

The language of the search interface from which the event originates.

Must be a valid ISO-639-1 code.

Note: By default, the framework sets this field according to the currently loaded culture file (see Changing the Language of Your Search Interface).

Example: `en`

### mobile

mobile: boolean

Inherited from IAnalyticsEvent.mobile

- Defined in rest/AnalyticsEvent.ts:64

Whether the event originates from a mobile device.

Note: The framework normally sets this field by parsing the current `navigator.userAgent` value.

### originContext

originContext: string

Inherited from IAnalyticsEvent.originContext

- Defined in rest/AnalyticsEvent.ts:96

The broad application context from which the event originates.

Note: By default, the framework sets this field to `Search`. However, you can use the `setOriginContext` method of the `Analytics` component to modify the default value.

Example: `Search`

### originLevel1

originLevel1: string

Inherited from IAnalyticsEvent.originLevel1

- Defined in rest/AnalyticsEvent.ts:72

The identifier of the search interface from which the event originates.

Note: This field is normally set through the `searchHub` option of the `Analytics` component. However, when actually recording the event, the Coveo Cloud usage analytics service may override this value with information extracted from the search token.

Example: `PartnerPortalSearch`

### originLevel2

originLevel2: string

Inherited from IAnalyticsEvent.originLevel2

- Defined in rest/AnalyticsEvent.ts:80

The identifier of the tab from which the event originates.

Note: The framework normally sets this field to the identifier of the currently selected `Tab` in the search interface.

Example: `All`

### Optional originLevel3

originLevel3: string

Inherited from IAnalyticsEvent.originLevel3

- Defined in rest/AnalyticsEvent.ts:88

The address of the webpage that linked to the search interface from which the event originates.

Note: The framework normally sets this field to the current `document.referrer` value.

Example: `http://example.com/`

### queryPipeline

queryPipeline: string

- Defined in rest/ClickEvent.ts:14

The name of the query pipeline to which the Search API query that returned the clicked result item was routed.

Note: The framework normally sets this field by retrieving the information from the related Search API query response.

Example: `PartnerPortalSearchPipeline`

### rankingModifier

rankingModifier: string

- Defined in rest/ClickEvent.ts:108

The ranking modifier that was applied to the clicked query result item.

Note: The framework normally sets this field by retrieving the information from the related Search API query response.

Example: `Reveal ART`

### responseTime

responseTime: number

Inherited from IAnalyticsEvent.responseTime

- Defined in rest/AnalyticsEvent.ts:113

The time it took to get a response from the Search API for the query related to the event (in milliseconds).

Note: The framework normally sets this field to `0`, except for search events in which case it sets the field by retrieving the information from the related Search API query response.

### searchQueryUid

searchQueryUid: string

Inherited from IAnalyticsEvent.searchQueryUid

- Defined in rest/AnalyticsEvent.ts:12

The unique identifier of the related query.

Note: The framework normally sets this field by retrieving the information from the related Search API query response.

Example: `74682726-0e20-46eb-85ac-f37259346f57`

### sourceName

sourceName: string

- Defined in rest/ClickEvent.ts:86

The name of the source that contains the clicked query result item.

Note: The framework normally sets this field by retrieving the information from the related Search API query response.

Example: `Product Documentation`

### splitTestRunName

splitTestRunName: string

- Defined in rest/ClickEvent.ts:22

The name of the A/B test that applied to the related Search API query.

Note: This field is normally set by the `splitTestRunName` option of the `Analytics` component. However, if this option is left undefined, the framework attempts to set this field by retrieving information from the related Search API query response.

Example: `Testing new ART model`

### splitTestRunVersion

splitTestRunVersion: string

- Defined in rest/ClickEvent.ts:30

The version of the A/B test that applied to the related Search API query (i.e., version A or version B).

Note: This field is normally set by the `splitTestRunVersion` option of the `Analytics` component. However, if this option is left undefined and the related Search API query response indicates that an A/B test was applied, the framework sets this field to the name of the query pipeline to which the query was routed.

Example: `PartnerPortalSearchPipelineWithART`

### Optional userAgent

userAgent: string

Inherited from IAnalyticsEvent.userAgent

- Defined in rest/AnalyticsEvent.ts:121

The software acting on behalf of the end-user whose action triggered the event.

Note: By default, the framework sets this field to the current `navigator.userAgent` value.

Example: `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36`

### Optional userDisplayName

userDisplayName: string

Inherited from IAnalyticsEvent.userDisplayName

- Defined in rest/AnalyticsEvent.ts:44

The display name of the end-user whose action triggered the event.

Note: This field is normally set to the `userDisplayName` option value of the `Analytics` component. However, when actually recording the event, the Coveo Cloud usage analytics service may override this value with information extracted from the search token.

Example: `Alice Smith`

### Optional userGroups

userGroups: string

Inherited from IAnalyticsEvent.userGroups

- Defined in rest/AnalyticsEvent.ts:127

The groups the end-user whose action triggered the event belongs to.

Note: This field is normally left undefined, and the Coveo Cloud usage analytics service attempts to extract the information from the search token when actually recording the event.

### Optional username

username: string

Inherited from IAnalyticsEvent.username

- Defined in rest/AnalyticsEvent.ts:36

The identifier of the end-user whose action triggered the event.

Note: This field is normally set to the `user` option value of the `Analytics` component. However, when actually recording the event, the Coveo Cloud usage analytics service may override this value with information extracted from the search token.

Example: `asmith@example.com`

### viewMethod

viewMethod: string

- Defined in rest/ClickEvent.ts:100

The way the item was clicked.

Note: The framework normally sets this field to the exact same value as `actionCause`.

Example: `documentOpen`

### Hierarchy

- IAnalyticsEvent