ConfigurationActions (Product Recommendation Engine)
ConfigurationActions (Product Recommendation Engine)
|
|
Note
This component was introduced in version |
The configuration action creators.
See Dispatch Actions.
Loader Function
loadConfigurationActions
Loads the configuration reducer and returns possible action creators.
Parameters
-
engine:
CoreEngine | CoreEngineNextThe 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:
SetOriginLevel2ActionCreatorPayloadThe action creator payload.
Returns PayloadAction<SetOriginLevel2ActionCreatorPayload>: A dispatchable action.
setOriginLevel3
Sets originLevel3 for analytics tracking.
Parameters
-
payload:
SetOriginLevel3ActionCreatorPayloadThe action creator payload.
Returns PayloadAction<SetOriginLevel3ActionCreatorPayload>: A dispatchable action.
updateAnalyticsConfiguration
Updates the analytics configuration.
Parameters
-
payload:
UpdateAnalyticsConfigurationActionCreatorPayloadThe action creator payload.
Returns PayloadAction<UpdateAnalyticsConfigurationActionCreatorPayload>: A dispatchable action.
updateBasicConfiguration
Updates the global headless engine configuration.
Parameters
-
payload:
UpdateBasicConfigurationActionCreatorPayloadThe action creator payload.
Returns PayloadAction<UpdateBasicConfigurationActionCreatorPayload>: A dispatchable action.
Related types
SetOriginLevel2ActionCreatorPayload
Properties
-
originLevel2:
stringThe origin level 2 usage analytics event metadata whose value should typically be the identifier of the tab (for example,
All).
SetOriginLevel3ActionCreatorPayload
Properties
-
originLevel3:
stringThe origin level 3 usage analytics event metadata whose value should typically be the URL of the page that linked to the search interface (for example,
https://connect.coveo.com/s/).
UpdateAnalyticsConfigurationActionCreatorPayload
Properties
-
analyticsMode?:
'legacy' | 'next'The analytics client to use. -
legacy: The legacy analytics client, that is, the Coveo Analytics.js library. -next: The next analytics client, that is, the Coveo Event Protocol with the Relay library. -
anonymous?:
booleanWhether 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
-
apiBaseUrl?:
stringThe Usage Analytics API base URL to use (for example,
https://platform.cloud.coveo.com/rest/ua). -
deviceId?:
stringThe name of the device that the end user is using. It should be explicitly configured in the context of a native mobile app.
-
documentLocation?:
stringSpecifies the URL of the current page or component.
-
enabled?:
booleanWhether to enable usage analytics tracking.
-
nextApiBaseUrl?:
stringThe Usage Analytics API base URL to use (for example,
https://platform.cloud.coveo.com/rest/organizations/${organizationId}/events/v1). -
originContext?:
stringSets 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?:
stringThe origin level 2 usage analytics event metadata whose value should typically be the identifier of the tab from which the usage analytics event originates (for example,
All). -
originLevel3?:
stringThe 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 (for example,
https://connect.coveo.com/s/). -
runtimeEnvironment?:
IRuntimeEnvironmentThe Coveo analytics runtime to use, see https://github.com/coveo/coveo.analytics.js for more info.
-
trackingId?:
stringThe unique identifier of the tracking target.
-
userDisplayName?:
stringSpecifies the user display name for the usage analytics logs.
UpdateBasicConfigurationActionCreatorPayload
Properties
-
accessToken?:
stringThe access token to use to authenticate requests against the Coveo 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 organization.
-
organizationId?:
stringThe unique identifier of the target Coveo organization (for example,
mycoveocloudorganizationg8tp8wu3) -
platformUrl?:
stringThe Platform URL to use (for example,
https://platform.cloud.coveo.com).