Skip to content

Commit

Permalink
Merge pull request #49 from yext/config
Browse files Browse the repository at this point in the history
EventsSDK: create AnalyticsConfig interface
  • Loading branch information
swong1213 committed Aug 21, 2023
2 parents 768b4ca + 099c5e6 commit 4ee0ebd
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/AnalyticsConfig.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import {Environment} from './models';
import {Region} from './models';

/**
* The main configuration options for Analytics Events.
*
* @public
*/
export interface AnalyticsConfig {
/** The API Key or OAuth for accessing the Analytics Events API
* Only one of key or bearer should be set.
* */
key?: string;
/** The bearer token for accessing the Analytics Events API.
* Only one of key or bearer should be set.
* */
bearer?: string;
/** The Yext environment to send requests to. Defaults to 'PRODUCTION'. */
env?: Environment;
/** The region to send requests to. Defaults to 'US'. */
region?: Region;
/**
* Whether to enable session tracking for analytics events.
* Defaults to true for both environments
* @remarks
* This generates a ULID to tie together events in a single browsing session.
*/
sessionTrackingEnabled?: boolean;
}

0 comments on commit 4ee0ebd

Please sign in to comment.