Constructor
# new Core(config)
Parameters:
Name | Type | Description |
---|---|---|
config |
Config
|
|
dependencies.dataManager |
DataManagerInterface
|
|
dependencies.eventManager |
EventManagerInterface
|
|
dependencies.experienceManager |
ExperienceManagerInterface
|
|
dependencies.featureManager |
FeatureManagerInterface
|
|
dependencies.segmentsManager |
SegmentsManagerInterface
|
|
dependencies.apiManager |
ApiManagerInterface
|
|
dependencies.loggerManager |
LogManagerInterface
|
- Implements:
- CoreInterface
Classes
Methods
# createContext(visitorId, visitorAttributesopt) → {ContextInterface|null}
Create visitor context
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
visitorId |
string
|
A visitor id | |
visitorAttributes |
Record.<string, any>
|
<optional> |
An object of key-value pairs that are used for audience and/or segments targeting |
ContextInterface
|
null
# initialize(config)
Initialize credentials, configData etc..
Parameters:
Name | Type | Description |
---|---|---|
config |
# on(event, fn) → {void}
Add event handler to event
Parameters:
Name | Type | Description |
---|---|---|
event |
SystemEvents
|
Event name |
fn |
function
|
A callback function which will be fired |
void