Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
method Flagship.newVisitor
Re-export
import { Flagship } from "https://deno.land/x/flagship_io_js_sdk@3.1.1/index.ts";

Create a new visitor with a context.

Parameters

optional
visitorId: string | null

: Unique visitor identifier.

optional
context: Record<string, primitive>

: visitor context. e.g: { isVip: true, country: "UK" }.

Returns

a new visitor instance

Create a new visitor with a context.

Parameters

optional
params: NewVisitor

: Unique visitor identifier.

Returns

a new visitor instance

Parameters

optional
param1: NewVisitor | string | null
optional
param2: Record<string, primitive>