Constructor
# new SegmentsManager(config, dependencies)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
config |
Config
|
||
dependencies |
Object
|
||
dataManager |
DataManagerInterface
|
<optional> |
|
ruleManager |
RuleManagerInterface
|
<optional> |
|
loggerManager |
LogManagerInterface
|
<optional> |
- Implements:
- SegmentsManagerInterface
Classes
Methods
# getSegments(visitorId) → {SegmentsData}
Get segments in DataStore
Parameters:
| Name | Type | Description |
|---|---|---|
visitorId |
Id
|
SegmentsData
# putSegments(visitorId, segments) → {void}
Update segments in DataStore
Parameters:
| Name | Type | Description |
|---|---|---|
visitorId |
Id
|
|
segments |
SegmentsData
|
void
# selectCustomSegments(visitorId, segmentKeys, segmentRuleopt, environmentopt) → {SegmentsData}
Update custom segments for specific visitor
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
visitorId |
Id
|
||
segmentKeys |
Array.<string>
|
A list of segment keys | |
segmentRule |
Record.<string, any>
|
<optional> |
An object of key-value pairs that are used for segments matching |
environment |
string
|
<optional> |
SegmentsData