Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.94 KB

analytics.analyticsconfig.md

File metadata and controls

26 lines (18 loc) · 1.94 KB

Home > @yext/analytics > AnalyticsConfig

AnalyticsConfig interface

The main configuration options for Analytics Events.

Signature:

export interface AnalyticsConfig 

Properties

Property Modifiers Type Description
authorization string The API Key, OAuth, or bearer token for accessing the Analytics Events API.
authorizationType 'apiKey' | 'bearer' Used for specifying if an API Key or Bearer Token is used for the authorization property.
debug? boolean (Optional) Used to enable debug mode, which is false by default. When enabled the SDK will not send requests to the Events API, but will log the request with other useful debug information instead.
env? Environment (Optional) The Yext environment to send requests to. Defaults to 'PRODUCTION'.
forceFetch? boolean (Optional) Used to force sending the request with fetch even if the browser does not support fetch with the keepalive flag (like Firefox). If the browser does support it, fetch is used by default.
region? Region (Optional) The region to send requests to. Defaults to 'US'.
sessionTrackingEnabled? boolean (Optional) Whether to enable session tracking for analytics events. Defaults to true for both environments. If set to false, sessionId will automatically be set to undefined in the event payload.