context package
Classes
|
Class |
Description |
|---|---|
|
Handles client-to-server score handoff using an encoded cookie with the visitor score vector. NOTE: forget me is not supported when on the server side. | |
Abstract Classes
|
Abstract Class |
Description |
|---|---|
Enumerations
|
Enumeration |
Description |
|---|---|
Functions
|
Function |
Description |
|---|---|
|
Computes aggregated scores based on other dimensions | |
|
Creates a new log drain that will log to the console. The log drain will only log event IDs, but is much smaller than the debug log drain. NOTE: you probably want enableConsoleLogDrain() instead of this function. | |
|
Creates a new log drain that will log full debug messages to the console. The debug log drain adds significant bundle size, but is useful for debugging. NOTE: you probably want enableDebugConsoleLogDrain() instead of this function. | |
|
Creates a function that applies linear decay to scores over time. | |
|
Enables logging Context events to the browser console. Lightweight events with only the event ID are emitted. | |
|
Enables a Context instance to feed data to the Uniform Context DevTools. DevTools can be hosted either as a Chromium extension, or as a standalone React app within a page and receive data once this plugin has been activated. | |
|
Enables logging Context events to the browser console. Lightweight events with only the event ID are emitted. | |
|
evaluateVariantMatch(variantId, match, vec, onLogMessage, quirks) | |
|
Tests if a StringMatch matches a string value | |
|
serializePersonalizeVariants({ personalizeVariants, }, input) | |
|
Implementation of the strongest score personalization selection algorithm. In this mode, we take all variations and break them into two groups: 1. Variations that have a positive score for their tagged dimension 2. Variations that do not have a dimension tag We then sort the first group by score, concatenate the second group, and return the top variations. | |
|
testVariations({ name, context, variations, onLogMessage, }, input) | |
|
Implementation of the top-down criteria personalization selection algorithm. In this mode, we evaluate variations in the order they are declared and the first variations whose criteria evaluate to true are selected. |
Interfaces
|
Interface |
Description |
|---|---|
|
Data for a personalization variation using the top-down criteria selection algorithm | |
|
Data for a personalization variation using the TODO selection algorithm | |
|
Data that must exist on a personalization variation regardless of selection algorithm |
Variables
|
Variable |
Description |
|---|---|
Type Aliases
|
Type Alias |
Description |
|---|---|
|
Content that is tagged for adding enrichment score when triggered by behavior (i.e. being shown that content) | |
|
Canvas-specific data that should be managed separately from regular context updates | |
|
Defines a plugin for Uniform Context. The plugin should attach event handlers in its creation function. | |
|
Expresses a 'patch' to the Uniform Context state | |
|
A type that evaluates a signal criteria type and decides if it matches the current Context state or not. | |
|
The result of evaluating a signal criteria. | |
|
Computes decay of visitor scores over time. NOTE: it is expected that this function mutates the incoming score vectors, if it needs to apply score decay. The data store ensures immutability already. | |
|
Mutations the DevTools can take on the data it receives | |
|
Emitted when data is updated in Context to the devtools | |
|
A request to forget me from the DevTools | |
|
A hello message emitted as an event from the browser extension to test if the page contains Context | |
|
A log message emitted as an event to the browser extension | |
|
Devtools requests a raw update cycle (explicitly set scores of dimensions in durations, etc) | |
|
The data state provided to the devtools for rendering. | |
|
The version of the DevTools UI to load when in Chromium extension context. 1: Uniform Optimize. 2: Uniform Context. | |
|
Devtools requests a normal update cycle (regular data update, re-eval signals, etc) | |
|
An event that has occurred (i.e. an analytics track) which may trigger an Event signal | |
|
Identifies the visitor as being a specific unique identifier. NOTE: this only has an effect when using an external cross-device transition storage system. NOTE: you cannot read the identified visitor ID back from the storage system once it is set. | |
|
Defines all error codes and their parameter(s) | |
|
Changes the visitor's permanent score for a given dimension | |
|
Changes the visitor's session (time-based) score for a given dimension | |
|
Emitted when a personalization runs | |
|
The result of computing personalized content from variations | |
|
Defines the shape of a personalized content variant | |
|
Changes the visitor's storage consent setting. Setting consent to false will trigger deletion of any stored data for the visitor. Scores are still collected in-memory when consent is false; just not persisted. | |
|
Sets whether the current visitor is in the personalization control group (Will not be exposed to personalization or gather classification data; WILL see A/B tests) In most cases this should not be sent as the membership is computed automatically for visitors; this command is intended mostly for diagnostics and testing purposes. | |
|
Converts the goal specified. | |
|
Sets a permanent quirk key and value for the visitor | |
|
Sets a specific variant as being this visitor's variant on an A/B test | |
|
Commands that can be issued to alter the storage of Uniform Context data | |
|
Emitted event when an A/B test runs | |
|
The result of computing an A/B test result | |
|
Defines the shape of a A/B test variant | |