import { type IVisitor } from "https://deno.land/x/flagship_io_js_sdk@4.0.4/visitor/index.ts";
The Visitor
class represents a unique user within your application. It aids in
managing the visitor's data and fetching the corresponding flags for the visitor
from the Flagship platform .
Methods
Sets whether the visitor has consented for protected data usage.
Updates the visitor context values, matching the given keys, used for targeting. A new context value associated with this key will be created if there is no previous matching value.
Updates the visitor context value for the given key, used for targeting. A new context value associated with this key will be created if there is no previous matching value.
Returns a Flag object by its key. If no flag matches the given key, an empty flag will be returned.
Invokes the decision API
or refers to the bucketing file
to refresh all campaign flags based on the visitor's context.
Sends Hits to Flagship servers for reporting.