ConfigurationActions (Search Engine)
ConfigurationActions (Search Engine)
This is for:
DeveloperThe configuration action creators.
See Dispatch Actions.
Loader Function
loadConfigurationActions
Loads the configuration
reducer and returns possible action creators.
Parameters
-
engine:
CoreEngine | CoreEngineNext
The headless engine.
Returns ConfigurationActionCreators
: The configuration action creators.
ConfigurationActionCreators
disableAnalytics
Disables analytics tracking.
Returns PayloadAction
: A dispatchable action.
enableAnalytics
Enables analytics tracking.
Returns PayloadAction
: A dispatchable action.
setOriginLevel2
Sets originLevel2 for analytics tracking.
Parameters
-
payload:
SetOriginLevel2ActionCreatorPayload
The action creator payload.
Returns PayloadAction<SetOriginLevel2ActionCreatorPayload>
: A dispatchable action.
setOriginLevel3
Sets originLevel3 for analytics tracking.
Parameters
-
payload:
SetOriginLevel3ActionCreatorPayload
The action creator payload.
Returns PayloadAction<SetOriginLevel3ActionCreatorPayload>
: A dispatchable action.
updateAnalyticsConfiguration
Updates the analytics configuration.
Parameters
-
payload:
UpdateAnalyticsConfigurationActionCreatorPayload
The action creator payload.
Returns PayloadAction<UpdateAnalyticsConfigurationActionCreatorPayload>
: A dispatchable action.
updateBasicConfiguration
Updates the global headless engine configuration.
Parameters
-
payload:
UpdateBasicConfigurationActionCreatorPayload
The action creator payload.
Returns PayloadAction<UpdateBasicConfigurationActionCreatorPayload>
: A dispatchable action.
Related Types
SetOriginLevel2ActionCreatorPayload
Properties
-
originLevel2:
string
The origin level 2 usage analytics event metadata whose value should typically be the identifier of the tab (e.g.,
All
).
SetOriginLevel3ActionCreatorPayload
Properties
-
originLevel3:
string
The origin level 3 usage analytics event metadata whose value should typically be the URL of the page that linked to the search interface (e.g.,
https://connect.coveo.com/s/
).
UpdateAnalyticsConfigurationActionCreatorPayload
Properties
-
analyticsMode?:
'legacy' | 'next'
The analytics client to use. -
legacy
: The legacy analytics client, i.e., the Coveo Analytics.js library. -next
: The next analytics client, i.e., the Coveo Event Protocol with the Relay library. -
anonymous?:
boolean
Whether analytics events should be logged anonymously. If set to true, the Usage Analytics Write API will not extract the name and userDisplayName, if present, from the search token
-
deviceId?:
string
The name of the device that the end user is using. It should be explicitly configured in the context of a native mobile app.
-
documentLocation?:
string
Specifies the URL of the current page or component.
-
enabled?:
boolean
Whether to enable usage analytics tracking.
-
originContext?:
string
Sets the Origin Context dimension on the analytic events.
You can use this dimension to specify the context of your application. Suggested values are "Search", "InternalSearch" and "CommunitySearch"
-
originLevel2?:
string
The origin level 2 usage analytics event metadata whose value should typically be the identifier of the tab from which the usage analytics event originates (e.g.,
All
). -
originLevel3?:
string
The origin level 3 usage analytics event metadata whose value should typically be the URL of the page that linked to the search interface that’s making the request (e.g.,
https://connect.coveo.com/s/
). -
proxyBaseUrl?:
string
The base URL to use to proxy Coveo analytics requests (e.g.,
https://example.com/analytics
).This is an advanced option that you should only set if you need to proxy Coveo analytics requests through your own server. In most cases, you should not set this option.
By default, no proxy is used and the Coveo analytics requests are sent directly to the Coveo platform through the analytics organization endpoint resolved from the
organizationId
andenvironment
values provided in your engine configuration (i.e.,https://<organizationId>.analytics.org.coveo.com
orhttps://<organizationId>.analytics.org<environment>.coveo.com
, if theenvironment
values is specified and different fromprod
).If you set this option, you must also implement the correct proxy endpoints on your server, depending on the
analyticsMode
you are using.If you are using the
next
analytics mode, you must implement the following proxy endpoints:-
POST
/
to proxy requests toPOST https://<organizationId>.analytics.org<environment|>.coveo.com/rest/organizations/{organizationId}/events/v1
-POST
/validate
to proxy requests toPOST https://<organizationId>.analytics.org<environment|>.coveo.com/rest/organizations/{organizationId}/events/v1/validate
The Event Protocol Reference provides documentation on the analytics event schemas that can be passed as request bodies to the above endpoints.
If your are using the
legacy
analytics mode, yourproxyBaseUrl
must end with/rest/v15/analytics
, and you must implement the following proxy endpoints: -
POST
/click
to proxy requests toPOST
https://<organizationId>.analytics.org<environment|>.coveo.com/rest/v15/analytics/click
-POST
/collect
to proxy requests toPOST
https://<organizationId>.analytics.org<environment|>.coveo.com/rest/v15/analytics/collect
-POST
/custom
to proxy requests toPOST
https://<organizationId>.analytics.org<environment|>.coveo.com/rest/v15/analytics/custom
-GET
/monitoring/health
to proxy requests toGET
https://<organizationId>.analytics.org<environment|>.coveo.com/rest/v15/analytics/monitoring/health
-POST
/search
to proxy requests toPOST
https://<organizationId>.analytics.org<environment|>.coveo.com/rest/v15/analytics/search
-POST
/searches
to proxy requests toPOST
https://<organizationId>.analytics.org<environment|>.coveo.com/rest/v15/analytics/searches
-GET
/status
to proxy requests toGET
https://<organizationId>.analytics.org<environment|>.coveo.com/rest/v15/analytics/status
-POST
/view
to proxy requests toPOST
https://<organizationId>.analytics.org<environment|>.coveo.com/rest/v15/analytics/view
-DELETE
/visit
to proxy requests toDELETE
https://<organizationId>.analytics.org<environment|>.coveo.com/rest/v15/analytics/visit
-GET
/visit
to proxy requests toGET
https://<organizationId>.analytics.org<environment|>.coveo.com/rest/v15/analytics/visit
-
-
runtimeEnvironment?:
IRuntimeEnvironment
The Coveo analytics runtime to use, see https://github.com/coveo/coveo.analytics.js for more info.
-
trackingId?:
string
The unique identifier of the tracking target.
-
userDisplayName?:
string
Specifies the user display name for the usage analytics logs.
UpdateBasicConfigurationActionCreatorPayload
Properties
-
accessToken?:
string
The access token to use to authenticate requests against the Coveo Cloud endpoints. Typically, this will be an API key or search token that grants the privileges to execute queries and push usage analytics data in the target Coveo Cloud organization.
-
environment?:
PlatformCombination['env']
The environment in which the organization is hosted.
The
dev
andstg
environments are only available internally for Coveo employees (e.g., Professional Services). -
organizationId?:
string
The unique identifier of the target Coveo Cloud organization (e.g.,
mycoveocloudorganizationg8tp8wu3
)