-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from yext/config
EventsSDK: create AnalyticsConfig interface
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |